billboard.js 4.1.4 → 4.2.0-next.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/dist/billboard.css +87 -1
- package/dist/billboard.js +11129 -7032
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +20 -20
- package/dist/billboard.pkgd.js +22703 -14154
- package/dist/billboard.pkgd.min.js +37 -37
- package/dist/billboard.react.js +5 -5
- package/dist/billboard.react.min.js +2 -2
- package/dist/billboard.worker.js +1 -1
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +21 -4
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +22 -13
- package/dist/plugin/billboardjs-plugin-stanford.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-tableview.js +20 -3
- package/dist/plugin/billboardjs-plugin-tableview.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +1689 -1252
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2288 -1012
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +6350 -2390
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -18
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +1310 -1006
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +1293 -1006
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
- package/dist/theme/dark.css +90 -1
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +87 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +87 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +87 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist/theme/modern.css +87 -1
- package/dist/theme/modern.min.css +2 -2
- package/dist-esm/Chart/Chart.js +5 -5
- package/dist-esm/Chart/api/axis.js +2 -3
- package/dist-esm/Chart/api/category.js +2 -3
- package/dist-esm/Chart/api/chart.js +3 -4
- package/dist-esm/Chart/api/color.js +2 -3
- package/dist-esm/Chart/api/data.js +3 -4
- package/dist-esm/Chart/api/export.js +3 -4
- package/dist-esm/Chart/api/flow.js +15 -9
- package/dist-esm/Chart/api/focus.js +5 -3
- package/dist-esm/Chart/api/grid.js +2 -3
- package/dist-esm/Chart/api/group.js +2 -3
- package/dist-esm/Chart/api/legend.js +1 -2
- package/dist-esm/Chart/api/load.js +3 -4
- package/dist-esm/Chart/api/regions.js +3 -4
- package/dist-esm/Chart/api/selection.js +3 -4
- package/dist-esm/Chart/api/show.js +2 -3
- package/dist-esm/Chart/api/stubs.js +3 -4
- package/dist-esm/Chart/api/subchart.js +4 -5
- package/dist-esm/Chart/api/tooltip.js +28 -9
- package/dist-esm/Chart/api/x.js +2 -3
- package/dist-esm/Chart/api/zoom.js +6 -7
- package/dist-esm/ChartInternal/Axis/Axis.js +5 -6
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +26 -17
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +40 -12
- package/dist-esm/ChartInternal/ChartInternal.js +39 -24
- package/dist-esm/ChartInternal/data/convert.helper.js +2 -3
- package/dist-esm/ChartInternal/data/convert.js +3 -4
- package/dist-esm/ChartInternal/data/data.js +18 -11
- package/dist-esm/ChartInternal/data/load.js +4 -5
- package/dist-esm/ChartInternal/interactions/drag.js +3 -4
- package/dist-esm/ChartInternal/interactions/eventrect.js +4 -5
- package/dist-esm/ChartInternal/interactions/flow.js +25 -19
- package/dist-esm/ChartInternal/interactions/interaction.js +14 -13
- package/dist-esm/ChartInternal/interactions/subchart.js +5 -6
- package/dist-esm/ChartInternal/interactions/zoom.js +4 -5
- package/dist-esm/ChartInternal/internals/category.js +2 -3
- package/dist-esm/ChartInternal/internals/class.js +5 -5
- package/dist-esm/ChartInternal/internals/clip.js +2 -3
- package/dist-esm/ChartInternal/internals/color.js +4 -5
- package/dist-esm/ChartInternal/internals/domain.js +7 -7
- package/dist-esm/ChartInternal/internals/format.js +3 -4
- package/dist-esm/ChartInternal/internals/grid.js +4 -5
- package/dist-esm/ChartInternal/internals/legend.js +7 -7
- package/dist-esm/ChartInternal/internals/redraw.js +13 -13
- package/dist-esm/ChartInternal/internals/region.js +4 -5
- package/dist-esm/ChartInternal/internals/scale.js +2 -3
- package/dist-esm/ChartInternal/internals/selection.js +3 -4
- package/dist-esm/ChartInternal/internals/size.axis.js +2 -3
- package/dist-esm/ChartInternal/internals/size.js +8 -9
- package/dist-esm/ChartInternal/internals/style.js +4 -5
- package/dist-esm/ChartInternal/internals/subchart.util.js +2 -3
- package/dist-esm/ChartInternal/internals/text.arc.js +3 -4
- package/dist-esm/ChartInternal/internals/text.js +22 -23
- package/dist-esm/ChartInternal/internals/text.util.js +4 -5
- package/dist-esm/ChartInternal/internals/title.js +4 -5
- package/dist-esm/ChartInternal/internals/tooltip.js +42 -23
- package/dist-esm/ChartInternal/internals/transform.js +5 -6
- package/dist-esm/ChartInternal/internals/type.js +78 -11
- package/dist-esm/ChartInternal/shape/arc.js +5 -6
- package/dist-esm/ChartInternal/shape/area.js +4 -5
- package/dist-esm/ChartInternal/shape/bar.js +5 -6
- package/dist-esm/ChartInternal/shape/boxplot.js +111 -0
- package/dist-esm/ChartInternal/shape/bubble.js +2 -3
- package/dist-esm/ChartInternal/shape/bullet.js +213 -0
- package/dist-esm/ChartInternal/shape/candlestick.js +5 -6
- package/dist-esm/ChartInternal/shape/core/barRadius.js +2 -3
- package/dist-esm/ChartInternal/shape/core/boxplot.js +192 -0
- package/dist-esm/ChartInternal/shape/core/bubble.js +4 -5
- package/dist-esm/ChartInternal/shape/core/bullet.js +528 -0
- package/dist-esm/ChartInternal/shape/core/candlestick.js +2 -3
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +2 -3
- package/dist-esm/ChartInternal/shape/core/geometry.js +2 -3
- package/dist-esm/ChartInternal/shape/core/heatmap.js +453 -0
- package/dist-esm/ChartInternal/shape/core/path.js +2 -3
- package/dist-esm/ChartInternal/shape/core/point.js +2 -3
- package/dist-esm/ChartInternal/shape/core/sankey.js +576 -0
- package/dist-esm/ChartInternal/shape/core/treemap.js +2 -3
- package/dist-esm/ChartInternal/shape/funnel.js +45 -6
- package/dist-esm/ChartInternal/shape/gauge.js +3 -4
- package/dist-esm/ChartInternal/shape/heatmap.js +144 -0
- package/dist-esm/ChartInternal/shape/line.js +7 -8
- package/dist-esm/ChartInternal/shape/point.js +9 -9
- package/dist-esm/ChartInternal/shape/polar.js +3 -4
- package/dist-esm/ChartInternal/shape/radar.js +19 -7
- package/dist-esm/ChartInternal/shape/sankey.js +154 -0
- package/dist-esm/ChartInternal/shape/shape.js +15 -11
- package/dist-esm/ChartInternal/shape/treemap.js +8 -5
- package/dist-esm/canvas/CanvasAxisRenderer.js +28 -328
- package/dist-esm/canvas/CanvasEngine.js +2 -3
- package/dist-esm/canvas/CanvasPainter.js +2 -3
- package/dist-esm/canvas/CanvasRenderer.js +38 -408
- package/dist-esm/canvas/CanvasTheme.js +28 -8
- package/dist-esm/canvas/HitDetector.js +20 -24
- package/dist-esm/canvas/axisTicks.js +5 -6
- package/dist-esm/canvas/boxplot.js +201 -0
- package/dist-esm/canvas/bullet.js +212 -0
- package/dist-esm/canvas/classes.js +2 -3
- package/dist-esm/canvas/color.js +2 -3
- package/dist-esm/canvas/flow.js +190 -0
- package/dist-esm/canvas/geometry.js +2 -3
- package/dist-esm/canvas/grid.js +206 -0
- package/dist-esm/canvas/heatmap.js +141 -0
- package/dist-esm/canvas/labels.js +3 -4
- package/dist-esm/canvas/pointPattern.js +2 -3
- package/dist-esm/canvas/sankey.js +137 -0
- package/dist-esm/canvas/selection.js +473 -0
- package/dist-esm/canvas/subchart.js +814 -0
- package/dist-esm/canvas/treemap.js +100 -0
- package/dist-esm/canvas/util.js +2 -3
- package/dist-esm/config/Options/Options.js +3 -4
- package/dist-esm/config/Options/axis/axis.js +2 -3
- package/dist-esm/config/Options/axis/x.js +2 -3
- package/dist-esm/config/Options/axis/y.js +2 -3
- package/dist-esm/config/Options/axis/y2.js +14 -3
- package/dist-esm/config/Options/common/boost.js +2 -3
- package/dist-esm/config/Options/common/color.js +2 -3
- package/dist-esm/config/Options/common/grid.js +2 -3
- package/dist-esm/config/Options/common/legend.js +2 -3
- package/dist-esm/config/Options/common/main.js +2 -3
- package/dist-esm/config/Options/common/point.js +2 -3
- package/dist-esm/config/Options/common/title.js +2 -3
- package/dist-esm/config/Options/common/tooltip.js +2 -3
- package/dist-esm/config/Options/data/axis.js +2 -3
- package/dist-esm/config/Options/data/data.js +49 -4
- package/dist-esm/config/Options/data/selection.js +2 -3
- package/dist-esm/config/Options/interaction/interaction.js +2 -3
- package/dist-esm/config/Options/interaction/subchart.js +6 -3
- package/dist-esm/config/Options/interaction/zoom.js +2 -3
- package/dist-esm/config/Options/shape/arc.js +2 -3
- package/dist-esm/config/Options/shape/area.js +2 -3
- package/dist-esm/config/Options/shape/bar.js +2 -3
- package/dist-esm/config/Options/shape/boxplot.js +106 -0
- package/dist-esm/config/Options/shape/bubble.js +2 -3
- package/dist-esm/config/Options/shape/bullet.js +177 -0
- package/dist-esm/config/Options/shape/candlestick.js +2 -3
- package/dist-esm/config/Options/shape/donut.js +2 -3
- package/dist-esm/config/Options/shape/funnel.js +2 -3
- package/dist-esm/config/Options/shape/gauge.js +2 -3
- package/dist-esm/config/Options/shape/heatmap.js +137 -0
- package/dist-esm/config/Options/shape/line.js +2 -3
- package/dist-esm/config/Options/shape/pie.js +2 -3
- package/dist-esm/config/Options/shape/polar.js +2 -3
- package/dist-esm/config/Options/shape/radar.js +2 -3
- package/dist-esm/config/Options/shape/sankey.js +116 -0
- package/dist-esm/config/Options/shape/scatter.js +2 -3
- package/dist-esm/config/Options/shape/spline.js +2 -3
- package/dist-esm/config/Options/shape/treemap.js +2 -3
- package/dist-esm/config/Store/Element.js +2 -3
- package/dist-esm/config/Store/State.js +4 -4
- package/dist-esm/config/Store/Store.js +2 -3
- package/dist-esm/config/classes.js +2 -4
- package/dist-esm/config/config.js +2 -3
- package/dist-esm/config/const.js +31 -23
- package/dist-esm/config/resolver/axis.core.js +4 -5
- package/dist-esm/config/resolver/axis.js +2 -3
- package/dist-esm/config/resolver/canvas.js +113 -900
- package/dist-esm/config/resolver/canvasBoxplot.js +49 -0
- package/dist-esm/config/resolver/canvasBullet.js +29 -0
- package/dist-esm/config/resolver/canvasFlow.js +28 -0
- package/dist-esm/config/resolver/canvasGrid.js +27 -0
- package/dist-esm/config/resolver/canvasHeatmap.js +31 -0
- package/dist-esm/config/resolver/canvasSankey.js +31 -0
- package/dist-esm/config/resolver/canvasSelection.js +30 -0
- package/dist-esm/config/resolver/canvasShape.js +13 -12
- package/dist-esm/config/resolver/canvasSubchart.js +30 -0
- package/dist-esm/config/resolver/canvasType.js +48 -0
- package/dist-esm/config/resolver/category.js +3 -4
- package/dist-esm/config/resolver/customType.js +58 -0
- package/dist-esm/config/resolver/export.js +3 -4
- package/dist-esm/config/resolver/flow.js +5 -6
- package/dist-esm/config/resolver/grid.js +6 -7
- package/dist-esm/config/resolver/interaction/selection.js +6 -7
- package/dist-esm/config/resolver/interaction/subchart.js +6 -7
- package/dist-esm/config/resolver/interaction/zoom.js +6 -7
- package/dist-esm/config/resolver/regions.js +5 -6
- package/dist-esm/config/resolver/shape/arc.helpers.js +5 -6
- package/dist-esm/config/resolver/shape/area.js +3 -4
- package/dist-esm/config/resolver/shape/axis.helpers.js +2 -3
- package/dist-esm/config/resolver/shape/bar.js +5 -6
- package/dist-esm/config/resolver/shape/boxplot.js +30 -0
- package/dist-esm/config/resolver/shape/bubble.js +5 -6
- package/dist-esm/config/resolver/shape/bullet.js +23 -0
- package/dist-esm/config/resolver/shape/candlestick.js +5 -6
- package/dist-esm/config/resolver/shape/donut.js +2 -3
- package/dist-esm/config/resolver/shape/funnel.js +7 -6
- package/dist-esm/config/resolver/shape/gauge.js +4 -5
- package/dist-esm/config/resolver/shape/heatmap.js +23 -0
- package/dist-esm/config/resolver/shape/line.js +2 -3
- package/dist-esm/config/resolver/shape/pie.js +3 -4
- package/dist-esm/config/resolver/shape/polar.js +4 -5
- package/dist-esm/config/resolver/shape/radar.js +5 -6
- package/dist-esm/config/resolver/shape/sankey.js +23 -0
- package/dist-esm/config/resolver/shape/scatter.js +4 -5
- package/dist-esm/config/resolver/shape/treemap.js +4 -5
- package/dist-esm/core.js +5 -6
- package/dist-esm/index.canvas.js +13 -9
- package/dist-esm/index.esm.js +6 -2
- package/dist-esm/module/Cache.js +2 -3
- package/dist-esm/module/browser.js +2 -3
- package/dist-esm/module/dsv.js +2 -3
- package/dist-esm/module/error.js +23 -16
- package/dist-esm/module/generator.js +3 -4
- package/dist-esm/module/sanitize.js +2 -3
- package/dist-esm/module/util/brush.js +2 -3
- package/dist-esm/module/util/dom.js +3 -4
- package/dist-esm/module/util/object.js +13 -6
- package/dist-esm/module/util/type-checks.js +2 -3
- package/dist-esm/module/worker.js +2 -3
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +6 -10
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +10 -18
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +17 -45
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +10 -18
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +9 -16
- package/dist-esm/react/index.js +2 -3
- package/package.json +44 -44
- package/src/Chart/Chart.ts +1 -0
- package/src/Chart/api/chart.ts +2 -1
- package/src/Chart/api/flow.ts +20 -7
- package/src/Chart/api/focus.ts +3 -0
- package/src/Chart/api/subchart.ts +1 -1
- package/src/Chart/api/tooltip.ts +54 -15
- package/src/ChartInternal/Axis/AxisRenderer.ts +29 -20
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +45 -9
- package/src/ChartInternal/ChartInternal.ts +46 -19
- package/src/ChartInternal/data/IData.ts +13 -0
- package/src/ChartInternal/data/data.ts +26 -5
- package/src/ChartInternal/data/load.ts +2 -2
- package/src/ChartInternal/interactions/flow.ts +50 -19
- package/src/ChartInternal/interactions/interaction.ts +15 -11
- package/src/ChartInternal/internals/class.ts +3 -2
- package/src/ChartInternal/internals/domain.ts +4 -2
- package/src/ChartInternal/internals/format.ts +3 -1
- package/src/ChartInternal/internals/legend.ts +2 -1
- package/src/ChartInternal/internals/redraw.ts +18 -12
- package/src/ChartInternal/internals/size.ts +5 -3
- package/src/ChartInternal/internals/text.ts +24 -28
- package/src/ChartInternal/internals/tooltip.ts +59 -20
- package/src/ChartInternal/internals/transform.ts +2 -2
- package/src/ChartInternal/internals/type.ts +101 -9
- package/src/ChartInternal/shape/boxplot.ts +172 -0
- package/src/ChartInternal/shape/bullet.ts +323 -0
- package/src/ChartInternal/shape/core/boxplot.ts +241 -0
- package/src/ChartInternal/shape/core/bullet.ts +734 -0
- package/src/ChartInternal/shape/core/heatmap.ts +665 -0
- package/src/ChartInternal/shape/core/sankey.ts +782 -0
- package/src/ChartInternal/shape/funnel.ts +73 -2
- package/src/ChartInternal/shape/heatmap.ts +236 -0
- package/src/ChartInternal/shape/point.ts +6 -3
- package/src/ChartInternal/shape/radar.ts +30 -1
- package/src/ChartInternal/shape/sankey.ts +242 -0
- package/src/ChartInternal/shape/shape.ts +16 -4
- package/src/ChartInternal/shape/treemap.ts +10 -0
- package/src/Plugin/stanford/index.ts +1 -28
- package/src/canvas/CanvasAxisRenderer.ts +54 -596
- package/src/canvas/CanvasRenderer.ts +68 -640
- package/src/canvas/CanvasTheme.ts +92 -6
- package/src/canvas/HitDetector.ts +30 -28
- package/src/canvas/boxplot.ts +230 -0
- package/src/canvas/bullet.ts +269 -0
- package/src/canvas/flow.ts +237 -0
- package/src/canvas/grid.ts +359 -0
- package/src/canvas/heatmap.ts +147 -0
- package/src/canvas/labels.ts +3 -1
- package/src/canvas/sankey.ts +151 -0
- package/src/canvas/selection.ts +626 -0
- package/src/canvas/subchart.ts +1292 -0
- package/src/canvas/treemap.ts +142 -0
- package/src/config/Options/axis/y2.ts +13 -0
- package/src/config/Options/data/data.ts +47 -1
- package/src/config/Options/interaction/subchart.ts +4 -0
- package/src/config/Options/shape/boxplot.ts +95 -0
- package/src/config/Options/shape/bullet.ts +170 -0
- package/src/config/Options/shape/heatmap.ts +125 -0
- package/src/config/Options/shape/sankey.ts +108 -0
- package/src/config/Store/State.ts +2 -1
- package/src/config/classes.ts +0 -1
- package/src/config/const.ts +30 -21
- package/src/config/resolver/canvas.ts +147 -1293
- package/src/config/resolver/canvasBoxplot.ts +42 -0
- package/src/config/resolver/canvasBullet.ts +20 -0
- package/src/config/resolver/canvasFlow.ts +18 -0
- package/src/config/resolver/canvasGrid.ts +17 -0
- package/src/config/resolver/canvasHeatmap.ts +23 -0
- package/src/config/resolver/canvasSankey.ts +23 -0
- package/src/config/resolver/canvasSelection.ts +20 -0
- package/src/config/resolver/canvasShape.ts +6 -1
- package/src/config/resolver/canvasSubchart.ts +20 -0
- package/src/config/resolver/canvasType.ts +51 -0
- package/src/config/resolver/customType.ts +69 -0
- package/src/config/resolver/shape/boxplot.ts +31 -0
- package/src/config/resolver/shape/bullet.ts +18 -0
- package/src/config/resolver/shape/funnel.ts +8 -2
- package/src/config/resolver/shape/heatmap.ts +18 -0
- package/src/config/resolver/shape/index.ts +4 -0
- package/src/config/resolver/shape/sankey.ts +18 -0
- package/src/index.canvas.ts +9 -3
- package/src/index.esm.ts +4 -0
- package/src/index.ts +34 -0
- package/src/module/error.ts +32 -18
- package/src/module/util/object.ts +26 -1
- package/src/scss/billboard.scss +106 -0
- package/src/scss/theme/dark.scss +110 -0
- package/src/scss/theme/datalab.scss +106 -0
- package/src/scss/theme/graph.scss +106 -0
- package/src/scss/theme/insight.scss +106 -0
- package/src/scss/theme/modern.scss +106 -0
- package/types/bb.d.ts +4 -0
- package/types/canvas.d.ts +3 -0
- package/types/chart.d.ts +5 -0
- package/types/index.d.ts +4 -0
- package/types/options.d.ts +13 -1
- package/types/options.shape.d.ts +431 -0
- package/types/types.d.ts +4 -0
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
var Jf=Math.pow;/*!
|
|
2
2
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
3
|
* billboard.js project is licensed under the MIT license
|
|
4
4
|
*
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1
|
|
8
|
+
* @version 4.2.0-next.1
|
|
9
9
|
*
|
|
10
10
|
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
|
|
11
11
|
* - @types/d3-selection ^3.0.12
|
|
12
12
|
* - @types/d3-transition ^3.0.9
|
|
13
|
-
* - d3-axis ^3.0.
|
|
14
|
-
* - d3-brush ^3.0.
|
|
15
|
-
* - d3-drag ^3.0.
|
|
16
|
-
* - d3-hierarchy ^3.1.
|
|
17
|
-
* - d3-interpolate ^3.0.
|
|
18
|
-
* - d3-scale ^4.0.
|
|
19
|
-
* - d3-selection ^3.0.
|
|
20
|
-
* - d3-shape ^3.2.
|
|
21
|
-
* - d3-time-format ^4.1.
|
|
22
|
-
* - d3-transition ^3.0.
|
|
23
|
-
* - d3-zoom ^3.0.
|
|
24
|
-
*/(function(Es,ir){if(typeof exports=="object"&&typeof module=="object")module.exports=ir();else if(typeof define=="function"&&define.amd)define([],ir);else{var Cs=ir();for(var T in Cs)(typeof exports=="object"?exports:Es)[T]=Cs[T]}})(this,function(){return(function(){var Du=[(function(T,P,a){"use strict";a(1),a(100),a(101),a(102),a(103),a(104),a(105),a(106),a(107),a(108),a(109),a(110),a(111),a(112),a(113),a(114),a(115),a(116),a(130),a(131),a(133),a(143),a(144),a(145),a(147),a(151),a(154),a(156),a(158),a(159),a(160),a(161),a(163),a(164),a(166),a(167),a(169),a(173),a(174),a(175),a(176),a(181),a(182),a(184),a(185),a(186),a(187),a(191),a(192),a(193),a(194),a(195),a(200),a(202),a(203),a(204),a(207),a(208),a(209),a(210),a(211),a(212),a(223),a(225),a(226),a(228),a(229),a(232),a(235),a(241),a(242),a(243),a(244),a(245),a(246),a(250),a(251),a(253),a(254),a(256),a(257),a(259),a(260),a(261),a(262),a(263),a(267),a(268),a(274),a(275),a(276),a(277),a(279),a(280),a(281),a(282),a(283),a(284),a(285),a(286),a(291),a(292),a(293),a(294),a(94),a(296),a(297),a(304),a(306),a(307),a(308),a(310),a(311),a(312),a(313),a(314),a(316),a(317),a(318),a(319),a(320),a(321),a(323),a(324),a(325),a(326),a(327),a(328),a(329),a(330),a(331),a(334),a(335),a(337),a(339),a(340),a(341),a(342),a(343),a(345),a(347),a(348),a(349),a(350),a(352),a(353),a(355),a(356),a(357),a(358),a(360),a(361),a(362),a(363),a(364),a(365),a(366),a(367),a(368),a(370),a(371),a(372),a(373),a(374),a(375),a(376),a(377),a(378),a(379),a(380),a(382),a(383),a(384),a(385),a(409),a(410),a(411),a(412),a(413),a(414),a(421),a(422),a(423),a(424),a(425),a(426),a(427),a(429),a(430),a(431),a(432),a(433),a(434),a(435),a(436),a(437),a(438),a(446),a(448),a(449),a(451),a(452),a(453),a(454),a(455),a(457),a(467),a(469),a(471),a(473),a(475),a(478),a(480),a(481),a(483),a(486),a(487),a(488),a(489),a(490),a(494),a(495),a(497),a(498),a(499),a(500),a(502),a(503),a(504),a(505),a(506),a(507),a(508),a(510),a(513),a(516),a(519),a(520),a(521),a(522),a(523),a(524),a(525),a(526),a(527),a(528),a(529),a(530),a(531),a(539),a(540),a(541),a(542),a(543),a(544),a(545),a(546),a(547),a(548),a(549),a(550),a(551),a(553),a(554),a(555),a(556),a(557),a(558),a(559),a(560),a(561),a(562),a(563),a(564),a(565),a(566),a(567),a(568),a(569),a(570),a(571),a(572),a(573),a(574),a(575),a(576),a(577),a(578),a(579),a(583),a(585),a(587),a(588),a(589),a(590),a(591),a(594),a(596),a(599),a(601),a(602),a(603),a(606),a(607),a(609),a(610),a(611),a(615),a(616),a(617),a(618),a(621),a(627),a(628),a(629),a(630),a(631),a(632),a(633),a(80)}),(function(T,P,a){"use strict";a(2),a(91),a(93),a(94),a(99)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(8),x=a(14),y=a(36),b=a(6),A=a(26),I=a(7),R=a(38),O=a(24),M=a(46),L=a(12),D=a(18),N=a(68),F=a(11),G=a(71),j=a(73),X=a(57),U=a(75),V=a(66),k=a(5),Y=a(44),K=a(72),J=a(10),Z=a(47),_=a(77),at=a(34),et=a(53),rt=a(54),nt=a(40),ut=a(33),ht=a(78),pt=a(79),yt=a(81),At=a(82),Et=a(51),Ht=a(83).forEach,Ut=et("hidden"),kt="Symbol",Ct="prototype",It=Et.set,Dt=Et.getterFor(kt),Vt=Object[Ct],_t=g.Symbol,Nt=_t&&_t[Ct],Jt=g.RangeError,ne=g.TypeError,ve=g.QObject,le=k.f,fe=Y.f,Ce=U.f,Be=J.f,Ie=x([].push),ce=at("symbols"),xe=at("op-symbols"),Ue=at("wks"),Pt=!ve||!ve[Ct]||!ve[Ct].findChild,zt=function(Rt,Tt,wt){var Ft=le(Vt,Tt);return Ft&&delete Vt[Tt],fe(Rt,Tt,wt),Ft&&Rt!==Vt&&fe(Vt,Tt,Ft),Rt},jt=b&&I(function(){return G(fe({},"a",{get:function(){return fe(this,"a",{value:7}).a}})).a!==7})?zt:fe,we=function(Rt,Tt){var wt=ce[Rt]=G(Nt);return It(wt,{type:kt,tag:Rt,description:Tt}),b||(wt.description=Tt),wt},$t=function(Tt,wt,Ft){Tt===Vt&&$t(xe,wt,Ft),M(Tt);var Lt=D(wt);return M(Ft),R(ce,Lt)?(("enumerable"in Ft?!Ft.enumerable:!R(Tt,Lt)||R(Tt,Ut)&&Tt[Ut][Lt])?(R(Tt,Ut)||fe(Tt,Ut,F(1,G(null))),Tt[Ut][Lt]=!0):(R(Tt,Ut)&&Tt[Ut][Lt]&&(Tt[Ut][Lt]=!1),Ft=G(Ft,{enumerable:F(0,!1)})),jt(Tt,Lt,Ft)):fe(Tt,Lt,Ft)},Xt=function(Tt,wt){M(Tt);var Ft=L(wt),Lt=j(Ft).concat(vt(Ft));return Ht(Lt,function(ue){(!b||p(oe,Ft,ue))&&$t(Tt,ue,Ft[ue])}),Tt},re=function(Tt,wt){return wt===void 0?G(Tt):Xt(G(Tt),wt)},oe=function(Tt){var wt=D(Tt),Ft=p(Be,this,wt);return this===Vt&&R(ce,wt)&&!R(xe,wt)?!1:Ft||!R(this,wt)||!R(ce,wt)||R(this,Ut)&&this[Ut][wt]?Ft:!0},pe=function(Tt,wt){var Ft=L(Tt),Lt=D(wt);if(!(Ft===Vt&&R(ce,Lt)&&!R(xe,Lt))){var ue=le(Ft,Lt);return ue&&R(ce,Lt)&&!(R(Ft,Ut)&&Ft[Ut][Lt])&&(ue.enumerable=!0),ue}},rn=function(Tt){var wt=Ce(L(Tt)),Ft=[];return Ht(wt,function(Lt){!R(ce,Lt)&&!R(rt,Lt)&&Ie(Ft,Lt)}),Ft},vt=function(Rt){var Tt=Rt===Vt,wt=Ce(Tt?xe:L(Rt)),Ft=[];return Ht(wt,function(Lt){R(ce,Lt)&&(!Tt||R(Vt,Lt))&&Ie(Ft,ce[Lt])}),Ft};A||(_t=function(){if(O(Nt,this))throw new ne("Symbol is not a constructor");var Tt=!arguments.length||arguments[0]===void 0?void 0:N(arguments[0]),wt=nt(Tt),Ft=function(Lt){var ue=this===void 0?g:this;ue===Vt&&p(Ft,xe,Lt),R(ue,Ut)&&R(ue[Ut],wt)&&(ue[Ut][wt]=!1);var ye=F(1,Lt);try{jt(ue,wt,ye)}catch(Me){if(!(Me instanceof Jt))throw Me;zt(ue,wt,ye)}};return b&&Pt&&jt(Vt,wt,{configurable:!0,set:Ft}),we(wt,Tt)},Nt=_t[Ct],Z(Nt,"toString",function(){return Dt(this).tag}),Z(_t,"withoutSetter",function(Rt){return we(nt(Rt),Rt)}),J.f=oe,Y.f=$t,K.f=Xt,k.f=pe,X.f=U.f=rn,V.f=vt,ht.f=function(Rt){return we(ut(Rt),Rt)},b&&(_(Nt,"description",{configurable:!0,get:function(){return Dt(this).description}}),y||Z(Vt,"propertyIsEnumerable",oe,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!A,sham:!A},{Symbol:_t}),Ht(j(Ue),function(Rt){pt(Rt)}),v({target:kt,stat:!0,forced:!A},{useSetter:function(){Pt=!0},useSimple:function(){Pt=!1}}),v({target:"Object",stat:!0,forced:!A,sham:!b},{create:re,defineProperty:$t,defineProperties:Xt,getOwnPropertyDescriptor:pe}),v({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:rn}),yt(),At(_t,kt),rt[Ut]=!0}),(function(T,P,a){"use strict";var v=a(4),g=a(5).f,p=a(43),x=a(47),y=a(37),b=a(55),A=a(67);T.exports=function(I,R){var O=I.target,M=I.global,L=I.stat,D,N,F,G,j,X;if(M?N=v:L?N=v[O]||y(O,{}):N=v[O]&&v[O].prototype,N)for(F in R){if(j=R[F],I.dontCallGetSet?(X=g(N,F),G=X&&X.value):G=N[F],D=A(M?F:O+(L?".":"#")+F,I.forced),!D&&G!==void 0){if(typeof j==typeof G)continue;b(j,G)}(I.sham||G&&G.sham)&&p(j,"sham",!0),x(N,F,j,I)}}}),(function(T){"use strict";var P=function(a){return a&&a.Math===Math&&a};T.exports=P(typeof globalThis=="object"&&globalThis)||P(typeof window=="object"&&window)||P(typeof self=="object"&&self)||P(typeof global=="object"&&global)||P(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(T,P,a){"use strict";var v=a(6),g=a(8),p=a(10),x=a(11),y=a(12),b=a(18),A=a(38),I=a(41),R=Object.getOwnPropertyDescriptor;P.f=v?R:function(M,L){if(M=y(M),L=b(L),I)try{return R(M,L)}catch(D){}if(A(M,L))return x(!g(p.f,M,L),M[L])}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(T){"use strict";T.exports=function(P){try{return!!P()}catch(a){return!0}}}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype.call;T.exports=v?g.bind(g):function(){return g.apply(g,arguments)}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){var g=function(){}.bind();return typeof g!="function"||g.hasOwnProperty("prototype")})}),(function(T,P){"use strict";var a={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,g=v&&!a.call({1:2},1);P.f=g?function(x){var y=v(this,x);return!!y&&y.enumerable}:a}),(function(T){"use strict";T.exports=function(P,a){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:a}}}),(function(T,P,a){"use strict";var v=a(13),g=a(16);T.exports=function(p){return v(g(p))}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(15),x=Object,y=v("".split);T.exports=g(function(){return!x("z").propertyIsEnumerable(0)})?function(b){return p(b)==="String"?y(b,""):x(b)}:x}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype,p=g.call,x=v&&g.bind.bind(p,p);T.exports=v?x:function(y){return function(){return p.apply(y,arguments)}}}),(function(T,P,a){"use strict";var v=a(14),g=v({}.toString),p=v("".slice);T.exports=function(x){return p(g(x),8,-1)}}),(function(T,P,a){"use strict";var v=a(17),g=TypeError;T.exports=function(p){if(v(p))throw new g("Can't call method on "+p);return p}}),(function(T){"use strict";T.exports=function(P){return P==null}}),(function(T,P,a){"use strict";var v=a(19),g=a(22);T.exports=function(p){var x=v(p,"string");return g(x)?x:x+""}}),(function(T,P,a){"use strict";var v=a(8),g=a(20),p=a(22),x=a(29),y=a(32),b=a(33),A=TypeError,I=b("toPrimitive");T.exports=function(R,O){if(!g(R)||p(R))return R;var M=x(R,I),L;if(M){if(O===void 0&&(O="default"),L=v(M,R,O),!g(L)||p(L))return L;throw new A("Can't convert object to primitive value")}return O===void 0&&(O="number"),y(R,O)}}),(function(T,P,a){"use strict";var v=a(21);T.exports=function(g){return typeof g=="object"?g!==null:v(g)}}),(function(T){"use strict";var P=typeof document=="object"&&document.all;T.exports=typeof P=="undefined"&&P!==void 0?function(a){return typeof a=="function"||a===P}:function(a){return typeof a=="function"}}),(function(T,P,a){"use strict";var v=a(23),g=a(21),p=a(24),x=a(25),y=Object;T.exports=x?function(b){return typeof b=="symbol"}:function(b){var A=v("Symbol");return g(A)&&p(A.prototype,y(b))}}),(function(T,P,a){"use strict";var v=a(4),g=a(21),p=function(x){return g(x)?x:void 0};T.exports=function(x,y){return arguments.length<2?p(v[x]):v[x]&&v[x][y]}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v({}.isPrototypeOf)}),(function(T,P,a){"use strict";var v=a(26);T.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(T,P,a){"use strict";var v=a(27),g=a(7),p=a(4),x=p.String;T.exports=!!Object.getOwnPropertySymbols&&!g(function(){var y=Symbol("symbol detection");return!x(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&v&&v<41})}),(function(T,P,a){"use strict";var v=a(4),g=a(28),p=v.process,x=v.Deno,y=p&&p.versions||x&&x.version,b=y&&y.v8,A,I;b&&(A=b.split("."),I=A[0]>0&&A[0]<4?1:+(A[0]+A[1])),!I&&g&&(A=g.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=g.match(/Chrome\/(\d+)/),A&&(I=+A[1]))),T.exports=I}),(function(T,P,a){"use strict";var v=a(4),g=v.navigator,p=g&&g.userAgent;T.exports=p?String(p):""}),(function(T,P,a){"use strict";var v=a(30),g=a(17);T.exports=function(p,x){var y=p[x];return g(y)?void 0:v(y)}}),(function(T,P,a){"use strict";var v=a(21),g=a(31),p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not a function")}}),(function(T){"use strict";var P=String;T.exports=function(a){try{return P(a)}catch(v){return"Object"}}}),(function(T,P,a){"use strict";var v=a(8),g=a(21),p=a(20),x=TypeError;T.exports=function(y,b){var A,I;if(b==="string"&&g(A=y.toString)&&!p(I=v(A,y))||g(A=y.valueOf)&&!p(I=v(A,y))||b!=="string"&&g(A=y.toString)&&!p(I=v(A,y)))return I;throw new x("Can't convert object to primitive value")}}),(function(T,P,a){"use strict";var v=a(4),g=a(34),p=a(38),x=a(40),y=a(26),b=a(25),A=v.Symbol,I=g("wks"),R=b?A.for||A:A&&A.withoutSetter||x;T.exports=function(O){return p(I,O)||(I[O]=y&&p(A,O)?A[O]:R("Symbol."+O)),I[O]}}),(function(T,P,a){"use strict";var v=a(35),g=Object.create||Object;T.exports=function(p,x){return v[p]||(v[p]=x||g(null))}}),(function(T,P,a){"use strict";var v=a(36),g=a(4),p=a(37),x="__core-js_shared__",y=T.exports=g[x]||p(x,{});(y.versions||(y.versions=[])).push({version:"3.50.0",mode:v?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),(function(T){"use strict";T.exports=!1}),(function(T,P,a){"use strict";var v=a(4),g=Object.defineProperty;T.exports=function(p,x){try{g(v,p,{value:x,configurable:!0,writable:!0})}catch(y){v[p]=x}return x}}),(function(T,P,a){"use strict";var v=a(14),g=a(39),p=v({}.hasOwnProperty);T.exports=Object.hasOwn||function(y,b){return p(g(y),b)}}),(function(T,P,a){"use strict";var v=a(16),g=Object;T.exports=function(p){return g(v(p))}}),(function(T,P,a){"use strict";var v=a(14),g=0,p=Math.random(),x=v(1.1.toString);T.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+x(++g+p,36)}}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(42);T.exports=!v&&!g(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!==7})}),(function(T,P,a){"use strict";var v=a(4),g=a(20),p=v.document,x=g(p)&&g(p.createElement);T.exports=function(y){return x?p.createElement(y):{}}}),(function(T,P,a){"use strict";var v=a(6),g=a(44),p=a(11);T.exports=v?function(x,y,b){return g.f(x,y,p(1,b))}:function(x,y,b){return x[y]=b,x}}),(function(T,P,a){"use strict";var v=a(6),g=a(41),p=a(45),x=a(46),y=a(18),b=TypeError,A=Object.defineProperty,I=Object.getOwnPropertyDescriptor,R="enumerable",O="configurable",M="writable";P.f=v?p?function(D,N,F){if(x(D),N=y(N),x(F),typeof D=="function"&&N==="prototype"&&"value"in F&&M in F&&!F[M]){var G=I(D,N);G&&G[M]&&(D[N]=F.value,F={configurable:O in F?F[O]:G[O],enumerable:R in F?F[R]:G[R],writable:!1})}return A(D,N,F)}:A:function(D,N,F){if(x(D),N=y(N),x(F),g)try{return A(D,N,F)}catch(G){}if("get"in F||"set"in F)throw new b("Accessors not supported");return"value"in F&&(D[N]=F.value),D}}),(function(T,P,a){"use strict";var v=a(6),g=a(7);T.exports=v&&g(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(T,P,a){"use strict";var v=a(20),g=String,p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not an object")}}),(function(T,P,a){"use strict";var v=a(21),g=a(44),p=a(48),x=a(37);T.exports=function(y,b,A,I){I||(I={});var R=I.enumerable,O=I.name!==void 0?I.name:b;if(v(A)&&p(A,O,I),I.global)R?y[b]=A:x(b,A);else{try{I.unsafe?y[b]&&(R=!0):delete y[b]}catch(M){}R?y[b]=A:g.f(y,b,{value:A,enumerable:!1,configurable:!I.nonConfigurable,writable:!I.nonWritable})}return y}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(21),x=a(38),y=a(6),b=a(49).CONFIGURABLE,A=a(50),I=a(51),R=I.enforce,O=I.get,M=String,L=Object.defineProperty,D=v("".slice),N=v("".replace),F=v([].join),G=y&&!g(function(){return L(function(){},"length",{value:8}).length!==8}),j=String(String).split("String"),X=T.exports=function(U,V,k){D(M(V),0,7)==="Symbol("&&(V="["+N(M(V),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),k&&k.getter&&(V="get "+V),k&&k.setter&&(V="set "+V),(!x(U,"name")||b&&U.name!==V)&&(y?L(U,"name",{value:V,configurable:!0}):U.name=V),G&&k&&x(k,"arity")&&U.length!==k.arity&&L(U,"length",{value:k.arity});try{k&&x(k,"constructor")&&k.constructor?y&&L(U,"prototype",{writable:!1}):U.prototype&&(U.prototype=void 0)}catch(K){}var Y=R(U);return x(Y,"source")||(Y.source=F(j,typeof V=="string"?V:"")),U};Function.prototype.toString=X(function(){return p(this)&&O(this).source||A(this)},"toString")}),(function(T,P,a){"use strict";var v=a(6),g=a(38),p=Function.prototype,x=v&&Object.getOwnPropertyDescriptor,y=g(p,"name"),b=y&&function(){}.name==="something",A=y&&(!v||v&&x(p,"name").configurable);T.exports={EXISTS:y,PROPER:b,CONFIGURABLE:A}}),(function(T,P,a){"use strict";var v=a(14),g=a(21),p=a(35),x=v(Function.toString);g(p.inspectSource)||(p.inspectSource=function(y){return x(y)}),T.exports=p.inspectSource}),(function(T,P,a){"use strict";var v=a(52),g=a(4),p=a(20),x=a(43),y=a(38),b=a(35),A=a(53),I=a(54),R="Object already initialized",O=g.TypeError,M=g.WeakMap,L,D,N,F=function(U){return N(U)?D(U):L(U,{})},G=function(U){return function(V){var k;if(!p(V)||(k=D(V)).type!==U)throw new O("Incompatible receiver, "+U+" required");return k}};if(v||b.state){var j=b.state||(b.state=new M);j.get=j.get,j.has=j.has,j.set=j.set,L=function(U,V){if(j.has(U))throw new O(R);return V.facade=U,j.set(U,V),V},D=function(U){return j.get(U)||{}},N=function(U){return j.has(U)}}else{var X=A("state");I[X]=!0,L=function(U,V){if(y(U,X))throw new O(R);return V.facade=U,x(U,X,V),V},D=function(U){return y(U,X)?U[X]:{}},N=function(U){return y(U,X)}}T.exports={set:L,get:D,has:N,enforce:F,getterFor:G}}),(function(T,P,a){"use strict";var v=a(4),g=a(21),p=v.WeakMap;T.exports=g(p)&&/native code/.test(String(p))}),(function(T,P,a){"use strict";var v=a(34),g=a(40),p=v("keys");T.exports=function(x){return p[x]||(p[x]=g(x))}}),(function(T){"use strict";T.exports={}}),(function(T,P,a){"use strict";var v=a(38),g=a(56),p=a(5),x=a(44);T.exports=function(y,b,A){for(var I=g(b),R=x.f,O=p.f,M=0;M<I.length;M++){var L=I[M];!v(y,L)&&!(A&&v(A,L))&&R(y,L,O(b,L))}}}),(function(T,P,a){"use strict";var v=a(23),g=a(14),p=a(57),x=a(66),y=a(46),b=g([].concat);T.exports=v("Reflect","ownKeys")||function(I){var R=p.f(y(I)),O=x.f;return O?b(R,O(I)):R}}),(function(T,P,a){"use strict";var v=a(58),g=a(65),p=g.concat("length","prototype");P.f=Object.getOwnPropertyNames||function(y){return v(y,p)}}),(function(T,P,a){"use strict";var v=a(14),g=a(38),p=a(12),x=a(59).indexOf,y=a(54),b=v([].push);T.exports=function(A,I){var R=p(A),O=0,M=[],L;for(L in R)!g(y,L)&&g(R,L)&&b(M,L);for(;I.length>O;)g(R,L=I[O++])&&(~x(M,L)||b(M,L));return M}}),(function(T,P,a){"use strict";var v=a(12),g=a(60),p=a(63),x=function(y){return function(b,A,I){var R=v(b),O=p(R);if(O===0)return!y&&-1;var M=g(I,O),L;if(y&&A!==A){for(;O>M;)if(L=R[M++],L!==L)return!0}else for(;O>M;M++)if((y||M in R)&&R[M]===A)return y||M||0;return!y&&-1}};T.exports={includes:x(!0),indexOf:x(!1)}}),(function(T,P,a){"use strict";var v=a(61),g=Math.max,p=Math.min;T.exports=function(x,y){var b=v(x);return b<0?g(b+y,0):p(b,y)}}),(function(T,P,a){"use strict";var v=a(62);T.exports=function(g){var p=+g;return p!==p||p===0?0:v(p)}}),(function(T){"use strict";var P=Math.ceil,a=Math.floor;T.exports=Math.trunc||function(g){var p=+g;return(p>0?a:P)(p)}}),(function(T,P,a){"use strict";var v=a(64);T.exports=function(g){return v(g.length)}}),(function(T,P,a){"use strict";var v=a(61),g=Math.min;T.exports=function(p){var x=v(p);return x>0?g(x,9007199254740991):0}}),(function(T){"use strict";T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(T,P){"use strict";P.f=Object.getOwnPropertySymbols}),(function(T,P,a){"use strict";var v=a(7),g=a(21),p=/#|\.prototype\./,x=function(R,O){var M=b[y(R)];return M===I?!0:M===A?!1:g(O)?v(O):!!O},y=x.normalize=function(R){return String(R).replace(p,".").toLowerCase()},b=x.data={},A=x.NATIVE="N",I=x.POLYFILL="P";T.exports=x}),(function(T,P,a){"use strict";var v=a(69),g=String;T.exports=function(p){if(v(p)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return g(p)}}),(function(T,P,a){"use strict";var v=a(70),g=a(21),p=a(15),x=a(33),y=x("toStringTag"),b=Object,A=p((function(){return arguments})())==="Arguments",I=function(R,O){try{return R[O]}catch(M){}};T.exports=v?p:function(R){var O,M,L;return R===void 0?"Undefined":R===null?"Null":typeof(M=I(O=b(R),y))=="string"?M:A?p(O):(L=p(O))==="Object"&&g(O.callee)?"Arguments":L}}),(function(T,P,a){"use strict";var v=a(33),g=v("toStringTag"),p={};p[g]="z",T.exports=String(p)==="[object z]"}),(function(T,P,a){"use strict";var v=a(46),g=a(72),p=a(65),x=a(54),y=a(74),b=a(42),A=a(53),I=">",R="<",O="prototype",M="script",L=A("IE_PROTO"),D=function(){},N=function(U){return R+M+I+U+R+"/"+M+I},F=function(U){U.write(N("")),U.close();var V=U.parentWindow.Object;return U=null,V},G=function(){var U=b("iframe"),V="java"+M+":",k;return U.style.display="none",y.appendChild(U),U.src=String(V),k=U.contentWindow.document,k.open(),k.write(N("document.F=Object")),k.close(),k.F},j,X=function(){try{j=new ActiveXObject("htmlfile")}catch(V){}X=typeof document!="undefined"?document.domain&&j?F(j):G():F(j);for(var U=p.length;U--;)delete X[O][p[U]];return X()};x[L]=!0,T.exports=Object.create||function(V,k){var Y;return V!==null?(D[O]=v(V),Y=new D,D[O]=null,Y[L]=V):Y=X(),k===void 0?Y:g.f(Y,k)}}),(function(T,P,a){"use strict";var v=a(6),g=a(45),p=a(44),x=a(46),y=a(12),b=a(73);P.f=v&&!g?Object.defineProperties:function(I,R){x(I);for(var O=y(R),M=b(R),L=M.length,D=0,N;L>D;)p.f(I,N=M[D++],O[N]);return I}}),(function(T,P,a){"use strict";var v=a(58),g=a(65);T.exports=Object.keys||function(x){return v(x,g)}}),(function(T,P,a){"use strict";var v=a(23);T.exports=v("document","documentElement")}),(function(T,P,a){"use strict";var v=a(15),g=a(12),p=a(57).f,x=a(76),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(A){try{return p(A)}catch(I){return x(y)}};T.exports.f=function(I){return y&&v(I)==="Window"?b(I):p(g(I))}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v([].slice)}),(function(T,P,a){"use strict";var v=a(48),g=a(44);T.exports=function(p,x,y){return y.get&&v(y.get,x,{getter:!0}),y.set&&v(y.set,x,{setter:!0}),g.f(p,x,y)}}),(function(T,P,a){"use strict";var v=a(33);P.f=v}),(function(T,P,a){"use strict";var v=a(80),g=a(38),p=a(78),x=a(44).f;T.exports=function(y){var b=v.Symbol||(v.Symbol={});g(b,y)||x(b,y,{value:p.f(y)})}}),(function(T,P,a){"use strict";var v=a(4);T.exports=v}),(function(T,P,a){"use strict";var v=a(8),g=a(23),p=a(33),x=a(47);T.exports=function(){var y=g("Symbol"),b=y&&y.prototype,A=b&&b.valueOf,I=p("toPrimitive");b&&!b[I]&&x(b,I,function(R){return v(A,this)},{arity:1})}}),(function(T,P,a){"use strict";var v=a(44).f,g=a(38),p=a(33),x=p("toStringTag");T.exports=function(y,b,A){y&&!A&&(y=y.prototype),y&&!g(y,x)&&v(y,x,{configurable:!0,value:b})}}),(function(T,P,a){"use strict";var v=a(84),g=a(13),p=a(39),x=a(63),y=a(86),b=a(90),A=function(I){var R=I===1,O=I===2,M=I===3,L=I===4,D=I===6,N=I===7,F=I===5||D;return function(G,j,X){for(var U=p(G),V=g(U),k=x(V),Y=v(j,X),K=0,J=0,Z=R?y(G,k):O||N?y(G,0):void 0,_,at;k>K;K++)if((F||K in V)&&(_=V[K],at=Y(_,K,U),I))if(R)b(Z,K,at);else if(at)switch(I){case 3:return!0;case 5:return _;case 6:return K;case 2:b(Z,J++,_)}else switch(I){case 4:return!1;case 7:b(Z,J++,_)}return D?-1:M||L?L:Z}};T.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}}),(function(T,P,a){"use strict";var v=a(85),g=a(30),p=a(9),x=v(v.bind);T.exports=function(y,b){return g(y),b===void 0?y:p?x(y,b):function(){return y.apply(b,arguments)}}}),(function(T,P,a){"use strict";var v=a(15),g=a(14);T.exports=function(p){if(v(p)==="Function")return g(p)}}),(function(T,P,a){"use strict";var v=a(87);T.exports=function(g,p){return new(v(g))(p===0?0:p)}}),(function(T,P,a){"use strict";var v=a(88),g=a(89),p=a(20),x=a(33),y=x("species"),b=Array;T.exports=function(A){var I;return v(A)&&(I=A.constructor,g(I)&&(I===b||v(I.prototype))?I=void 0:p(I)&&(I=I[y],I===null&&(I=void 0))),I===void 0?b:I}}),(function(T,P,a){"use strict";var v=a(15);T.exports=Array.isArray||function(p){return v(p)==="Array"}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(21),x=a(69),y=a(23),b=a(50),A=function(){},I=y("Reflect","construct"),R=/^\s*(?:class|function)\b/,O=v(R.exec),M=!R.test(A),L=function(F){if(!p(F))return!1;try{return I(A,[],F),!0}catch(G){return!1}},D=function(F){if(!p(F))return!1;switch(x(F)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!O(R,b(F))}catch(G){return!0}};D.sham=!0,T.exports=!I||g(function(){var N;return L(L.call)||!L(Object)||!L(function(){N=!0})||N})?D:L}),(function(T,P,a){"use strict";var v=a(6),g=a(44),p=a(11);T.exports=function(x,y,b){v?g.f(x,y,p(0,b)):x[y]=b}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(38),x=a(68),y=a(34),b=a(92),A=y("string-to-symbol-registry"),I=y("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!b},{for:function(R){var O=x(R);if(p(A,O))return A[O];var M=g("Symbol")(O);return A[O]=M,I[M]=O,M}})}),(function(T,P,a){"use strict";var v=a(26);T.exports=v&&!!Symbol.for&&!!Symbol.keyFor}),(function(T,P,a){"use strict";var v=a(3),g=a(38),p=a(22),x=a(31),y=a(34),b=a(92),A=y("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!b},{keyFor:function(R){if(!p(R))throw new TypeError(x(R)+" is not a symbol");if(g(A,R))return A[R]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(8),x=a(14),y=a(7),b=a(88),A=a(21),I=a(20),R=a(71),O=a(95),M=a(22),L=a(15),D=a(96),N=a(59).includes,F=a(38),G=a(68),j=a(97),X=a(40),U=a(26),V=a(98),k=String,Y=TypeError,K=g("JSON","stringify"),J=g("BigInt"),Z=x("".valueOf),_=x((!0).valueOf),at=J&&x(J.prototype.valueOf),et=x(/./.exec),rt=x("".charAt),nt=x("".charCodeAt),ut=x("".replace),ht=x("".slice),pt=x([].push),yt=x([].pop),At=x(1.1.toString),Et=/[\uD800-\uDFFF]/g,Ht=/^[\uD800-\uDBFF]$/,Ut=/^[\uDC00-\uDFFF]$/,kt=/^\d+$/,Ct=X(),It=X(),Dt=X(),Vt=Ct.length,_t=It.length,Nt=!U||y(function(){var Pt=g("Symbol")("stringify detection");return K([Pt])!=="[null]"||K({a:Pt})!=="{}"||K(Object(Pt))!=="{}"}),Jt=y(function(){return K("\uDF06\uD834")!=='"\\udf06\\ud834"'||K("\uDEAD")!=='"\\udead"'}),ne=V?g("JSON","isRawJSON"):O,ve=Nt?function(Pt,zt,jt){return K(Pt,function(we,$t){var Xt=p(zt,this,we,$t);if(!M(Xt))return Xt},jt)}:K,le=function(Pt,zt,jt){var we=rt(jt,zt-1),$t=rt(jt,zt+1);return et(Ht,Pt)&&!et(Ut,$t)||et(Ut,Pt)&&!et(Ht,we)?"\\u"+At(nt(Pt,0),16):Pt},fe=function(Pt){if(b(Pt)){for(var zt=Pt.length,jt=[],we=R(null),$t=0;$t<zt;$t++){var Xt=Pt[$t],re;if(typeof Xt=="string")re=Xt;else if(typeof Xt=="number"||L(Xt)==="Number"||L(Xt)==="String")re=G(Xt);else continue;F(we,re)||(we[re]=!0,pt(jt,re))}return jt}},Ce=function(Pt,zt){try{return Pt(zt),!0}catch(jt){return!1}},Be=function(Pt){var zt=L(Pt);return zt==="Number"&&Ce(D,Pt)||zt==="String"&&Ce(Z,Pt)||zt==="Boolean"&&Ce(_,Pt)||!!at&&zt==="BigInt"&&Ce(at,Pt)},Ie=function(Pt){if(!I(Pt)||A(Pt)||b(Pt))return!1;try{return!Be(Pt)}catch(zt){return!0}},ce=function(Pt,zt){return{toJSON:function(){var jt=Pt[zt];if(I(jt)||typeof jt=="bigint"){var we=jt.toJSON;A(we)&&(jt=p(we,jt,zt))}return jt}}},xe=function(Pt){for(var zt=0,jt=Pt.length;zt<jt;zt++)if(et(kt,Pt[zt]))return It;return""},Ue=function(Pt,zt,jt){for(var we=R(null),$t=0,Xt=zt.length;$t<Xt;$t++){var re=zt[$t];we[jt+re]=ce(Pt,re)}return we[Dt]=null,we};K&&v({target:"JSON",stat:!0,arity:3,forced:Nt||Jt||!V},{stringify:function(zt,jt,we){var $t=A(jt)?jt:void 0,Xt=$t?void 0:fe(jt),re=Xt&&xe(Xt),oe=[],pe=[],rn=[],vt,Rt=!1,Tt=!0,wt=ve(zt,function(tn,Ve){if(tn=k(tn),Xt){if(tn===Dt){yt(pe),vt=yt(rn);return}if(Tt)Tt=!1;else if(this!==vt&&!b(this)&&!N(Xt,tn))return}else $t&&(Ve=p($t,this,tn,Ve));if(ne(Ve))return V?Ve:(Rt=!0,Ct+(pt(oe,Ve.rawJSON)-1));if(Xt&&Ie(Ve)){if(N(pe,Ve))throw new Y("Converting circular structure to JSON");var _n=Ue(Ve,Xt,re);return pt(pe,Ve),pt(rn,vt),vt=_n,re&&(Rt=!0),_n}return Ve},we);if(typeof wt!="string"||(Jt&&(wt=ut(wt,Et,le)),!Rt))return wt;for(var Ft="",Lt=wt.length,ue=0;ue<Lt;ue++){var ye=rt(wt,ue);if(ye==='"'){var Me=j(wt,++ue).end-1,Fe=ht(wt,ue,Me);ht(Fe,0,Vt)===Ct?Ft+=oe[ht(Fe,Vt)]:ht(Fe,0,_t)===It?Ft+='"'+ht(Fe,_t)+'"':Ft+='"'+Fe+'"',ue=Me}else Ft+=ye}return Ft}})}),(function(T,P,a){"use strict";var v=a(20),g=a(51).get;T.exports=function(x){if(!v(x))return!1;var y=g(x);return!!y&&y.type==="RawJSON"}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v(1.1.valueOf)}),(function(T,P,a){"use strict";var v=a(14),g=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,b=v("".charAt),A=v("".slice),I=v(/./.exec),R={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
25
|
-
`,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;T.exports=function(L,D){for(var N=!0,F="";D<L.length;){var G=b(L,D);if(G==="\\"){var j=A(L,D,D+2);if(g(R,j))F+=R[j],D+=2;else if(j==="\\u"){D+=2;var X=A(L,D,D+4);if(!I(O,X))throw new p("Bad Unicode escape at: "+D);F+=y(x(X,16)),D+=4}else throw new p('Unknown escape sequence: "'+j+'"')}else if(G==='"'){N=!1,D++;break}else{if(I(M,G))throw new p("Bad control character in string literal at: "+D);F+=G,D++}}if(N)throw new p("Unterminated string at: "+D);return{value:F,end:D}}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){var g="9007199254740993",p=JSON.rawJSON(g);return!JSON.isRawJSON(p)||JSON.stringify(p)!==g})}),(function(T,P,a){"use strict";var v=a(3),g=a(26),p=a(7),x=a(66),y=a(39),b=!g||p(function(){x.f(1)});v({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(I){var R=x.f;return R?R(y(I)):[]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(4),x=a(8),y=a(14),b=a(38),A=a(21),I=a(24),R=a(68),O=a(77),M=a(55),L=p.Symbol,D=L&&L.prototype;if(g&&A(L)&&(!("description"in D)||L().description!==void 0)){var N={},F=function(){var J=arguments.length<1||arguments[0]===void 0?void 0:R(arguments[0]),Z=I(D,this)?new L(J):J===void 0?L():L(J);return J===""&&(N[Z]=!0),Z};M(F,L);var G=F.for;F.for=function(K){var J=R(K),Z=x(G,this,J);return J===""&&(N[Z]=!0),Z},F.prototype=D,D.constructor=F;var j=String(L("description detection"))==="Symbol(description detection)",X=y(D.valueOf),U=y(D.toString),V=/^Symbol\((.*)\)[^)]+$/,k=y("".replace),Y=y("".slice);O(D,"description",{configurable:!0,get:function(){var J=X(this);if(b(N,J))return"";var Z=U(J),_=j?Y(Z,7,-1):k(Z,V,"$1");return _===""?void 0:_}}),v({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(T,P,a){"use strict";var v=a(4),g=a(79),p=a(44).f,x=a(5).f,y=v.Symbol;if(g("asyncDispose"),y){var b=x(y,"asyncDispose");b.enumerable&&b.configurable&&b.writable&&p(y,"asyncDispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){"use strict";var v=a(79);v("asyncIterator")}),(function(T,P,a){"use strict";var v=a(4),g=a(79),p=a(44).f,x=a(5).f,y=v.Symbol;if(g("dispose"),y){var b=x(y,"dispose");b.enumerable&&b.configurable&&b.writable&&p(y,"dispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){"use strict";var v=a(79);v("hasInstance")}),(function(T,P,a){"use strict";var v=a(79);v("isConcatSpreadable")}),(function(T,P,a){"use strict";var v=a(79);v("iterator")}),(function(T,P,a){"use strict";var v=a(79);v("match")}),(function(T,P,a){"use strict";var v=a(79);v("matchAll")}),(function(T,P,a){"use strict";var v=a(79);v("replace")}),(function(T,P,a){"use strict";var v=a(79);v("search")}),(function(T,P,a){"use strict";var v=a(79);v("species")}),(function(T,P,a){"use strict";var v=a(79);v("split")}),(function(T,P,a){"use strict";var v=a(79),g=a(81);v("toPrimitive"),g()}),(function(T,P,a){"use strict";var v=a(23),g=a(79),p=a(82);g("toStringTag"),p(v("Symbol"),"Symbol")}),(function(T,P,a){"use strict";var v=a(79);v("unscopables")}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(117),x=a(118),y="WebAssembly",b=g[y],A=new Error("e",{cause:7}).cause!==7,I=function(O,M){var L={};L[O]=x(O,M,A),v({global:!0,constructor:!0,arity:1,forced:A},L)},R=function(O,M){if(b&&b[O]){var L={};L[O]=x(y+"."+O,M,A),v({target:y,stat:!0,constructor:!0,arity:1,forced:A},L)}};I("Error",function(O){return function(L){return p(O,this,arguments)}}),I("EvalError",function(O){return function(L){return p(O,this,arguments)}}),I("RangeError",function(O){return function(L){return p(O,this,arguments)}}),I("ReferenceError",function(O){return function(L){return p(O,this,arguments)}}),I("SyntaxError",function(O){return function(L){return p(O,this,arguments)}}),I("TypeError",function(O){return function(L){return p(O,this,arguments)}}),I("URIError",function(O){return function(L){return p(O,this,arguments)}}),R("CompileError",function(O){return function(L){return p(O,this,arguments)}}),R("LinkError",function(O){return function(L){return p(O,this,arguments)}}),R("RuntimeError",function(O){return function(L){return p(O,this,arguments)}})}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype,p=g.apply,x=g.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(v?x.bind(p):function(){return x.apply(p,arguments)})}),(function(T,P,a){"use strict";var v=a(23),g=a(38),p=a(43),x=a(24),y=a(119),b=a(55),A=a(123),I=a(124),R=a(125),O=a(126),M=a(127),L=a(6),D=a(36);T.exports=function(N,F,G,j){var X="stackTraceLimit",U=j?2:1,V=N.split("."),k=V[V.length-1],Y=v.apply(null,V);if(Y){var K=Y.prototype;if(!D&&g(K,"cause")&&delete K.cause,!G)return Y;var J=v("Error"),Z=F(function(_,at){var et=R(j?at:_,void 0),rt=j?new Y(_):new Y;return et!==void 0&&p(rt,"message",et),M(rt,Z,rt.stack,2),this&&x(K,this)&&I(rt,this,Z),arguments.length>U&&O(rt,arguments[U]),rt});if(Z.prototype=K,k!=="Error"?y?y(Z,J):b(Z,J,{name:!0}):L&&X in Y&&(A(Z,Y,X),A(Z,Y,"prepareStackTrace")),b(Z,Y),!D)try{K.name!==k&&p(K,"name",k),K.constructor=Z}catch(_){}return Z}}}),(function(T,P,a){"use strict";var v=a(120),g=a(20),p=a(16),x=a(121);T.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var y=!1,b={},A;try{A=v(Object.prototype,"__proto__","set"),A(b,[]),y=b instanceof Array}catch(I){}return function(R,O){return p(R),x(O),g(R)&&(y?A(R,O):R.__proto__=O),R}})():void 0)}),(function(T,P,a){"use strict";var v=a(14),g=a(30);T.exports=function(p,x,y){try{return v(g(Object.getOwnPropertyDescriptor(p,x)[y]))}catch(b){}}}),(function(T,P,a){"use strict";var v=a(122),g=String,p=TypeError;T.exports=function(x){if(v(x))return x;throw new p("Can't set "+g(x)+" as a prototype")}}),(function(T,P,a){"use strict";var v=a(20);T.exports=function(g){return v(g)||g===null}}),(function(T,P,a){"use strict";var v=a(44).f;T.exports=function(g,p,x){x in g||v(g,x,{configurable:!0,get:function(){return p[x]},set:function(y){p[x]=y}})}}),(function(T,P,a){"use strict";var v=a(21),g=a(20),p=a(119);T.exports=function(x,y,b){var A,I;return p&&v(A=y.constructor)&&A!==b&&g(I=A.prototype)&&I!==b.prototype&&p(x,I),x}}),(function(T,P,a){"use strict";var v=a(68);T.exports=function(g,p){return g===void 0?arguments.length<2?"":p:v(g)}}),(function(T,P,a){"use strict";var v=a(20),g=a(43);T.exports=function(p,x){v(x)&&"cause"in x&&g(p,"cause",x.cause)}}),(function(T,P,a){"use strict";var v=a(43),g=a(128),p=a(129),x=Error.captureStackTrace;T.exports=function(y,b,A,I){p&&(x?x(y,b):v(y,"stack",g(A,I)))}}),(function(T,P,a){"use strict";var v=a(14),g=Error,p=v("".replace),x=(function(A){return String(new g(A).stack)})("zxcasd"),y=/\n\s*at [^:]*:[^\n]*/,b=y.test(x);T.exports=function(A,I){if(b&&typeof A=="string"&&!g.prepareStackTrace)for(;I--;)A=p(A,y,"");return A}}),(function(T,P,a){"use strict";var v=a(7),g=a(11);T.exports=!v(function(){var p=new Error("a");return"stack"in p?(Object.defineProperty(p,"stack",g(1,7)),p.stack!==7):!0})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(20),x=a(69),y=a(7),b="Error",A="DOMException",I=Object.setPrototypeOf||{}.__proto__,R=g(A),O=Error,M=O.isError,L=!M||!I||y(function(){return R&&!M(new R(A))||!M(new O(b,{cause:function(){}}))||M(g("Object","create")(O.prototype))});v({target:"Error",stat:!0,sham:!0,forced:L},{isError:function(N){if(!p(N))return!1;var F=x(N);return F===b||F===A}})}),(function(T,P,a){"use strict";var v=a(47),g=a(132),p=Error.prototype;p.toString!==g&&v(p,"toString",g)}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(46),x=a(125),y=Error.prototype.toString,b=g(function(){if(v){var A=Object.create(Object.defineProperty({},"name",{get:function(){return this===A}}));if(y.call(A)!=="true")return!0}return y.call({message:1,name:2})!=="2: 1"||y.call({})!=="Error"});T.exports=b?function(){var I=p(this),R=x(I.name,"Error"),O=x(I.message);return R?O?R+": "+O:R:O}:y}),(function(T,P,a){"use strict";a(134)}),(function(T,P,a){"use strict";var v=a(3),g=a(24),p=a(135),x=a(119),y=a(55),b=a(71),A=a(43),I=a(11),R=a(126),O=a(127),M=a(137),L=a(125),D=a(33),N=D("toStringTag"),F=Error,G=[].push,j=function(V,k){var Y=g(X,this),K;x?K=x(new F,Y?p(this):X):(K=Y?this:b(X),A(K,N,"Error")),k!==void 0&&A(K,"message",L(k)),O(K,j,K.stack,1),arguments.length>2&&R(K,arguments[2]);var J=[];return M(V,G,{that:J}),A(K,"errors",J),K};x?x(j,F):y(j,F,{name:!0});var X=j.prototype=b(F.prototype,{constructor:I(1,j),message:I(1,""),name:I(1,"AggregateError")});v({global:!0,constructor:!0,arity:2},{AggregateError:j})}),(function(T,P,a){"use strict";var v=a(38),g=a(21),p=a(39),x=a(53),y=a(136),b=x("IE_PROTO"),A=Object,I=A.prototype;T.exports=y?A.getPrototypeOf:function(R){var O=p(R);if(v(O,b))return O[b];var M=O.constructor;return g(M)&&O instanceof M?M.prototype:O instanceof A?I:null}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(46),x=a(31),y=a(138),b=a(63),A=a(24),I=a(140),R=a(141),O=a(142),M=TypeError,L=function(N,F){this.stopped=N,this.result=F},D=L.prototype;T.exports=function(N,F,G){var j=G&&G.that,X=!!(G&&G.AS_ENTRIES),U=!!(G&&G.IS_RECORD),V=!!(G&&G.IS_ITERATOR),k=!!(G&&G.INTERRUPTED),Y=v(F,j),K,J,Z,_,at,et,rt,nt=function(pt){var yt=K;return K=void 0,yt&&O(yt,"normal"),new L(!0,pt)},ut=function(pt){return X?(p(pt),k?Y(pt[0],pt[1],nt):Y(pt[0],pt[1])):k?Y(pt,nt):Y(pt)};if(U)K=N.iterator;else if(V)K=N;else{if(J=R(N),!J)throw new M(x(N)+" is not iterable");if(y(J)){for(Z=0,_=b(N);_>Z;Z++)if(at=ut(N[Z]),at&&A(D,at))return at;return new L(!1)}K=I(N,J)}for(et=U?N.next:K.next;!(rt=g(et,K)).done;){var ht=rt.value;try{at=ut(ht)}catch(pt){if(K)O(K,"throw",pt);else throw pt}if(typeof at=="object"&&at&&A(D,at))return at}return new L(!1)}}),(function(T,P,a){"use strict";var v=a(33),g=a(139),p=v("iterator"),x=Array.prototype;T.exports=function(y){return y!==void 0&&(g.Array===y||x[p]===y)}}),(function(T){"use strict";T.exports=Object.create?Object.create(null):{}}),(function(T,P,a){"use strict";var v=a(8),g=a(21),p=a(46),x=a(31),y=a(141),b=TypeError;T.exports=function(A,I){var R=arguments.length<2?y(A):I;if(g(R))return p(v(R,A));throw new b(x(A)+" is not iterable")}}),(function(T,P,a){"use strict";var v=a(15),g=a(17),p=a(29),x=a(33),y=x("iterator"),b=Array.prototype;T.exports=function(A){if(!g(A))return p(A,y)||p(A,"@@iterator")||(v(A)==="Arguments"?b[y]:void 0)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(29);T.exports=function(x,y,b){var A,I;g(x);try{if(A=p(x,"return"),!A){if(y==="throw")throw b;return b}A=v(A,x)}catch(R){I=!0,A=R}if(y==="throw")throw b;if(I)throw A;return g(A),b}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(117),x=a(7),y=a(118),b="AggregateError",A=g(b),I=!x(function(){return A([1]).errors[0]!==1})&&x(function(){return A([1],b,{cause:7}).cause!==7});v({global:!0,constructor:!0,arity:2,forced:I},{AggregateError:y(b,function(R){return function(M,L){return p(R,this,arguments)}},I,!0)})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(24),x=a(135),y=a(119),b=a(55),A=a(71),I=a(43),R=a(11),O=a(127),M=a(125),L=a(33),D=a(7),N=a(36),F=g.SuppressedError,G=L("toStringTag"),j=Error,X=!!F&&F.length!==3,U=!!F&&D(function(){return new F(1,2,3,{cause:4}).cause===4}),V=X||U,k=function(J,Z,_){var at=p(Y,this),et;return y?et=V&&(!at||x(this)===Y)?new F:y(new j,at?x(this):Y):(et=at?this:A(Y),I(et,G,"Error")),_!==void 0&&I(et,"message",M(_)),O(et,k,et.stack,1),I(et,"error",J),I(et,"suppressed",Z),et};y?y(k,j):b(k,j,{name:!0});var Y=k.prototype=V?F.prototype:A(j.prototype,{constructor:R(1,k),message:R(1,""),name:R(1,"SuppressedError")});V&&!N&&(Y.constructor=k),v({global:!0,constructor:!0,arity:3,forced:V},{SuppressedError:k})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(61),y=a(146);v({target:"Array",proto:!0},{at:function(A){var I=g(this),R=p(I),O=x(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]}}),y("at")}),(function(T,P,a){"use strict";var v=a(33),g=a(71),p=a(44).f,x=v("unscopables"),y=Array.prototype;y[x]===void 0&&p(y,x,{configurable:!0,value:g(null)}),T.exports=function(b){y[x][b]=!0}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(88),x=a(20),y=a(39),b=a(63),A=a(148),I=a(90),R=a(149),O=a(86),M=a(150),L=a(33),D=a(27),N=L("isConcatSpreadable"),F=D>=51||!g(function(){var X=[];return X[N]=!1,X.concat()[0]!==X}),G=function(X){if(!x(X))return!1;var U=X[N];return U!==void 0?!!U:p(X)},j=!F||!M("concat");v({target:"Array",proto:!0,arity:1,forced:j},{concat:function(U){var V=y(this),k=O(V,0),Y=0,K,J,Z,_,at;for(K=-1,Z=arguments.length;K<Z;K++)if(at=K===-1?V:arguments[K],G(at))for(_=b(at),A(Y+_),J=0;J<_;J++,Y++)J in at&&I(k,Y,at[J]);else A(Y+1),I(k,Y++,at);return R(k,Y),k}})}),(function(T){"use strict";var P=TypeError,a=9007199254740991;T.exports=function(v){if(v>a)throw new P("Maximum allowed index exceeded");return v}}),(function(T,P,a){"use strict";var v=a(6),g=a(88),p=TypeError,x=Object.getOwnPropertyDescriptor,y=v&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}})();T.exports=y?function(b,A){if(g(b)&&!x(b,"length").writable)throw new p("Cannot set read only .length");return b.length=A}:function(b,A){return b.length=A}}),(function(T,P,a){"use strict";var v=a(7),g=a(33),p=a(27),x=g("species");T.exports=function(y){return p>=51||!v(function(){var b=[],A=b.constructor={};return A[x]=function(){return{foo:1}},b[y](Boolean).foo!==1})}}),(function(T,P,a){"use strict";var v=a(3),g=a(152),p=a(146);v({target:"Array",proto:!0},{copyWithin:g}),p("copyWithin")}),(function(T,P,a){"use strict";var v=a(39),g=a(60),p=a(63),x=a(153),y=Math.min;T.exports=[].copyWithin||function(A,I){var R=v(this),O=p(R),M=g(A,O),L=g(I,O),D=arguments.length>2?arguments[2]:void 0,N=y((D===void 0?O:g(D,O))-L,O-M),F=1;for(L<M&&M<L+N&&(F=-1,L+=N-1,M+=N-1);N-- >0;)L in R?R[M]=R[L]:x(R,M),M+=F,L+=F;return R}}),(function(T,P,a){"use strict";var v=a(31),g=TypeError;T.exports=function(p,x){if(!delete p[x])throw new g("Cannot delete property "+v(x)+" of "+v(p))}}),(function(T,P,a){"use strict";var v=a(3),g=a(83).every,p=a(155),x=p("every");v({target:"Array",proto:!0,forced:!x},{every:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(7);T.exports=function(g,p){var x=[][g];return!!x&&v(function(){x.call(null,p||function(){return 1},1)})}}),(function(T,P,a){"use strict";var v=a(3),g=a(157),p=a(146);v({target:"Array",proto:!0},{fill:g}),p("fill")}),(function(T,P,a){"use strict";var v=a(39),g=a(60),p=a(63);T.exports=[].fill||function(y){for(var b=v(this),A=p(b),I=arguments.length,R=g(I>1?arguments[1]:void 0,A),O=I>2?arguments[2]:void 0,M=O===void 0?A:g(O,A);M>R;)b[R++]=y;return b}}),(function(T,P,a){"use strict";var v=a(3),g=a(83).filter,p=a(150),x=p("filter");v({target:"Array",proto:!0,forced:!x},{filter:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(83).find,p=a(146),x="find",y=!0;x in[]&&Array(1)[x](function(){y=!1}),v({target:"Array",proto:!0,forced:y},{find:function(A){return g(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){"use strict";var v=a(3),g=a(83).findIndex,p=a(146),x="findIndex",y=!0;x in[]&&Array(1)[x](function(){y=!1}),v({target:"Array",proto:!0,forced:y},{findIndex:function(A){return g(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){"use strict";var v=a(3),g=a(162).findLast,p=a(146);v({target:"Array",proto:!0},{findLast:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLast")}),(function(T,P,a){"use strict";var v=a(84),g=a(13),p=a(39),x=a(63),y=function(b){var A=b===1;return function(I,R,O){for(var M=p(I),L=g(M),D=x(L),N=v(R,O),F,G;D-- >0;)if(F=L[D],G=N(F,D,M),G)switch(b){case 0:return F;case 1:return D}return A?-1:void 0}};T.exports={findLast:y(0),findLastIndex:y(1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(162).findLastIndex,p=a(146);v({target:"Array",proto:!0},{findLastIndex:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLastIndex")}),(function(T,P,a){"use strict";var v=a(3),g=a(165),p=a(39),x=a(63),y=a(61),b=a(86);v({target:"Array",proto:!0},{flat:function(){var I=arguments.length?arguments[0]:void 0,R=p(this),O=x(R),M=I===void 0?1:y(I),L=b(R,0);return g(L,R,R,O,0,M),L}})}),(function(T,P,a){"use strict";var v=a(88),g=a(63),p=a(148),x=a(84),y=a(90),b=function(A,I,R,O,M,L,D,N){for(var F=M,G=0,j=D?x(D,N):!1,X,U;G<O;)G in R&&(X=j?j(R[G],G,I):R[G],L>0&&v(X)?(U=g(X),F=b(A,I,X,U,F,L-1)-1):(p(F+1),y(A,F,X)),F++),G++;return F};T.exports=b}),(function(T,P,a){"use strict";var v=a(3),g=a(165),p=a(30),x=a(39),y=a(63),b=a(86);v({target:"Array",proto:!0},{flatMap:function(I){var R=x(this),O=y(R),M;return p(I),M=b(R,0),g(M,R,R,O,0,1,I,arguments.length>1?arguments[1]:void 0),M}})}),(function(T,P,a){"use strict";var v=a(3),g=a(168);v({target:"Array",proto:!0,forced:[].forEach!==g},{forEach:g})}),(function(T,P,a){"use strict";var v=a(83).forEach,g=a(155),p=g("forEach");T.exports=p?[].forEach:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),(function(T,P,a){"use strict";var v=a(3),g=a(170),p=a(172),x=!p(function(y){Array.from(y)});v({target:"Array",stat:!0,forced:x},{from:g})}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(39),x=a(171),y=a(138),b=a(89),A=a(63),I=a(90),R=a(149),O=a(140),M=a(141),L=a(142),D=a(148),N=Array;T.exports=function(G){var j=b(this),X=arguments.length,U=X>1?arguments[1]:void 0,V=U!==void 0;V&&(U=v(U,X>2?arguments[2]:void 0));var k=p(G),Y=M(k),K=0,J,Z,_,at,et,rt;if(Y&&!(this===N&&y(Y)))for(Z=j?new this:[],at=O(k,Y),et=at.next;!(_=g(et,at)).done;K++){try{D(K)}catch(nt){L(at,"throw",nt)}rt=V?x(at,U,[_.value,K],!0):_.value;try{I(Z,K,rt)}catch(nt){L(at,"throw",nt)}}else for(J=A(k),Z=j?new this(J):N(J);J>K;K++)rt=V?U(k[K],K):k[K],I(Z,K,rt);return R(Z,K),Z}}),(function(T,P,a){"use strict";var v=a(46),g=a(142);T.exports=function(p,x,y,b){try{return b?x(v(y)[0],y[1]):x(y)}catch(A){g(p,"throw",A)}}}),(function(T,P,a){"use strict";var v=a(33),g=v("iterator"),p=!1;try{var x=0,y={next:function(){return{done:!!x++}},return:function(){p=!0}};y[g]=function(){return this},Array.from(y,function(){throw 2})}catch(b){}T.exports=function(b,A){try{if(!A&&!p)return!1}catch(O){return!1}var I=!1;try{var R={};R[g]=function(){return{next:function(){return{done:I=!0}}}},b(R)}catch(O){}return I}}),(function(T,P,a){"use strict";var v=a(3),g=a(59).includes,p=a(7),x=a(146),y=p(function(){return!Array(1).includes()}),b=p(function(){return[,1].includes(void 0,1)});v({target:"Array",proto:!0,forced:y||b},{includes:function(I){return g(this,I,arguments.length>1?arguments[1]:void 0)}}),x("includes")}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(59).indexOf,x=a(155),y=g([].indexOf),b=!!y&&1/y([1],1,-0)<0,A=b||!x("indexOf");v({target:"Array",proto:!0,forced:A},{indexOf:function(R){var O=arguments.length>1?arguments[1]:void 0;return b?y(this,R,O)||0:p(this,R,O)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(88);v({target:"Array",stat:!0},{isArray:g})}),(function(T,P,a){"use strict";var v=a(12),g=a(146),p=a(139),x=a(51),y=a(44).f,b=a(177),A=a(180),I=a(36),R=a(6),O="Array Iterator",M=x.set,L=x.getterFor(O);T.exports=b(Array,"Array",function(N,F){M(this,{type:O,target:v(N),index:0,kind:F})},function(){var N=L(this),F=N.target,G=N.index++;if(!F||G>=F.length)return N.target=null,A(void 0,!0);switch(N.kind){case"keys":return A(G,!1);case"values":return A(F[G],!1)}return A([G,F[G]],!1)},"values");var D=p.Arguments=p.Array;if(g("keys"),g("values"),g("entries"),!I&&R&&D.name!=="values")try{y(D,"name",{value:"values"})}catch(N){}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(36),x=a(49),y=a(21),b=a(178),A=a(135),I=a(119),R=a(82),O=a(43),M=a(47),L=a(33),D=a(139),N=a(179),F=x.PROPER,G=x.CONFIGURABLE,j=N.IteratorPrototype,X=N.BUGGY_SAFARI_ITERATORS,U=L("iterator"),V="keys",k="values",Y="entries",K=function(){return this};T.exports=function(J,Z,_,at,et,rt,nt){b(_,Z,at);var ut=function(It){if(It===et&&Et)return Et;if(!X&&It&&It in yt)return yt[It];switch(It){case V:return function(){return new _(this,It)};case k:return function(){return new _(this,It)};case Y:return function(){return new _(this,It)}}return function(){return new _(this)}},ht=Z+" Iterator",pt=!1,yt=J.prototype,At=yt[U]||yt["@@iterator"]||et&&yt[et],Et=!X&&At||ut(et),Ht=Z==="Array"&&yt.entries||At,Ut,kt,Ct;if(Ht&&(Ut=A(Ht.call(new J)),Ut!==Object.prototype&&Ut.next&&(!p&&A(Ut)!==j&&(I?I(Ut,j):y(Ut[U])||M(Ut,U,K)),R(Ut,ht,!0,!0),p&&(D[ht]=K))),F&&et===k&&At&&At.name!==k&&(!p&&G?O(yt,"name",k):(pt=!0,Et=function(){return g(At,this)})),et)if(kt={values:ut(k),keys:rt?Et:ut(V),entries:ut(Y)},nt)for(Ct in kt)(X||pt||!(Ct in yt))&&M(yt,Ct,kt[Ct]);else v({target:Z,proto:!0,forced:X||pt},kt);return(!p||nt)&&yt[U]!==Et&&M(yt,U,Et,{name:et}),D[Z]=Et,kt}}),(function(T,P,a){"use strict";var v=a(179).IteratorPrototype,g=a(71),p=a(11),x=a(82),y=a(139),b=function(){return this};T.exports=function(A,I,R,O){var M=I+" Iterator";return A.prototype=g(v,{next:p(+!O,R)}),x(A,M,!1,!0),y[M]=b,A}}),(function(T,P,a){"use strict";var v=a(7),g=a(21),p=a(20),x=a(71),y=a(135),b=a(47),A=a(33),I=a(36),R=A("iterator"),O=!1,M,L,D;[].keys&&(D=[].keys(),"next"in D?(L=y(y(D)),L!==Object.prototype&&(M=L)):O=!0);var N=!p(M)||v(function(){var F={};return M[R].call(F)!==F});N?M={}:I&&(M=x(M)),g(M[R])||b(M,R,function(){return this}),T.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:O}}),(function(T){"use strict";T.exports=function(P,a){return{value:P,done:a}}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(13),x=a(12),y=a(155),b=g([].join),A=p!==Object,I=A||!y("join",",");v({target:"Array",proto:!0,forced:I},{join:function(O){return b(x(this),O===void 0?",":O)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(183);v({target:"Array",proto:!0,forced:g!==[].lastIndexOf},{lastIndexOf:g})}),(function(T,P,a){"use strict";var v=a(117),g=a(12),p=a(61),x=a(63),y=a(155),b=Math.min,A=[].lastIndexOf,I=!!A&&1/[1].lastIndexOf(1,-0)<0,R=y("lastIndexOf"),O=I||!R;T.exports=O?function(L){if(I)return v(A,this,arguments)||0;var D=g(this),N=x(D);if(N===0)return-1;var F=N-1;for(arguments.length>1&&(F=b(F,p(arguments[1]))),F<0&&(F=N+F);F>=0;F--)if(F in D&&D[F]===L)return F||0;return-1}:A}),(function(T,P,a){"use strict";var v=a(3),g=a(83).map,p=a(150),x=p("map");v({target:"Array",proto:!0,forced:!x},{map:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(89),x=a(90),y=a(149),b=Array,A=g(function(){function I(){}return!(b.of.call(I)instanceof I)});v({target:"Array",stat:!0,forced:A},{of:function(){for(var R=0,O=arguments.length,M=new(p(this)?this:b)(O);O>R;)x(M,R,arguments[R++]);return y(M,O),M}})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(149),y=a(148),b=a(7),A=b(function(){return[].push.call({length:4294967296},1)!==4294967297}),I=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(O){return O instanceof TypeError}},R=A||!I();v({target:"Array",proto:!0,arity:1,forced:R},{push:function(M){var L=g(this),D=p(L),N=arguments.length;y(D+N);for(var F=0;F<N;F++)L[D]=arguments[F],D++;return x(L,D),D}})}),(function(T,P,a){"use strict";var v=a(3),g=a(188).left,p=a(155),x=a(27),y=a(189),b=!y&&x>79&&x<83,A=b||!p("reduce");v({target:"Array",proto:!0,forced:A},{reduce:function(R){var O=arguments.length;return g(this,R,O,O>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(30),g=a(39),p=a(13),x=a(63),y=TypeError,b="Reduce of empty array with no initial value",A=function(I){return function(R,O,M,L){var D=g(R),N=p(D),F=x(D);if(v(O),F===0&&M<2)throw new y(b);var G=I?F-1:0,j=I?-1:1;if(M<2)for(;;){if(G in N){L=N[G],G+=j;break}if(G+=j,I?G<0:F<=G)throw new y(b)}for(;I?G>=0:F>G;G+=j)G in N&&(L=O(L,N[G],G,D));return L}};T.exports={left:A(!1),right:A(!0)}}),(function(T,P,a){"use strict";var v=a(190);T.exports=v==="NODE"}),(function(T,P,a){"use strict";var v=a(4),g=a(28),p=a(15),x=function(y){return g.slice(0,y.length)===y};T.exports=(function(){return x("Bun/")?"BUN":x("Cloudflare-Workers")?"CLOUDFLARE":x("Deno/")?"DENO":x("Node.js/")?"NODE":v.Bun&&typeof Bun.version=="string"?"BUN":v.Deno&&typeof Deno.version=="object"?"DENO":p(v.process)==="process"?"NODE":v.window&&v.document?"BROWSER":"REST"})()}),(function(T,P,a){"use strict";var v=a(3),g=a(188).right,p=a(155),x=a(27),y=a(189),b=!y&&x>79&&x<83,A=b||!p("reduceRight");v({target:"Array",proto:!0,forced:A},{reduceRight:function(R){return g(this,R,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(88),x=g([].reverse),y=[1,2];v({target:"Array",proto:!0,forced:String(y)===String(y.reverse())},{reverse:function(){return p(this)&&(this.length=this.length),x(this)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(88),p=a(89),x=a(20),y=a(60),b=a(63),A=a(12),I=a(90),R=a(149),O=a(33),M=a(150),L=a(76),D=M("slice"),N=O("species"),F=Array,G=Math.max;v({target:"Array",proto:!0,forced:!D},{slice:function(X,U){var V=A(this),k=b(V),Y=y(X,k),K=y(U===void 0?k:U,k),J,Z,_;if(g(V)&&(J=V.constructor,p(J)&&(J===F||g(J.prototype))?J=void 0:x(J)&&(J=J[N],J===null&&(J=void 0)),J===F||J===void 0))return L(V,Y,K);for(Z=new(J===void 0?F:J)(G(K-Y,0)),_=0;Y<K;Y++,_++)Y in V&&I(Z,_,V[Y]);return R(Z,_),Z}})}),(function(T,P,a){"use strict";var v=a(3),g=a(83).some,p=a(155),x=p("some");v({target:"Array",proto:!0,forced:!x},{some:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(39),y=a(63),b=a(153),A=a(68),I=a(7),R=a(196),O=a(155),M=a(197),L=a(198),D=a(27),N=a(199),F=[],G=g(F.sort),j=g(F.push),X=I(function(){F.sort(void 0)}),U=I(function(){F.sort(null)}),V=O("sort"),k=!I(function(){if(D)return D<70;if(!(M&&M>3)){if(L)return!0;if(N)return N<603;var J="",Z,_,at,et;for(Z=65;Z<76;Z++){switch(_=String.fromCharCode(Z),Z){case 66:case 69:case 70:case 72:at=3;break;case 68:case 71:at=4;break;default:at=2}for(et=0;et<47;et++)F.push({k:_+et,v:at})}for(F.sort(function(rt,nt){return nt.v-rt.v}),et=0;et<F.length;et++)_=F[et].k.charAt(0),J.charAt(J.length-1)!==_&&(J+=_);return J!=="DGBEFHACIJK"}}),Y=X||!U||!V||!k,K=function(J){return function(Z,_){if(_===void 0)return-1;if(Z===void 0)return 1;if(J!==void 0)return+J(Z,_)||0;var at=A(Z),et=A(_);return at===et?0:at>et?1:-1}};v({target:"Array",proto:!0,forced:Y},{sort:function(Z){Z!==void 0&&p(Z);var _=x(this);if(k)return Z===void 0?G(_):G(_,Z);var at=[],et=y(_),rt,nt;for(nt=0;nt<et;nt++)nt in _&&j(at,_[nt]);for(R(at,K(Z)),rt=y(at),nt=0;nt<rt;)_[nt]=at[nt++];for(;nt<et;)b(_,nt++);return _}})}),(function(T,P,a){"use strict";var v=a(76),g=Math.floor,p=function(x,y){var b=x.length;if(b<8)for(var A=1,I,R;A<b;){for(R=A,I=x[A];R&&y(x[R-1],I)>0;)x[R]=x[--R];R!==A++&&(x[R]=I)}else for(var O=g(b/2),M=p(v(x,0,O),y),L=p(v(x,O),y),D=M.length,N=L.length,F=0,G=0;F<D||G<N;)x[F+G]=F<D&&G<N?y(M[F],L[G])<=0?M[F++]:L[G++]:F<D?M[F++]:L[G++];return x};T.exports=p}),(function(T,P,a){"use strict";var v=a(28),g=v.match(/firefox\/(\d+)/i);T.exports=!!g&&+g[1]}),(function(T,P,a){"use strict";var v=a(28);T.exports=/MSIE|Trident/.test(v)}),(function(T,P,a){"use strict";var v=a(28),g=v.match(/AppleWebKit\/(\d+)\./);T.exports=!!g&&+g[1]}),(function(T,P,a){"use strict";var v=a(201);v("Array")}),(function(T,P,a){"use strict";var v=a(23),g=a(77),p=a(33),x=a(6),y=p("species");T.exports=function(b){var A=v(b);x&&A&&!A[y]&&g(A,y,{configurable:!0,get:function(){return this}})}}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(60),x=a(61),y=a(63),b=a(149),A=a(148),I=a(86),R=a(90),O=a(153),M=a(150),L=M("splice"),D=Math.max,N=Math.min;v({target:"Array",proto:!0,forced:!L},{splice:function(G,j){var X=g(this),U=y(X),V=p(G,U),k=arguments.length,Y,K,J,Z,_,at;for(k===0?Y=K=0:k===1?(Y=0,K=U-V):(Y=k-2,K=N(D(x(j),0),U-V)),A(U+Y-K),J=I(X,K),Z=0;Z<K;Z++)_=V+Z,_ in X&&R(J,Z,X[_]);if(b(J,K),Y<K){for(Z=V;Z<U-K;Z++)_=Z+K,at=Z+Y,_ in X?X[at]=X[_]:O(X,at);for(Z=U;Z>U-K+Y;Z--)O(X,Z-1)}else if(Y>K)for(Z=U-K;Z>V;Z--)_=Z+K-1,at=Z+Y-1,_ in X?X[at]=X[_]:O(X,at);for(Z=0;Z<Y;Z++)X[Z+V]=arguments[Z+2];return b(X,U-K+Y),J}})}),(function(T,P,a){"use strict";var v=a(3),g=a(63),p=a(12),x=a(90),y=a(146),b=Array;v({target:"Array",proto:!0},{toReversed:function(){for(var I=p(this),R=g(I),O=new b(R),M=0;M<R;M++)x(O,M,I[R-M-1]);return O}}),y("toReversed")}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(12),y=a(205),b=a(206),A=a(146),I=Array,R=g(b("Array","sort"));v({target:"Array",proto:!0},{toSorted:function(M){M!==void 0&&p(M);var L=x(this),D=y(I,L);return R(D,M)}}),A("toSorted")}),(function(T,P,a){"use strict";var v=a(63);T.exports=function(g,p,x){for(var y=0,b=arguments.length>2?x:v(p),A=new g(b);b>y;)A[y]=p[y++];return A}}),(function(T,P,a){"use strict";var v=a(4);T.exports=function(g,p){var x=v[g],y=x&&x.prototype;return y&&y[p]}}),(function(T,P,a){"use strict";var v=a(3),g=a(146),p=a(148),x=a(63),y=a(60),b=a(12),A=a(61),I=a(90),R=Array,O=Math.max,M=Math.min;v({target:"Array",proto:!0},{toSpliced:function(D,N){var F=b(this),G=x(F),j=y(D,G),X=arguments.length,U=0,V,k,Y,K;for(X===0?V=k=0:X===1?(V=0,k=G-j):(V=X-2,k=M(O(A(N),0),G-j)),Y=p(G+V-k),K=R(Y);U<j;U++)I(K,U,F[U]);for(;U<j+V;U++)I(K,U,arguments[U-j+2]);for(;U<Y;U++)I(K,U,F[U+k-V]);return K}}),g("toSpliced")}),(function(T,P,a){"use strict";var v=a(146);v("flat")}),(function(T,P,a){"use strict";var v=a(146);v("flatMap")}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(149),y=a(153),b=a(148),A=[].unshift(0)!==1,I=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(O){return O instanceof TypeError}},R=A||!I();v({target:"Array",proto:!0,arity:1,forced:R},{unshift:function(M){var L=g(this),D=p(L),N=arguments.length;if(N){b(D+N);for(var F=D;F--;){var G=F+N;F in L?L[G]=L[F]:y(L,G)}for(var j=0;j<N;j++)L[j]=arguments[j]}return x(L,D+N)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(63),p=a(61),x=a(12),y=a(90),b=Array,A=RangeError,I=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(R){return R!==4}})();v({target:"Array",proto:!0,forced:I},{with:function(R,O){var M=x(this),L=g(M),D=p(R),N=D<0?L+D:D;if(N>=L||N<0)throw new A("Incorrect index");for(var F=new b(L),G=0;G<L;G++)y(F,G,G===N?O:M[G]);return F}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(213),x=a(201),y="ArrayBuffer",b=p[y],A=g[y];v({global:!0,constructor:!0,forced:A!==b},{ArrayBuffer:b}),x(y)}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(6),x=a(214),y=a(49),b=a(43),A=a(77),I=a(215),R=a(7),O=a(216),M=a(61),L=a(217),D=a(218),N=a(222),F=a(135),G=a(119),j=a(157),X=a(76),U=a(124),V=a(55),k=a(82),Y=a(51),K=y.PROPER,J=y.CONFIGURABLE,Z="ArrayBuffer",_="DataView",at="prototype",et="Wrong length",rt="Wrong index",nt=Y.getterFor(Z),ut=Y.getterFor(_),ht=Y.set,pt=v[Z],yt=pt,At=yt&&yt[at],Et=v[_],Ht=Et&&Et[at],Ut=Object.prototype,kt=v.Array,Ct=v.RangeError,It=g(j),Dt=g([].reverse),Vt=N.pack,_t=N.unpack,Nt=function(Pt){return[Pt&255]},Jt=function(Pt){return[Pt&255,Pt>>8&255]},ne=function(Pt){return[Pt&255,Pt>>8&255,Pt>>16&255,Pt>>24&255]},ve=function(Pt){return Pt[3]<<24|Pt[2]<<16|Pt[1]<<8|Pt[0]},le=function(Pt){return Vt(D(Pt),23,4)},fe=function(Pt){return Vt(Pt,52,8)},Ce=function(Pt,zt,jt){A(Pt[at],zt,{configurable:!0,get:function(){return jt(this)[zt]}})},Be=function(Pt,zt,jt,we){var $t=ut(Pt),Xt=L(jt),re=!!we;if(Xt+zt>$t.byteLength)throw new Ct(rt);var oe=$t.bytes,pe=Xt+$t.byteOffset,rn=X(oe,pe,pe+zt);return re?rn:Dt(rn)},Ie=function(Pt,zt,jt,we,$t,Xt){var re=ut(Pt),oe=L(jt),pe=we(+$t),rn=!!Xt;if(oe+zt>re.byteLength)throw new Ct(rt);for(var vt=re.bytes,Rt=oe+re.byteOffset,Tt=0;Tt<zt;Tt++)vt[Rt+Tt]=pe[rn?Tt:zt-Tt-1]};if(!x)yt=function(zt){O(this,At);var jt=L(zt);ht(this,{type:Z,bytes:It(kt(jt),0),byteLength:jt}),p||(this.byteLength=jt,this.detached=!1)},At=yt[at],Et=function(zt,jt,we){O(this,Ht),O(zt,At);var $t=nt(zt),Xt=$t.byteLength,re=M(jt);if(re<0||re>Xt)throw new Ct("Wrong offset");if(we=we===void 0?Xt-re:L(we),re+we>Xt)throw new Ct(et);ht(this,{type:_,buffer:zt,byteLength:we,byteOffset:re,bytes:$t.bytes}),p||(this.buffer=zt,this.byteLength=we,this.byteOffset=re)},Ht=Et[at],p&&(Ce(yt,"byteLength",nt),Ce(Et,"buffer",ut),Ce(Et,"byteLength",ut),Ce(Et,"byteOffset",ut)),I(Ht,{getInt8:function(zt){return Be(this,1,zt)[0]<<24>>24},getUint8:function(zt){return Be(this,1,zt)[0]},getInt16:function(zt){var jt=Be(this,2,zt,arguments.length>1?arguments[1]:!1);return(jt[1]<<8|jt[0])<<16>>16},getUint16:function(zt){var jt=Be(this,2,zt,arguments.length>1?arguments[1]:!1);return jt[1]<<8|jt[0]},getInt32:function(zt){return ve(Be(this,4,zt,arguments.length>1?arguments[1]:!1))},getUint32:function(zt){return ve(Be(this,4,zt,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(zt){return _t(Be(this,4,zt,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(zt){return _t(Be(this,8,zt,arguments.length>1?arguments[1]:!1),52)},setInt8:function(zt,jt){Ie(this,1,zt,Nt,jt)},setUint8:function(zt,jt){Ie(this,1,zt,Nt,jt)},setInt16:function(zt,jt){Ie(this,2,zt,Jt,jt,arguments.length>2?arguments[2]:!1)},setUint16:function(zt,jt){Ie(this,2,zt,Jt,jt,arguments.length>2?arguments[2]:!1)},setInt32:function(zt,jt){Ie(this,4,zt,ne,jt,arguments.length>2?arguments[2]:!1)},setUint32:function(zt,jt){Ie(this,4,zt,ne,jt,arguments.length>2?arguments[2]:!1)},setFloat32:function(zt,jt){Ie(this,4,zt,le,jt,arguments.length>2?arguments[2]:!1)},setFloat64:function(zt,jt){Ie(this,8,zt,fe,jt,arguments.length>2?arguments[2]:!1)}});else{var ce=K&&pt.name!==Z;!R(function(){pt(1)})||!R(function(){new pt(-1)})||R(function(){return new pt,new pt(1.5),new pt(NaN),pt.length!==1||ce&&!J})?(yt=function(zt){return O(this,At),U(new pt(L(zt)),this,yt)},yt[at]=At,At.constructor=yt,V(yt,pt)):ce&&J&&b(pt,"name",Z),G&&F(Ht)!==Ut&&G(Ht,Ut);var xe=new Et(new yt(2)),Ue=g(Ht.setInt8);xe.setInt8(0,2147483648),xe.setInt8(1,2147483649),(xe.getInt8(0)||!xe.getInt8(1))&&I(Ht,{setInt8:function(zt,jt){Ue(this,zt,jt<<24>>24)},setUint8:function(zt,jt){Ue(this,zt,jt<<24>>24)}},{unsafe:!0})}k(yt,Z),k(Et,_),T.exports={ArrayBuffer:yt,DataView:Et}}),(function(T){"use strict";T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(T,P,a){"use strict";var v=a(47);T.exports=function(g,p,x){for(var y in p)v(g,y,p[y],x);return g}}),(function(T,P,a){"use strict";var v=a(24),g=TypeError;T.exports=function(p,x){if(v(x,p))return p;throw new g("Incorrect invocation")}}),(function(T,P,a){"use strict";var v=a(61),g=a(64),p=RangeError;T.exports=function(x){if(x===void 0)return 0;var y=v(x),b=g(y);if(y!==b)throw new p("Wrong length or index");return b}}),(function(T,P,a){"use strict";var v=a(219),g=11920928955078125e-23,p=34028234663852886e22,x=11754943508222875e-54;T.exports=Math.fround||function(b){return v(b,g,p,x)}}),(function(T,P,a){"use strict";var v=a(220),g=a(221),p=Math.abs,x=2220446049250313e-31;T.exports=function(y,b,A,I){var R=+y,O=p(R),M=v(R);if(O<I)return M*g(O/I/b)*I*b;var L=(1+b/x)*O,D=L-(L-O);return D>A||D!==D?M*(1/0):M*D}}),(function(T){"use strict";T.exports=Math.sign||function(a){var v=+a;return v===0||v!==v?v:v<0?-1:1}}),(function(T){"use strict";var P=2220446049250313e-31,a=1/P;T.exports=function(v){return v+a-a}}),(function(T){"use strict";var P=Array,a=Math.abs,v=Math.pow,g=Math.floor,p=Math.log,x=Math.LN2,y=function(A,I,R){var O=P(R),M=R*8-I-1,L=(1<<M)-1,D=L>>1,N=I===23?v(2,-24)-v(2,-77):0,F=A<0||A===0&&1/A<0?1:0,G=0,j,X,U;for(A=a(A),A!==A||A===1/0?(X=A!==A?1:0,j=L):(j=g(p(A)/x),U=v(2,-j),A*U<1&&(j--,U*=2),j+D>=1?A+=N/U:A+=N*v(2,1-D),A*U>=2&&(j++,U/=2),j+D>=L?(X=0,j=L):j+D>=1?(X=(A*U-1)*v(2,I),j+=D):(X=A*v(2,D-1)*v(2,I),j=0));I>=8;)O[G++]=X&255,X/=256,I-=8;for(j=j<<I|X,M+=I;M>0;)O[G++]=j&255,j/=256,M-=8;return O[G-1]|=F*128,O},b=function(A,I){var R=A.length,O=R*8-I-1,M=(1<<O)-1,L=M>>1,D=O-7,N=R-1,F=A[N--],G=F&127,j;for(F>>=7;D>0;)G=G*256+A[N--],D-=8;for(j=G&(1<<-D)-1,G>>=-D,D+=I;D>0;)j=j*256+A[N--],D-=8;if(G===0)G=1-L;else{if(G===M)return j?NaN:F?-1/0:1/0;j+=v(2,I),G-=L}return(F?-1:1)*j*v(2,G-I)};T.exports={pack:y,unpack:b}}),(function(T,P,a){"use strict";var v=a(3),g=a(224),p=g.NATIVE_ARRAY_BUFFER_VIEWS;v({target:"ArrayBuffer",stat:!0,forced:!p},{isView:g.isView})}),(function(T,P,a){"use strict";var v=a(214),g=a(6),p=a(4),x=a(21),y=a(20),b=a(38),A=a(69),I=a(31),R=a(43),O=a(47),M=a(77),L=a(24),D=a(135),N=a(119),F=a(33),G=a(40),j=a(51),X=j.enforce,U=j.get,V=p.Int8Array,k=V&&V.prototype,Y=p.Uint8ClampedArray,K=Y&&Y.prototype,J=V&&D(V),Z=k&&D(k),_=Object.prototype,at=p.TypeError,et=F("toStringTag"),rt=G("TYPED_ARRAY_TAG"),nt="TypedArrayConstructor",ut=v&&!!N&&A(p.opera)!=="Opera",ht=!1,pt,yt,At,Et={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ht={BigInt64Array:8,BigUint64Array:8},Ut=function(Jt){if(!y(Jt))return!1;var ne=A(Jt);return ne==="DataView"||b(Et,ne)||b(Ht,ne)},kt=function(Nt){var Jt=D(Nt);if(y(Jt)){var ne=U(Jt);return ne&&b(ne,nt)?ne[nt]:kt(Jt)}},Ct=function(Nt){if(!y(Nt))return!1;var Jt=A(Nt);return b(Et,Jt)||b(Ht,Jt)},It=function(Nt){if(Ct(Nt))return Nt;throw new at("Target is not a typed array")},Dt=function(Nt){if(x(Nt)&&(!N||L(J,Nt)))return Nt;throw new at(I(Nt)+" is not a typed array constructor")},Vt=function(Nt,Jt,ne,ve){if(g){if(ne)for(var le in Et){var fe=p[le];if(fe&&b(fe.prototype,Nt))try{delete fe.prototype[Nt]}catch(Ce){try{fe.prototype[Nt]=Jt}catch(Be){}}}(!Z[Nt]||ne)&&O(Z,Nt,ne?Jt:ut&&k[Nt]||Jt,ve)}},_t=function(Nt,Jt,ne){var ve,le;if(g){if(N){if(ne){for(ve in Et)if(le=p[ve],le&&b(le,Nt))try{delete le[Nt]}catch(fe){}}if(!J[Nt]||ne)try{return O(J,Nt,ne?Jt:ut&&J[Nt]||Jt)}catch(fe){}else return}for(ve in Et)le=p[ve],le&&(!le[Nt]||ne)&&O(le,Nt,Jt)}};for(pt in Et)yt=p[pt],At=yt&&yt.prototype,At?X(At)[nt]=yt:ut=!1;for(pt in Ht)yt=p[pt],At=yt&&yt.prototype,At&&(X(At)[nt]=yt);if((!ut||!x(J)||J===Function.prototype)&&(J=function(){throw new at("Incorrect invocation")},ut))for(pt in Et)p[pt]&&N(p[pt],J);if((!ut||!Z||Z===_)&&(Z=J.prototype,ut))for(pt in Et)p[pt]&&N(p[pt].prototype,Z);if(ut&&D(K)!==Z&&N(K,Z),g&&!b(Z,et)){ht=!0,M(Z,et,{configurable:!0,get:function(){return y(this)?this[rt]:void 0}});for(pt in Et)p[pt]&&R(p[pt].prototype,rt,pt)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:ut,TYPED_ARRAY_TAG:ht&&rt,aTypedArray:It,aTypedArrayConstructor:Dt,exportTypedArrayMethod:Vt,exportTypedArrayStaticMethod:_t,getTypedArrayConstructor:kt,isView:Ut,isTypedArray:Ct,TypedArray:J,TypedArrayPrototype:Z}}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(7),x=a(213),y=a(46),b=a(60),A=a(64),I=x.ArrayBuffer,R=x.DataView,O=R.prototype,M=g(I.prototype.slice),L=g(O.getUint8),D=g(O.setUint8),N=p(function(){return!new I(2).slice(1,void 0).byteLength});v({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:N},{slice:function(G,j){if(M&&j===void 0)return M(y(this),G);for(var X=y(this).byteLength,U=b(G,X),V=b(j===void 0?X:j,X),k=new I(A(V-U)),Y=new R(this),K=new R(k),J=0;U<V;)D(K,J++,L(Y,U++));return k}})}),(function(T,P,a){"use strict";a(227)}),(function(T,P,a){"use strict";var v=a(3),g=a(213),p=a(214);v({global:!0,constructor:!0,forced:!p},{DataView:g.DataView})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=Math.pow,x=31,y=1023,b=p(2,-24),A=.0009765625,I=function(O){var M=O>>>15,L=O>>>10&x,D=O&y;return L===x?D===0?M===0?1/0:-1/0:NaN:L===0?D*(M===0?b:-b):p(2,L-15)*(M===0?1+D*A:-1-D*A)},R=g(DataView.prototype.getUint16);v({target:"DataView",proto:!0},{getFloat16:function(M){return I(R(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(230),x=a(217),y=a(231),b=a(221),A=Math.floor,I=Math.pow,R=65520,O=61005353927612305e-21,M=16777216,L=1024,D=function(F){if(F!==F)return 32256;if(F===0)return(1/F===-1/0)<<15;var G=F<0;if(G&&(F=-F),F>=R)return G<<15|31744;if(F<O)return G<<15|b(F*M);var j=A(y(F));if(j===-15)return G<<15|L;var X=b((F*I(2,-j)-1)*L);return X===L?G<<15|j+16<<10:G<<15|j+15<<10|X},N=g(DataView.prototype.setUint16);v({target:"DataView",proto:!0},{setFloat16:function(G,j){N(p(this),x(G),D(+j),arguments.length>2?arguments[2]:!1)}})}),(function(T,P,a){"use strict";var v=a(69),g=TypeError;T.exports=function(p){if(v(p)==="DataView")return p;throw new g("Argument is not a DataView")}}),(function(T){"use strict";var P=Math.log,a=Math.LN2;T.exports=Math.log2||function(g){return P(g)/a}}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(233),x=ArrayBuffer.prototype;v&&!("detached"in x)&&g(x,"detached",{configurable:!0,get:function(){return p(this)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(214),p=a(234),x=v.DataView;T.exports=function(y){if(!g||p(y)!==0)return!1;try{return new x(y),!1}catch(b){return!0}}}),(function(T,P,a){"use strict";var v=a(4),g=a(120),p=a(15),x=v.ArrayBuffer,y=v.TypeError;T.exports=x&&g(x.prototype,"byteLength","get")||function(b){if(p(b)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return b.byteLength}}),(function(T,P,a){"use strict";var v=a(3),g=a(236);g&&v({target:"ArrayBuffer",proto:!0},{transfer:function(){return g(this,arguments.length?arguments[0]:void 0,!0)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(120),x=a(217),y=a(237),b=a(234),A=a(238),I=a(240),R=v.structuredClone,O=v.ArrayBuffer,M=v.DataView,L=Math.max,D=Math.min,N=O.prototype,F=M.prototype,G=g(N.slice),j=p(N,"resizable","get"),X=p(N,"maxByteLength","get"),U=g(F.getInt8),V=g(F.setInt8);T.exports=(I||A)&&function(k,Y,K){var J=b(k),Z=Y===void 0?J:x(Y),_=!j||!j(k),at;if(y(k),I&&(k=R(k,{transfer:[k]}),J===Z&&(K||_)))return k;if(J>=Z&&(!K||_))at=G(k,0,Z);else{var et=K&&!_&&X?{maxByteLength:L(Z,X(k))}:void 0;at=new O(Z,et);for(var rt=new M(k),nt=new M(at),ut=D(Z,J),ht=0;ht<ut;ht++)V(nt,ht,U(rt,ht))}return I||A(k),at}}),(function(T,P,a){"use strict";var v=a(233),g=TypeError;T.exports=function(p){if(v(p))throw new g("ArrayBuffer is detached");return p}}),(function(T,P,a){"use strict";var v=a(4),g=a(239),p=a(240),x=v.structuredClone,y=v.ArrayBuffer,b=v.MessageChannel,A=!1,I,R,O,M;if(p)A=function(L){x(L,{transfer:[L]})};else if(y)try{b||(I=g("worker_threads"),I&&(b=I.MessageChannel)),b&&(R=new b,O=new y(2),M=function(L){R.port1.postMessage(null,[L])},O.byteLength===2&&(M(O),O.byteLength===0&&(A=M)))}catch(L){}T.exports=A}),(function(T,P,a){"use strict";var v=a(4),g=a(189);T.exports=function(p){if(g){try{return v.process.getBuiltinModule(p)}catch(x){}try{return Function('return require("'+p+'")')()}catch(x){}}}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(27),x=a(190),y=v.structuredClone;T.exports=!!y&&!g(function(){if(x==="DENO"&&p>92||x==="NODE"&&p>94||x==="BROWSER"&&p>97)return!1;var b=new ArrayBuffer(8),A=y(b,{transfer:[b]});return b.byteLength!==0||A.byteLength!==8})}),(function(T,P,a){"use strict";var v=a(3),g=a(236);g&&v({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return g(this,arguments.length?arguments[0]:void 0,!1)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(7),x=p(function(){return new Date(16e11).getYear()!==120}),y=g(Date.prototype.getFullYear);v({target:"Date",proto:!0,forced:x},{getYear:function(){return y(this)-1900}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=Date,x=g(p.prototype.getTime);v({target:"Date",stat:!0},{now:function(){return x(new p)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=Date.prototype,y=g(x.getTime),b=g(x.setFullYear);v({target:"Date",proto:!0},{setYear:function(I){y(this);var R=+I;if(R!==R)return b(this,R);var O=p(R),M=O>=0&&O<=99?O+1900:O;return b(this,M)}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(T,P,a){"use strict";var v=a(3),g=a(247);v({target:"Date",proto:!0,forced:Date.prototype.toISOString!==g},{toISOString:g})}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(248).start,x=RangeError,y=isFinite,b=Math.abs,A=Date.prototype,I=A.toISOString,R=v(A.getTime),O=v(A.getUTCDate),M=v(A.getUTCFullYear),L=v(A.getUTCHours),D=v(A.getUTCMilliseconds),N=v(A.getUTCMinutes),F=v(A.getUTCMonth),G=v(A.getUTCSeconds);T.exports=g(function(){return I.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!g(function(){I.call(new Date(NaN))})?function(){if(!y(R(this)))throw new x("Invalid time value");var X=this,U=M(X),V=D(X),k=U<0?"-":U>9999?"+":"";return k+p(b(U),k?6:4,0)+"-"+p(F(X)+1,2,0)+"-"+p(O(X),2,0)+"T"+p(L(X),2,0)+":"+p(N(X),2,0)+":"+p(G(X),2,0)+"."+p(V,3,0)+"Z"}:I}),(function(T,P,a){"use strict";var v=a(14),g=a(64),p=a(68),x=a(249),y=a(16),b=v(x),A=v("".slice),I=Math.ceil,R=function(O){return function(M,L,D){var N=p(y(M)),F=g(L),G=N.length;if(F<=G)return N;var j=D===void 0?" ":p(D),X,U;return j===""?N:(X=F-G,U=b(j,I(X/j.length)),U.length>X&&(U=A(U,0,X)),O?N+U:U+N)}};T.exports={start:R(!1),end:R(!0)}}),(function(T,P,a){"use strict";var v=a(61),g=a(68),p=a(16),x=RangeError,y=Math.floor;T.exports=function(A){var I=g(p(this)),R="",O=v(A);if(O<0||O===1/0)throw new x("Wrong number of repetitions");for(;O>0;(O=y(O/2))&&(I+=I))O%2&&(R+=I);return R}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(39),x=a(19),y=g(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});v({target:"Date",proto:!0,forced:y},{toJSON:function(A){var I=p(this),R=x(I,"number");return typeof R=="number"&&!isFinite(R)?null:I.toISOString()}})}),(function(T,P,a){"use strict";var v=a(38),g=a(47),p=a(252),x=a(33),y=x("toPrimitive"),b=Date.prototype;v(b,y)||g(b,y,p)}),(function(T,P,a){"use strict";var v=a(46),g=a(32),p=TypeError;T.exports=function(x){if(v(this),x==="string"||x==="default")x="string";else if(x!=="number")throw new p("Incorrect hint");return g(this,x)}}),(function(T,P,a){"use strict";var v=a(14),g=a(47),p=Date.prototype,x="Invalid Date",y="toString",b=v(p[y]),A=v(p.getTime);String(new Date(NaN))!==x&&g(p,y,function(){var R=A(this);return R===R?b(this):x})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(23),x=a(30),y=a(216),b=a(47),A=a(215),I=a(77),R=a(33),O=a(51),M=a(255),L=p("SuppressedError"),D=ReferenceError,N=R("dispose"),F=R("toStringTag"),G="DisposableStack",j=O.set,X=O.getterFor(G),U="sync-dispose",V="disposed",k="pending",Y=function(Z){var _=X(Z);if(_.state===V)throw new D(G+" already disposed");return _},K=function(){j(y(this,J),{type:G,state:k,stack:[]}),g||(this.disposed=!1)},J=K.prototype;A(J,{dispose:function(){var _=X(this);if(_.state!==V){_.state=V,g||(this.disposed=!0);for(var at=_.stack,et=at.length,rt=!1,nt;et;){var ut=at[--et];at[et]=null;try{ut()}catch(ht){rt?nt=new L(ht,nt):(rt=!0,nt=ht)}}if(_.stack=null,rt)throw nt}},use:function(_){return M(Y(this),_,U),_},adopt:function(_,at){var et=Y(this);return x(at),M(et,void 0,U,function(){at(_)}),_},defer:function(_){var at=Y(this);x(_),M(at,void 0,U,_)},move:function(){var _=Y(this),at=new K;return X(at).stack=_.stack,_.stack=[],_.state=V,g||(this.disposed=!0),at}}),g&&I(J,"disposed",{configurable:!0,get:function(){return X(this).state===V}}),b(J,N,J.dispose,{name:"dispose"}),b(J,F,G,{nonWritable:!0}),v({global:!0,constructor:!0},{DisposableStack:K})}),(function(T,P,a){"use strict";var v=a(23),g=a(8),p=a(14),x=a(84),y=a(46),b=a(30),A=a(17),I=a(29),R=a(33),O=R("asyncDispose"),M=R("dispose"),L=p([].push),D=function(F,G){if(G==="async-dispose"){var j=I(F,O);return j!==void 0||(j=I(F,M),j===void 0)?j:function(){var X=this,U=v("Promise");return new U(function(V){g(j,X),V(void 0)})}}return I(F,M)},N=function(F,G,j){return arguments.length<3&&!A(F)&&(j=b(D(y(F),G))),j===void 0?function(){}:x(j,F)};T.exports=function(F,G,j,X){var U;if(arguments.length<4){if(A(G)&&j==="sync-dispose")return;U=N(G,j)}else U=N(void 0,j,X);L(F.stack,U)}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(68),x=g("".charAt),y=g("".charCodeAt),b=g(/./.exec),A=g(1.1.toString),I=g("".toUpperCase),R=g([].join),O=Array,M=/[\w*+\-./@]/,L=function(D,N){for(var F=A(D,16);F.length<N;)F="0"+F;return F};v({global:!0},{escape:function(N){var F=p(N),G=F.length,j=O(G),X,U,V;for(X=0;X<G;X++)U=x(F,X),b(M,U)?j[X]=U:(V=y(U,0),V<256?j[X]="%"+I(L(V,2)):j[X]="%u"+I(L(V,4)));return R(j,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(258);v({target:"Function",proto:!0,forced:Function.bind!==g},{bind:g})}),(function(T,P,a){"use strict";var v=a(14),g=a(30),p=a(20),x=a(38),y=a(76),b=a(9),A=Function,I=v([].concat),R=v([].join),O={},M=function(L,D,N){if(!x(O,D)){for(var F=[],G=0;G<D;G++)F[G]="a["+G+"]";O[D]=A("C,a","return new C("+R(F,",")+")")}return O[D](L,N)};T.exports=b?A.bind:function(D){var N=g(this),F=N.prototype,G=y(arguments,1),j=function(){var U=I(G,y(arguments));return this instanceof j?M(N,U.length,U):N.apply(D,U)};return p(F)&&(j.prototype=F),j}}),(function(T,P,a){"use strict";var v=a(21),g=a(20),p=a(44),x=a(24),y=a(33),b=a(48),A=y("hasInstance"),I=Function.prototype;A in I||p.f(I,A,{value:b(function(R){if(!v(this)||!g(R))return!1;var O=this.prototype;return g(O)?x(O,R):R instanceof this},A)})}),(function(T,P,a){"use strict";var v=a(6),g=a(49).EXISTS,p=a(14),x=a(77),y=Function.prototype,b=p(y.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,I=p(A.exec),R="name";v&&!g&&x(y,R,{configurable:!0,get:function(){try{return I(A,b(this))[1]}catch(O){return""}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4);v({global:!0,forced:g.globalThis!==g},{globalThis:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(216),x=a(46),y=a(21),b=a(135),A=a(77),I=a(90),R=a(7),O=a(38),M=a(33),L=a(179).IteratorPrototype,D=a(6),N=a(36),F="constructor",G="Iterator",j=M("toStringTag"),X=TypeError,U=g[G],V=N||!y(U)||U.prototype!==L||!R(function(){U({})}),k=function(){if(p(this,L),b(this)===L)throw new X("Abstract class Iterator not directly constructable")},Y=function(K,J){D?A(L,K,{configurable:!0,get:function(){return J},set:function(Z){if(x(this),this===L)throw new X("You can't redefine this property");O(this,K)?this[K]=Z:I(this,K,Z)}}):L[K]=J};O(L,j)||Y(j,G),(V||!O(L,F)||L[F]===Object)&&Y(F,k),k.prototype=L,v({global:!0,constructor:!0,forced:V},{Iterator:k})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(141),b=a(264),A=a(36),I=Array,R=b(function(){for(;;){var O=this.iterator;if(!O){var M=this.nextIterableIndex++,L=this.iterables;if(M>=L.length){this.done=!0;return}var D=L[M];this.iterables[M]=null,O=this.iterator=x(g(D.method,D.iterable)),this.next=O.next}var N=x(g(this.next,O));if(N.done){this.iterator=null,this.next=null;continue}return N.value}});v({target:"Iterator",stat:!0,forced:A},{concat:function(){for(var M=arguments.length,L=I(M),D=0;D<M;D++){var N=x(arguments[D]);L[D]={iterable:N,method:p(y(N))}}return new R({iterables:L,nextIterableIndex:0,iterator:null,next:null})}})}),(function(T,P,a){"use strict";var v=a(8),g=a(71),p=a(43),x=a(215),y=a(33),b=a(51),A=a(29),I=a(179).IteratorPrototype,R=a(180),O=a(142),M=a(265),L=a(266),D=y("toStringTag"),N="IteratorHelper",F="WrapForValidIterator",G="normal",j="throw",X=b.set,U=function(Y){var K=b.getterFor(Y?F:N);return x(g(I),{next:function(){var Z=K(this);if(Y)return Z.nextHandler();if(Z.done)return R(void 0,!0);try{var _=Z.nextHandler();return Z.done&&L(Z),Z.returnHandlerResult?_:R(_,Z.done)}catch(at){throw Z.done=!0,L(Z),at}},return:function(){var J=K(this),Z=J.iterator,_=J.inner,at=J.openIters,et=J.done;if(J.done=!0,Y){var rt=A(Z,"return");return rt?v(rt,Z):R(void 0,!0)}if(L(J),et)return R(void 0,!0);if(_)try{O(_.iterator,G)}catch(nt){return O(Z,j,nt)}if(at)try{M(at,G)}catch(nt){if(Z)return O(Z,j,nt);throw nt}return Z&&O(Z,G),R(void 0,!0)}})},V=U(!0),k=U(!1);p(k,D,"Iterator Helper"),T.exports=function(Y,K,J){var Z=function(at,et){et?(et.iterator=at.iterator,et.next=at.next):et=at,et.type=K?F:N,et.returnHandlerResult=!!J,et.nextHandler=Y,et.counter=0,et.done=!1,X(this,et)};return Z.prototype=K?V:k,Z}}),(function(T,P,a){"use strict";var v=a(142);T.exports=function(g,p,x){for(var y=g.length-1;y>=0;y--)if(g[y]!==void 0)try{x=v(g[y].iterator,p,x)}catch(b){p="throw",x=b}if(p==="throw")throw x;return x}}),(function(T){"use strict";T.exports=function(P){P.iterator=P.next=P.nextHandler=P.mapper=P.predicate=P.inner=P.iterables=P.iters=P.openIters=P.padding=P.finishResults=P.buffer=null}}),(function(T,P,a){"use strict";var v=a(8),g=a(47),p=a(29),x=a(38),y=a(33),b=a(179).IteratorPrototype,A=y("dispose");x(b,A)||g(b,A,function(){var I=p(this,"return");I&&v(I,this)})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(269),y=a(270),b=a(271),A=a(142),I=a(264),R=a(272),O=a(273),M=a(36),L=RangeError,D=1/0,N=!M&&!R("drop",0),F=!M&&!N&&O("drop",RangeError),G=M||N||F||!(function(){try{Iterator.prototype.drop.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),j=I(function(){for(var X=this.iterator,U=this.next,V,k;this.remaining;)if(this.remaining--,V=p(g(U,X)),k=this.done=!!V.done,k)return;if(V=p(g(U,X)),k=this.done=!!V.done,!k)return V.value});v({target:"Iterator",proto:!0,real:!0,forced:G},{drop:function(U){p(this);var V;try{if(V=b(y(+U)),V>9007199254740991&&V!==D)throw new L("The argument should be a safe integer")}catch(k){A(this,"throw",k)}return F?g(F,this,V):new j(x(this),{remaining:V})}})}),(function(T){"use strict";T.exports=function(P){return{iterator:P,next:P.next,done:!1}}}),(function(T){"use strict";var P=RangeError;T.exports=function(a){if(a===a)return a;throw new P("NaN is not allowed")}}),(function(T,P,a){"use strict";var v=a(61),g=RangeError;T.exports=function(p){var x=v(p);if(x<0)throw new g("The argument can't be less than 0");return x}}),(function(T){"use strict";T.exports=function(P,a){var v=typeof Iterator=="function"&&Iterator.prototype[P];if(v)try{v.call({next:null},a).next()}catch(g){return!0}}}),(function(T,P,a){"use strict";var v=a(4);T.exports=function(g,p){var x=v.Iterator,y=x&&x.prototype,b=y&&y[g],A=!1;if(b)try{b.call({next:function(){return{done:!0}},return:function(){A=!0}},-1)}catch(I){I instanceof p||(A=!1)}if(!A)return b}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("every",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{every:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return!p(L,function(N,F){if(!M(N,D++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(264),A=a(171),I=a(36),R=a(142),O=a(272),M=a(273),L=!I&&!O("filter",function(){}),D=!I&&!L&&M("filter",TypeError),N=I||L||D,F=b(function(){for(var G=this.iterator,j=this.predicate,X=this.next,U,V,k;;){if(U=x(g(X,G)),V=this.done=!!U.done,V)return;if(k=U.value,A(G,j,[k,this.counter++],!0))return k}});v({target:"Iterator",proto:!0,real:!0,forced:N},{filter:function(j){x(this);try{p(j)}catch(X){R(this,"throw",X)}return D?g(D,this,j):new F(y(this),{predicate:j})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("find",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{find:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return p(L,function(N,F){if(M(N,D++))return F(N)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(278),A=a(264),I=a(142),R=a(7),O=a(36),M=a(272),L=a(273),D=!O&&R(function(){return[1].values().flatMap(function(){return[1]}).find(function(){return!0})!==1}),N=!O&&!D&&!M("flatMap",function(){}),F=!O&&!D&&!N&&L("flatMap",TypeError),G=O||D||N||F,j=A(function(){for(var X=this.iterator,U=this.mapper,V,k;;){if(k=this.inner)try{if(V=x(g(k.next,k.iterator)),!V.done)return V.value;this.inner=null}catch(Y){I(X,"throw",Y)}if(V=x(g(this.next,X)),this.done=!!V.done)return;try{this.inner=b(U(V.value,this.counter++),!1)}catch(Y){I(X,"throw",Y)}}});v({target:"Iterator",proto:!0,real:!0,forced:G},{flatMap:function(U){x(this);try{p(U)}catch(V){I(this,"throw",V)}return F?g(F,this,U):new j(y(this),{mapper:U,inner:null})}})}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(269),x=a(141);T.exports=function(y,b){(!b||typeof y!="string")&&g(y);var A=x(y);return p(g(A!==void 0?v(A,y):y))}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("forEach",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{forEach:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;p(L,function(N){M(N,D++)},{IS_RECORD:!0})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(39),x=a(24),y=a(179).IteratorPrototype,b=a(264),A=a(278),I=a(36),R=I||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),O=b(function(){return g(this.next,this.iterator)},!0);v({target:"Iterator",stat:!0,forced:R},{from:function(L){var D=A(typeof L=="string"?p(L):L,!0);return x(y,D.iterator)?D.iterator:new O(D)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(264),A=a(171),I=a(142),R=a(272),O=a(273),M=a(36),L=!M&&!R("map",function(){}),D=!M&&!L&&O("map",TypeError),N=M||L||D,F=b(function(){var G=this.iterator,j=x(g(this.next,G)),X=this.done=!!j.done;if(!X)return A(G,this.mapper,[j.value,this.counter++],!0)});v({target:"Iterator",proto:!0,real:!0,forced:N},{map:function(j){x(this);try{p(j)}catch(X){I(this,"throw",X)}return D?g(D,this,j):new F(y(this),{mapper:j})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(137),p=a(30),x=a(46),y=a(269),b=a(142),A=a(273),I=a(117),R=a(7),O=TypeError,M=R(function(){[].keys().reduce(function(){},void 0)}),L=!M&&A("reduce",O);v({target:"Iterator",proto:!0,real:!0,forced:M||L},{reduce:function(N){x(this);try{p(N)}catch(U){b(this,"throw",U)}var F=arguments.length<2,G=F?void 0:arguments[1];if(L)return I(L,this,F?[N]:[N,G]);var j=y(this),X=0;if(g(j,function(U){F?(F=!1,G=U):G=N(G,U,X),X++},{IS_RECORD:!0}),F)throw new O("Reduce of empty iterator with no initial value");return G}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("some",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{some:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return p(L,function(N,F){if(M(N,D++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(269),y=a(270),b=a(271),A=a(264),I=a(142),R=a(272),O=a(273),M=a(36),L=RangeError,D=1/0,N=!M&&!R("take",1),F=!M&&!N&&O("take",RangeError),G=M||N||F||!(function(){try{Iterator.prototype.take.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),j=A(function(){var X=this.iterator;if(!this.remaining--)return this.done=!0,I(X,"normal",void 0);var U=p(g(this.next,X)),V=this.done=!!U.done;if(!V)return U.value});v({target:"Iterator",proto:!0,real:!0,forced:G},{take:function(U){p(this);var V;try{if(V=b(y(+U)),V>9007199254740991&&V!==D)throw new L("The argument should be a safe integer")}catch(k){I(this,"throw",k)}return F?g(F,this,V):new j(x(this),{remaining:V})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(90),x=a(137),y=a(269);v({target:"Iterator",proto:!0,real:!0},{toArray:function(){var A=[],I=0;return x(y(g(this)),function(R){p(A,I++,R)},{IS_RECORD:!0}),A}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(287),x=a(8),y=a(14),b=a(288),A=a(278),I=a(289),R=a(142),O=a(265),M=a(290),L=a(36),D=y([].concat),N=y([].push),F="throw";v({target:"Iterator",stat:!0,forced:L},{zip:function(j){g(j);for(var X=arguments.length>1?p(arguments[1]):void 0,U=I(X),V=U==="longest"?p(X&&X.padding):void 0,k=[],Y=[],K=b(j),J,Z,_;!Z;){try{_=g(x(K.next,K.iterator)),Z=_.done}catch(ht){return O(k,F,ht)}if(!Z){try{J=A(_.value,!1)}catch(ht){return O(D([K],k),F,ht)}N(k,J)}}var at=k.length,et,rt,nt;if(U==="longest")if(V===void 0)for(et=0;et<at;et++)N(Y,void 0);else{try{nt=b(V)}catch(ht){return O(k,F,ht)}var ut=!0;for(et=0;et<at;et++)if(ut){try{_=g(x(nt.next,nt.iterator)),rt=_.done,_=_.value}catch(ht){return O(k,F,ht)}rt?ut=!1:N(Y,_)}else N(Y,void 0);if(ut)try{R(nt.iterator,"normal")}catch(ht){return O(k,F,ht)}}return M(k,U,Y)}})}),(function(T,P,a){"use strict";var v=a(20),g=String,p=TypeError;T.exports=function(x){if(x===void 0||v(x))return x;throw new p(g(x)+" is not an object or undefined")}}),(function(T,P,a){"use strict";var v=a(140),g=a(269);T.exports=function(p){return g(v(p))}}),(function(T){"use strict";var P=TypeError;T.exports=function(a){var v=a&&a.mode;if(v===void 0||v==="shortest"||v==="longest"||v==="strict")return v||"shortest";throw new P("Incorrect `mode` option")}}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(46),x=a(264),y=a(265),b=TypeError,A=g([].slice),I=g([].push),R="Iterator is exhausted",O="throw",M=x(function(){var L=this.iterCount;if(!L){this.done=!0;return}for(var D=this.openIters,N=this.iters,F=this.padding,G=this.mode,j=this.finishResults,X=[],U,V,k=0;k<L;k++){var Y=N[k];if(Y===null)U=F[k];else{try{U=p(v(Y.next,Y.iterator)),V=U.done,U=U.value}catch(_){return D[k]=void 0,y(D,O,_)}if(V){if(D[k]=void 0,this.openItersCount--,G==="shortest")return this.done=!0,y(D,"normal",void 0);if(G==="strict"){if(k)return y(D,O,new b(R));for(var K,J,Z=1;Z<L;Z++){try{K=p(v(N[Z].next,N[Z].iterator)),J=K.done,K=K.value}catch(_){return D[Z]=void 0,y(D,O,_)}if(J)D[Z]=void 0,this.openItersCount--;else return y(D,O,new b(R))}this.done=!0;return}if(!this.openItersCount){this.done=!0;return}N[k]=null,U=F[k]}}I(X,U)}return j?j(X):X});T.exports=function(L,D,N,F){var G=L.length;return new M({iters:L,iterCount:G,openIters:A(L,0),openItersCount:G,mode:D,padding:N,finishResults:F})}}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(287),x=a(90),y=a(8),b=a(14),A=a(23),I=a(10),R=a(278),O=a(289),M=a(265),L=a(290),D=a(36),N=b([].push),F="throw";v({target:"Iterator",stat:!0,forced:D},{zipKeyed:function(j){g(j);var X=arguments.length>1?p(arguments[1]):void 0,U=O(X),V=U==="longest"?p(X&&X.padding):void 0,k=[],Y=[],K=A("Reflect","ownKeys")(j),J=[],Z=I.f,_,at,et;for(_=0;_<K.length;_++)try{if(at=K[_],!y(Z,j,at))continue;et=j[at],et!==void 0&&(N(J,at),N(k,R(et,!1)))}catch(nt){return M(k,F,nt)}var rt=k.length;if(U==="longest")if(V===void 0)for(_=0;_<rt;_++)N(Y,void 0);else for(_=0;_<J.length;_++){try{et=V[J[_]]}catch(nt){return M(k,F,nt)}N(Y,et)}return L(k,U,Y,function(nt){for(var ut=A("Object","create")(null),ht=0;ht<rt;ht++)x(ut,J[ht],nt[ht]);return ut})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(98),p=a(95);v({target:"JSON",stat:!0,forced:!g},{isRawJSON:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(4),x=a(23),y=a(14),b=a(8),A=a(21),I=a(20),R=a(88),O=a(38),M=a(68),L=a(63),D=a(90),N=a(7),F=a(97),G=a(26),j=p.JSON,X=p.Number,U=p.SyntaxError,V=j&&j.parse,k=x("Object","keys"),Y=Object.getOwnPropertyDescriptor,K=y("".charAt),J=y("".slice),Z=y(/./.exec),_=y([].push),at=/^\d$/,et=/^[1-9]$/,rt=/^[\d-]$/,nt=/^[\t\n\r ]$/,ut=0,ht=1,pt=function(Ct,It){Ct=M(Ct);var Dt=new Ht(Ct,0),Vt=Dt.parse(),_t=Vt.value,Nt=Dt.skip(nt,Vt.end);if(Nt<Ct.length)throw new U('Unexpected extra character: "'+K(Ct,Nt)+'" after the parsed data at: '+Nt);return A(It)?yt({"":_t},"",It,Vt):_t},yt=function(Ct,It,Dt,Vt){var _t=Ct[It],Nt=Vt&&_t===Vt.value,Jt=Nt&&typeof Vt.source=="string"?{source:Vt.source}:{},ne,ve,le,fe,Ce;if(I(_t)){var Be=R(_t),Ie=Nt?Vt.nodes:Be?[]:{};if(Be)for(ne=Ie.length,le=L(_t),fe=0;fe<le;fe++)At(_t,fe,yt(_t,""+fe,Dt,fe<ne?Ie[fe]:void 0));else for(ve=k(_t),le=L(ve),fe=0;fe<le;fe++)Ce=ve[fe],At(_t,Ce,yt(_t,Ce,Dt,O(Ie,Ce)?Ie[Ce]:void 0))}return b(Dt,Ct,It,_t,Jt)},At=function(Ct,It,Dt){if(g){var Vt=Y(Ct,It);if(Vt&&!Vt.configurable)return}Dt===void 0?delete Ct[It]:D(Ct,It,Dt)},Et=function(Ct,It,Dt,Vt){this.value=Ct,this.end=It,this.source=Dt,this.nodes=Vt},Ht=function(Ct,It){this.source=Ct,this.index=It};Ht.prototype={fork:function(Ct){return new Ht(this.source,Ct)},parse:function(){var Ct=this.source,It=this.skip(nt,this.index),Dt=this.fork(It),Vt=K(Ct,It);if(Z(rt,Vt))return Dt.number();switch(Vt){case"{":return Dt.object();case"[":return Dt.array();case'"':return Dt.string();case"t":return Dt.keyword(!0);case"f":return Dt.keyword(!1);case"n":return Dt.keyword(null)}throw new U('Unexpected character: "'+Vt+'" at: '+It)},node:function(Ct,It,Dt,Vt,_t){return new Et(It,Vt,Ct?null:J(this.source,Dt,Vt),_t)},object:function(){for(var Ct=this.source,It=this.index+1,Dt=!1,Vt={},_t={},Nt=!1;It<Ct.length;){if(It=this.until(['"',"}"],It),K(Ct,It)==="}"&&!Dt){It++,Nt=!0;break}var Jt=this.fork(It).string(),ne=Jt.value;It=Jt.end,It=this.until([":"],It)+1,It=this.skip(nt,It),Jt=this.fork(It).parse(),D(_t,ne,Jt),D(Vt,ne,Jt.value),It=this.until([",","}"],Jt.end);var ve=K(Ct,It);if(ve===",")Dt=!0,It++;else if(ve==="}"){It++,Nt=!0;break}}if(!Nt)throw new U("Unterminated object at: "+It);return this.node(ht,Vt,this.index,It,_t)},array:function(){for(var Ct=this.source,It=this.index+1,Dt=!1,Vt=[],_t=[],Nt=!1;It<Ct.length;){if(It=this.skip(nt,It),K(Ct,It)==="]"&&!Dt){It++,Nt=!0;break}var Jt=this.fork(It).parse();if(_(_t,Jt),_(Vt,Jt.value),It=this.until([",","]"],Jt.end),K(Ct,It)===",")Dt=!0,It++;else if(K(Ct,It)==="]"){It++,Nt=!0;break}}if(!Nt)throw new U("Unterminated array at: "+It);return this.node(ht,Vt,this.index,It,_t)},string:function(){var Ct=this.index,It=F(this.source,this.index+1);return this.node(ut,It.value,Ct,It.end)},number:function(){var Ct=this.source,It=this.index,Dt=It;if(K(Ct,Dt)==="-"&&Dt++,K(Ct,Dt)==="0")Dt++;else if(Z(et,K(Ct,Dt)))Dt=this.skip(at,Dt+1);else throw new U("Failed to parse number at: "+Dt);if(K(Ct,Dt)==="."){var Vt=Dt+1;if(Dt=this.skip(at,Vt),Vt===Dt)throw new U("Failed to parse number's fraction at: "+Dt)}if(K(Ct,Dt)==="e"||K(Ct,Dt)==="E"){Dt++,(K(Ct,Dt)==="+"||K(Ct,Dt)==="-")&&Dt++;var _t=Dt;if(Dt=this.skip(at,Dt),_t===Dt)throw new U("Failed to parse number's exponent value at: "+Dt)}return this.node(ut,X(J(Ct,It,Dt)),It,Dt)},keyword:function(Ct){var It=""+Ct,Dt=this.index,Vt=Dt+It.length;if(J(this.source,Dt,Vt)!==It)throw new U("Failed to parse value at: "+Dt);return this.node(ut,Ct,Dt,Vt)},skip:function(Ct,It){for(var Dt=this.source;It<Dt.length&&Z(Ct,K(Dt,It));It++);return It},until:function(Ct,It){It=this.skip(nt,It);for(var Dt=K(this.source,It),Vt=0;Vt<Ct.length;Vt++)if(Ct[Vt]===Dt)return It;throw new U('Unexpected character: "'+Dt+'" at: '+It)}};var Ut=N(function(){var Ct="9007199254740993",It;return V(Ct,function(Dt,Vt,_t){It=_t.source}),It!==Ct}),kt=G&&!N(function(){return 1/V("-0 ")!==-1/0});v({target:"JSON",stat:!0,forced:Ut},{parse:function(It,Dt){return kt&&!A(Dt)?V(It):pt(It,Dt)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(295),p=a(98),x=a(23),y=a(14),b=a(68),A=a(90),I=a(51).set,R=SyntaxError,O=x("JSON","parse"),M=x("Object","create"),L=x("Object","freeze"),D=y("".charAt),N="Unacceptable as raw JSON",F=function(G){return G===" "||G===" "||G===`
|
|
26
|
-
`||G==="\r"};v({target:"JSON",stat:!0,forced:!p},{rawJSON:function(j){var X=b(j);if(X===""||F(D(X,0))||F(D(X,X.length-1)))throw new R(N);var U=O(X);if(typeof U=="object"&&U!==null)throw new R(N);var V=M(null);return I(V,{type:"RawJSON"}),A(V,"rawJSON",X),g?L(V):V}})}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(T,P,a){"use strict";var v=a(4),g=a(82);g(v.JSON,"JSON",!0)}),(function(T,P,a){"use strict";a(298)}),(function(T,P,a){"use strict";var v=a(299),g=a(303);v("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(67),y=a(47),b=a(300),A=a(137),I=a(216),R=a(21),O=a(17),M=a(20),L=a(7),D=a(172),N=a(82),F=a(124);T.exports=function(G,j,X){var U=G.indexOf("Map")!==-1,V=G.indexOf("Weak")!==-1,k=U?"set":"add",Y=g[G],K=Y&&Y.prototype,J=Y,Z={},_=function(pt){var yt=p(K[pt]);y(K,pt,pt==="add"?function(Et){return yt(this,Et===0?0:Et),this}:pt==="delete"?function(At){return V&&!M(At)?!1:yt(this,At===0?0:At)}:pt==="get"?function(Et){return V&&!M(Et)?void 0:yt(this,Et===0?0:Et)}:pt==="has"?function(Et){return V&&!M(Et)?!1:yt(this,Et===0?0:Et)}:function(Et,Ht){return yt(this,Et===0?0:Et,Ht),this})},at=x(G,!R(Y)||!(V||K.forEach&&!L(function(){new Y().entries().next()})));if(at)J=X.getConstructor(j,G,U,k),b.enable();else if(x(G,!0)){var et=new J,rt=et[k](V?{}:-0,1)!==et,nt=L(function(){et.has(1)}),ut=D(function(pt){new Y(pt)}),ht=!V&&L(function(){for(var pt=new Y,yt=5;yt--;)pt[k](yt,yt);return!pt.has(-0)});ut||(J=j(function(pt,yt){I(pt,K);var At=F(new Y,pt,J);return O(yt)||A(yt,At[k],{that:At,AS_ENTRIES:U}),At}),J.prototype=K,K.constructor=J),(nt||ht)&&(_("delete"),_("has"),U&&_("get")),(ht||rt)&&_(k),V&&K.clear&&delete K.clear}return Z[G]=J,v({global:!0,constructor:!0,forced:J!==Y},Z),N(J,G),V||X.setStrong(J,G,U),J}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(54),x=a(20),y=a(38),b=a(44).f,A=a(57),I=a(75),R=a(301),O=a(40),M=a(295),L=!1,D=O("meta"),N=0,F=function(k){b(k,D,{value:{objectID:"O"+N++,weakData:{}}})},G=function(k,Y){if(!x(k))return typeof k=="symbol"?k:(typeof k=="string"?"S":"P")+k;if(!y(k,D)){if(!R(k))return"F";if(!Y)return"E";F(k)}return k[D].objectID},j=function(k,Y){if(!y(k,D)){if(!R(k))return!0;if(!Y)return!1;F(k)}return k[D].weakData},X=function(k){return M&&L&&R(k)&&!y(k,D)&&F(k),k},U=function(){V.enable=function(){},L=!0;var k=A.f,Y=g([].splice),K={};K[D]=1,k(K).length&&(A.f=function(J){for(var Z=k(J),_=0,at=Z.length;_<at;_++)if(Z[_]===D){Y(Z,_,1);break}return Z},v({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:I.f}))},V=T.exports={enable:U,fastKey:G,getWeakData:j,onFreeze:X};p[D]=!0}),(function(T,P,a){"use strict";var v=a(7),g=a(20),p=a(15),x=a(302),y=Object.isExtensible,b=v(function(){y(1)});T.exports=b||x?function(I){return!g(I)||x&&p(I)==="ArrayBuffer"?!1:y?y(I):!0}:y}),(function(T,P,a){"use strict";var v=a(7);T.exports=v(function(){if(typeof ArrayBuffer=="function"){var g=new ArrayBuffer(8);Object.isExtensible(g)&&Object.defineProperty(g,"a",{value:8})}})}),(function(T,P,a){"use strict";var v=a(71),g=a(77),p=a(215),x=a(84),y=a(216),b=a(17),A=a(137),I=a(177),R=a(180),O=a(201),M=a(6),L=a(300).fastKey,D=a(51),N=D.set,F=D.getterFor;T.exports={getConstructor:function(G,j,X,U){var V=G(function(Z,_){y(Z,k),N(Z,{type:j,index:v(null),first:null,last:null,size:0}),M||(Z.size=0),b(_)||A(_,Z[U],{that:Z,AS_ENTRIES:X})}),k=V.prototype,Y=F(j),K=function(Z,_,at){var et=Y(Z),rt=J(Z,_),nt,ut;return rt?rt.value=at:(et.last=rt={index:ut=L(_,!0),key:_,value:at,previous:nt=et.last,next:null,removed:!1},et.first||(et.first=rt),nt&&(nt.next=rt),M?et.size++:Z.size++,ut!=="F"&&(et.index[ut]=rt)),Z},J=function(Z,_){var at=Y(Z),et=L(_),rt;if(et!=="F")return at.index[et];for(rt=at.first;rt;rt=rt.next)if(rt.key===_)return rt};return p(k,{clear:function(){for(var _=this,at=Y(_),et=at.first;et;)et.removed=!0,et.previous&&(et.previous=et.previous.next=null),et=et.next;at.first=at.last=null,at.index=v(null),M?at.size=0:_.size=0},delete:function(Z){var _=this,at=Y(_),et=J(_,Z);if(et){var rt=et.next,nt=et.previous;delete at.index[et.index],et.removed=!0,nt&&(nt.next=rt),rt&&(rt.previous=nt),at.first===et&&(at.first=rt),at.last===et&&(at.last=nt),M?at.size--:_.size--}return!!et},forEach:function(_){for(var at=Y(this),et=x(_,arguments.length>1?arguments[1]:void 0),rt;rt=rt?rt.next:at.first;)for(et(rt.value,rt.key,this);rt&&rt.removed;)rt=rt.previous},has:function(_){return!!J(this,_)}}),p(k,X?{get:function(_){var at=J(this,_);return at&&at.value},set:function(_,at){return K(this,_===0?0:_,at)}}:{add:function(_){return K(this,_=_===0?0:_,_)}}),M&&g(k,"size",{configurable:!0,get:function(){return Y(this).size}}),V},setStrong:function(G,j,X){var U=j+" Iterator",V=F(j),k=F(U);I(G,j,function(Y,K){N(this,{type:U,target:Y,state:V(Y),kind:K,last:null})},function(){for(var Y=k(this),K=Y.kind,J=Y.last;J&&J.removed;)J=J.previous;return!Y.target||!(Y.last=J=J?J.next:Y.state.first)?(Y.target=null,R(void 0,!0)):R(K==="keys"?J.key:K==="values"?J.value:[J.key,J.value],!1)},X?"entries":"values",!X,!0),O(j)}}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(16),y=a(137),b=a(148),A=a(305),I=a(36),R=a(7),O=A.Map,M=A.has,L=A.get,D=A.set,N=g([].push),F=I||R(function(){return O.groupBy("ab",function(G){return G}).get("a").length!==1});v({target:"Map",stat:!0,forced:I||F},{groupBy:function(j,X){x(j),p(X);var U=new O,V=0;return y(j,function(k){b(V);var Y=X(k,V++);M(U,Y)?N(L(U,Y),k):D(U,Y,[k])}),U}})}),(function(T,P,a){"use strict";var v=a(14),g=Map.prototype;T.exports={Map,set:v(g.set),get:v(g.get),has:v(g.has),remove:v(g.delete),proto:g}}),(function(T,P,a){"use strict";var v=a(3),g=a(305),p=a(36),x=g.get,y=g.has,b=g.set;v({target:"Map",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(30),p=a(305),x=a(36),y=p.get,b=p.has,A=p.set;v({target:"Map",proto:!0,real:!0,forced:x},{getOrInsertComputed:function(R,O){var M=b(this,R);if(g(O),M)return y(this,R);R===0&&1/R===-1/0&&(R=0);var L=O(R);return A(this,R,L),L}})}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.acosh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=!p||Math.floor(p(Number.MAX_VALUE))!==710||p(1/0)!==1/0;v({target:"Math",stat:!0,forced:A},{acosh:function(R){var O=+R;return O<1?NaN:O>9490626562425156e-8?x(O)+b:g(O-1+y(O-1)*y(O+1))}})}),(function(T){"use strict";var P=Math.log;T.exports=Math.log1p||function(v){var g=+v;if(g>-1e-8&&g<1e-8)return g-g*g/2;var p=1+g;return p===1?g:g===p-1?P(p):g*P(p)/(p-1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.asinh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=9490626562425156e-8;function I(O){var M=+O;return!isFinite(M)||M===0?M:M<0?-I(-M):M>A?x(M)+b:M<1e-8?M:g(M+M*M/(1+y(M*M+1)))}var R=!(p&&1/p(0)>0);v({target:"Math",stat:!0,forced:R},{asinh:I})}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.atanh,x=!(p&&1/p(-0)<0);v({target:"Math",stat:!0,forced:x},{atanh:function(b){var A=+b;return A===0?A:g(2*A/(1-A))/2}})}),(function(T,P,a){"use strict";var v=a(3),g=a(220),p=Math.abs,x=Math.pow;v({target:"Math",stat:!0},{cbrt:function(b){var A=+b,I=g(A)*x(p(A),1/3);return A!==0&&isFinite(A)?(2*I+A/(I*I))/3:I}})}),(function(T,P,a){"use strict";var v=a(3),g=Math.floor,p=Math.log,x=Math.LOG2E;v({target:"Math",stat:!0},{clz32:function(b){var A=b>>>0;return A?31-g(p(A+.5)*x):32}})}),(function(T,P,a){"use strict";var v=a(3),g=a(315),p=Math.cosh,x=Math.abs,y=Math.E,b=!p||p(710)===1/0;v({target:"Math",stat:!0,forced:b},{cosh:function(I){var R=g(x(I)-1)+1;return(R+1/(R*y*y))*(y/2)}})}),(function(T){"use strict";var P=Math.expm1,a=Math.exp;T.exports=!P||P(10)>22025.465794806718||P(10)<22025.465794806718||P(-2e-17)!==-2e-17?function(g){var p=+g;return p===0?p:p>-1e-6&&p<1e-6?p+p*p/2:a(p)-1}:P}),(function(T,P,a){"use strict";var v=a(3),g=a(315);v({target:"Math",stat:!0,forced:g!==Math.expm1},{expm1:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(218);v({target:"Math",stat:!0},{fround:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(219),p=.0009765625,x=65504,y=6103515625e-14;v({target:"Math",stat:!0},{f16round:function(A){return g(A,p,x,y)}})}),(function(T,P,a){"use strict";var v=a(3),g=Math.hypot,p=Math.abs,x=Math.sqrt,y=!!g&&g(1/0,NaN)!==1/0;v({target:"Math",stat:!0,arity:2,forced:y},{hypot:function(A,I){for(var R=0,O=0,M=arguments.length,L=0,D,N;O<M;)D=p(arguments[O++]),L<D?(N=L/D,R=R*N*N+1,L=D):D>0?(N=D/L,R+=N*N):R+=D;return L===1/0?1/0:L*x(R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=Math.imul,x=g(function(){return p(4294967295,5)!==-5||p.length!==2});v({target:"Math",stat:!0,forced:x},{imul:function(b,A){var I=65535,R=+b,O=+A,M=I&R,L=I&O;return 0|M*L+((I&R>>>16)*L+M*(I&O>>>16)<<16>>>0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(322);v({target:"Math",stat:!0},{log10:g})}),(function(T){"use strict";var P=Math.log,a=Math.LOG10E;T.exports=Math.log10||function(g){return P(g)*a}}),(function(T,P,a){"use strict";var v=a(3),g=a(309);v({target:"Math",stat:!0},{log1p:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(231);v({target:"Math",stat:!0},{log2:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(220);v({target:"Math",stat:!0},{sign:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(315),x=Math.abs,y=Math.exp,b=Math.E,A=g(function(){return Math.sinh(-2e-17)!==-2e-17});v({target:"Math",stat:!0,forced:A},{sinh:function(R){var O=+R;return x(O)<1?(p(O)-p(-O))/2:(y(O-1)-y(-O-1))*(b/2)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(137),x=RangeError,y=TypeError,b=1/0,A=NaN,I=Math.abs,R=Math.pow,O=g([].push),M=R(2,1023),L=R(2,53)-1,D=Number.MAX_VALUE,N=R(2,971),F={},G={},j={},X={},U={},V=function(k,Y){var K=k+Y,J=Y-(K-k);return{hi:K,lo:J}};v({target:"Math",stat:!0},{sumPrecise:function(Y){var K=[],J=0,Z=X;switch(p(Y,function(Ct){if(++J>L)throw new x("Maximum allowed index exceeded");if(typeof Ct!="number")throw new y("Value is not a number");Z!==F&&(Ct!==Ct?Z=F:Ct===b?Z=Z===G?F:j:Ct===-b?Z=Z===j?F:G:(Ct!==0||1/Ct===b)&&(Z===X||Z===U)&&(Z=U,O(K,Ct)))}),Z){case F:return A;case G:return-b;case j:return b;case X:return-0}for(var _=[],at=0,et,rt,nt,ut,ht,pt,yt=0;yt<K.length;yt++){et=K[yt];for(var At=0,Et=0;Et<_.length;Et++){if(rt=_[Et],I(et)<I(rt)&&(pt=et,et=rt,rt=pt),nt=V(et,rt),ut=nt.hi,ht=nt.lo,I(ut)===b){var Ht=ut===b?1:-1;at+=Ht,et=et-Ht*M-Ht*M,I(et)<I(rt)&&(pt=et,et=rt,rt=pt),nt=V(et,rt),ut=nt.hi,ht=nt.lo}ht!==0&&(_[At++]=ht),et=ut}_.length=At,et!==0&&O(_,et)}var Ut=_.length-1;if(ut=0,ht=0,at!==0){var kt=Ut>=0?_[Ut]:0;if(Ut--,I(at)>1||at>0&&kt>0||at<0&&kt<0)return at>0?b:-b;if(nt=V(at*M,kt/2),ut=nt.hi,ht=nt.lo,ht*=2,I(2*ut)===b)return ut>0?ut===M&&ht===-(N/2)&&Ut>=0&&_[Ut]<0?D:b:ut===-M&&ht===N/2&&Ut>=0&&_[Ut]>0?-D:-b;ht!==0&&(_[++Ut]=ht,ht=0),ut*=2}for(;Ut>=0&&(nt=V(ut,_[Ut--]),ut=nt.hi,ht=nt.lo,ht===0););return Ut>=0&&(ht<0&&_[Ut]<0||ht>0&&_[Ut]>0)&&(rt=ht*2,et=ut+rt,rt===et-ut&&(ut=et)),ut}})}),(function(T,P,a){"use strict";var v=a(3),g=a(315),p=Math.exp;v({target:"Math",stat:!0},{tanh:function(y){var b=+y,A=g(b),I=g(-b);return A===1/0?1:I===1/0?-1:(A-I)/(p(b)+p(-b))}})}),(function(T,P,a){"use strict";var v=a(82);v(Math,"Math",!0)}),(function(T,P,a){"use strict";var v=a(3),g=a(62);v({target:"Math",stat:!0},{trunc:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(6),x=a(4),y=a(80),b=a(14),A=a(67),I=a(38),R=a(124),O=a(24),M=a(22),L=a(19),D=a(7),N=a(57).f,F=a(5).f,G=a(44).f,j=a(96),X=a(332).trim,U="Number",V=x[U],k=y[U],Y=V.prototype,K=x.TypeError,J=b("".slice),Z=b("".charCodeAt),_=function(ht){var pt=L(ht,"number");return typeof pt=="bigint"?pt:at(pt)},at=function(ht){var pt=L(ht,"number"),yt,At,Et,Ht,Ut,kt,Ct,It;if(M(pt))throw new K("Cannot convert a Symbol value to a number");if(typeof pt=="string"&&pt.length>2){if(pt=X(pt),yt=Z(pt,0),yt===43||yt===45){if(At=Z(pt,2),At===88||At===120)return NaN}else if(yt===48){switch(Z(pt,1)){case 66:case 98:Et=2,Ht=49;break;case 79:case 111:Et=8,Ht=55;break;default:return+pt}for(Ut=J(pt,2),kt=Ut.length,Ct=0;Ct<kt;Ct++)if(It=Z(Ut,Ct),It<48||It>Ht)return NaN;return parseInt(Ut,Et)}}return+pt},et=A(U,!V(" 0o1")||!V("0b1")||V("+0x1")),rt=function(ht){return O(Y,ht)&&D(function(){j(ht)})},nt=function(pt){var yt=arguments.length<1?0:V(_(pt));return rt(this)?R(Object(yt),this,nt):yt};nt.prototype=Y,et&&!g&&(Y.constructor=nt),v({global:!0,constructor:!0,wrap:!0,forced:et},{Number:nt});var ut=function(ht,pt){for(var yt=p?N(pt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),At=0,Et;yt.length>At;At++)I(pt,Et=yt[At])&&!I(ht,Et)&&G(ht,Et,F(pt,Et))};g&&k&&ut(y[U],k),(et||g)&&ut(y[U],V)}),(function(T,P,a){"use strict";var v=a(14),g=a(16),p=a(68),x=a(333),y=v("".replace),b=RegExp("^["+x+"]+"),A=RegExp("(^|[^"+x+"])["+x+"]+$"),I=function(R){return function(O){var M=p(g(O));return R&1&&(M=y(M,b,"")),R&2&&(M=y(M,A,"$1")),M}};T.exports={start:I(1),end:I(2),trim:I(3)}}),(function(T){"use strict";T.exports=`
|
|
27
|
-
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(T,P,a){"use strict";var v=a(3),g=a(336);v({target:"Number",stat:!0},{isFinite:g})}),(function(T,P,a){"use strict";var v=a(4),g=v.isFinite;T.exports=Number.isFinite||function(x){return typeof x=="number"&&g(x)}}),(function(T,P,a){"use strict";var v=a(3),g=a(338);v({target:"Number",stat:!0},{isInteger:g})}),(function(T,P,a){"use strict";var v=a(20),g=Math.floor;T.exports=Number.isInteger||function(x){return!v(x)&&isFinite(x)&&g(x)===x}}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(T,P,a){"use strict";var v=a(3),g=a(338),p=Math.abs;v({target:"Number",stat:!0},{isSafeInteger:function(y){return g(y)&&p(y)<=9007199254740991}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(T,P,a){"use strict";var v=a(3),g=a(344);v({target:"Number",stat:!0,forced:Number.parseFloat!==g},{parseFloat:g})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(68),y=a(332).trim,b=a(333),A=p("".charAt),I=v.parseFloat,R=v.Symbol,O=R&&R.iterator,M=1/I(b+"-0")!==-1/0||O&&!g(function(){I(Object(O))});T.exports=M?function(D){var N=y(x(D)),F=I(N);return F===0&&A(N,0)==="-"?-0:F}:I}),(function(T,P,a){"use strict";var v=a(3),g=a(346);v({target:"Number",stat:!0,forced:Number.parseInt!==g},{parseInt:g})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(68),y=a(332).trim,b=a(333),A=v.parseInt,I=v.Symbol,R=I&&I.iterator,O=/^[+-]?0x/i,M=p(O.exec),L=A(b+"08")!==8||A(b+"0x16")!==22||R&&!g(function(){A(Object(R))});T.exports=L?function(N,F){var G=y(x(N));return A(G,F>>>0||(M(O,G)?16:10))}:A}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=a(96),y=a(249),b=a(322),A=a(7),I=RangeError,R=String,O=isFinite,M=Math.abs,L=Math.floor,D=Math.pow,N=Math.round,F=g(1.1.toExponential),G=g(y),j=g("".slice),X=D(10,308),U=F(-69e-12,4)==="-6.9000e-11"&&F(1.255,2)==="1.25e+0"&&F(12345,3)==="1.235e+4"&&F(25,0)==="3e+1",V=function(){return A(function(){F(1,1/0)})&&A(function(){F(1,-1/0)})},k=function(){return!A(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!U||!V()||!k();v({target:"Number",proto:!0,forced:Y},{toExponential:function(J){var Z=x(this);if(J===void 0)return F(Z);var _=p(J);if(!O(Z))return String(Z);if(_<0||_>20)throw new I("Incorrect fraction digits");if(U)return F(Z,_);var at="",et,rt,nt,ut,ht,pt,yt;return Z<0&&(at="-",Z=-Z),Z===0?(rt=0,et=G("0",_+1)):(ht=b(Z),rt=L(ht),_-rt>=308?yt=Z*X*D(10,_-rt-308):yt=Z/D(10,rt-_),pt=N(yt),yt-pt>=.5&&(pt+=1),pt>=D(10,_+1)&&(pt/=10,rt+=1),et=R(pt)),_!==0&&(et=j(et,0,1)+"."+j(et,1)),rt===0?(nt="+",ut="0"):(nt=rt>0?"+":"-",ut=R(M(rt))),et+="e"+nt+ut,at+et}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=a(96),y=a(249),b=a(7),A=RangeError,I=String,R=Math.floor,O=g(y),M=g("".slice),L=g(1.1.toFixed),D=function(U,V,k){return V===0?k:V%2===1?D(U,V-1,k*U):D(U*U,V/2,k)},N=function(U){for(var V=0,k=U;k>=4096;)V+=12,k/=4096;for(;k>=2;)V+=1,k/=2;return V},F=function(U,V,k){for(var Y=-1,K=k;++Y<6;)K+=V*U[Y],U[Y]=K%1e7,K=R(K/1e7)},G=function(U,V){for(var k=6,Y=0;--k>=0;)Y+=U[k],U[k]=R(Y/V),Y=Y%V*1e7},j=function(U){for(var V=6,k="";--V>=0;)if(k!==""||V===0||U[V]!==0){var Y=I(U[V]);k=k===""?Y:k+O("0",7-Y.length)+Y}return k},X=b(function(){return L(8e-5,3)!=="0.000"||L(.9,0)!=="1"||L(1.255,2)!=="1.25"||L(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){L({})});v({target:"Number",proto:!0,forced:X},{toFixed:function(V){var k=x(this),Y=p(V),K=[0,0,0,0,0,0],J="",Z="0",_,at,et,rt;if(Y<0||Y>20)throw new A("Incorrect fraction digits");if(k!==k)return"NaN";if(k<=-1e21||k>=1e21)return I(k);if(k<0&&(J="-",k=-k),k>1e-21)if(_=N(k*D(2,69,1))-69,at=_<0?k*D(2,-_,1):k/D(2,_,1),at*=4503599627370496,_=52-_,_>0){for(F(K,0,at),et=Y;et>=7;)F(K,1e7,0),et-=7;for(F(K,D(10,et,1),0),et=_-1;et>=23;)G(K,8388608),et-=23;G(K,1<<et),F(K,1,1),G(K,2),Z=j(K)}else F(K,0,at),F(K,1<<-_,0),Z=j(K)+O("0",Y);return Y>0?(rt=Z.length,Z=J+(rt<=Y?"0."+O("0",Y-rt)+Z:M(Z,0,rt-Y)+"."+M(Z,rt-Y))):Z=J+Z,Z}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(7),x=a(96),y=g(1.1.toPrecision),b=p(function(){return y(1,void 0)!=="1"})||!p(function(){y({})});v({target:"Number",proto:!0,forced:b},{toPrecision:function(I){return I===void 0?y(x(this)):y(x(this),I)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(351);v({target:"Object",stat:!0,arity:2,forced:Object.assign!==g},{assign:g})}),(function(T,P,a){"use strict";var v=a(6),g=a(14),p=a(8),x=a(7),y=a(73),b=a(66),A=a(10),I=a(39),R=a(13),O=Object.assign,M=Object.defineProperty,L=g([].concat);T.exports=!O||x(function(){if(v&&O({b:1},O(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var D={},N={},F=Symbol("assign detection"),G="abcdefghijklmnopqrst";return D[F]=7,G.split("").forEach(function(j){N[j]=j}),O({},D)[F]!==7||y(O({},N)).join("")!==G})?function(N,F){for(var G=I(N),j=arguments.length,X=1,U=b.f,V=A.f;j>X;)for(var k=R(arguments[X++]),Y=U?L(y(k),U(k)):y(k),K=Y.length,J=0,Z;K>J;)Z=Y[J++],(!v||p(V,k,Z))&&(G[Z]=k[Z]);return G}:O}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(71);v({target:"Object",stat:!0,sham:!g},{create:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(30),y=a(39),b=a(44);g&&v({target:"Object",proto:!0,forced:p},{__defineGetter__:function(I,R){b.f(y(this),I,{get:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){"use strict";var v=a(36),g=a(4),p=a(7),x=a(199);T.exports=v||!p(function(){if(!(x&&x<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete g[y]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(72).f;v({target:"Object",stat:!0,forced:Object.defineProperties!==p,sham:!g},{defineProperties:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(44).f;v({target:"Object",stat:!0,forced:Object.defineProperty!==p,sham:!g},{defineProperty:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(30),y=a(39),b=a(44);g&&v({target:"Object",proto:!0,forced:p},{__defineSetter__:function(I,R){b.f(y(this),I,{set:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(359).entries;v({target:"Object",stat:!0},{entries:function(x){return g(x)}})}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(14),x=a(135),y=a(73),b=a(12),A=a(10).f,I=p(A),R=p([].push),O=v&&g(function(){var L=Object.create(null);return L[2]=2,!I(L,2)}),M=function(L){return function(D){for(var N=b(D),F=y(N),G=O&&x(N)===null,j=F.length,X=0,U=[],V;j>X;)V=F[X++],(!v||(G?V in N:I(N,V)))&&R(U,L?[V,N[V]]:N[V]);return U}};T.exports={entries:M(!0),values:M(!1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(295),p=a(7),x=a(20),y=a(300).onFreeze,b=Object.freeze,A=p(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!g},{freeze:function(R){return b&&x(R)?b(y(R)):R}})}),(function(T,P,a){"use strict";var v=a(3),g=a(137),p=a(90);v({target:"Object",stat:!0},{fromEntries:function(y){var b={};return g(y,function(A,I){p(b,A,I)},{AS_ENTRIES:!0}),b}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(12),x=a(5).f,y=a(6),b=!y||g(function(){x(1)});v({target:"Object",stat:!0,forced:b,sham:!y},{getOwnPropertyDescriptor:function(I,R){return x(p(I),R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(56),x=a(12),y=a(5),b=a(90);v({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(I){for(var R=x(I),O=y.f,M=p(R),L={},D=0,N,F;M.length>D;)F=O(R,N=M[D++]),F!==void 0&&b(L,N,F);return L}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(75).f,x=g(function(){return!Object.getOwnPropertyNames(1)});v({target:"Object",stat:!0,forced:x},{getOwnPropertyNames:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(39),x=a(135),y=a(136),b=g(function(){x(1)});v({target:"Object",stat:!0,forced:b,sham:!y},{getPrototypeOf:function(I){return x(p(I))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(90),p=a(23),x=a(14),y=a(30),b=a(16),A=a(18),I=a(137),R=a(148),O=a(7),M=Object.groupBy,L=p("Object","create"),D=x([].push),N=!M||O(function(){return M("ab",function(F){return F}).a.length!==1});v({target:"Object",stat:!0,forced:N},{groupBy:function(G,j){b(G),y(j);var X=L(null),U=0;return I(G,function(V){R(U);var k=A(j(V,U++));k in X?D(X[k],V):g(X,k,[V])}),X}})}),(function(T,P,a){"use strict";var v=a(3),g=a(38);v({target:"Object",stat:!0},{hasOwn:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(369);v({target:"Object",stat:!0},{is:g})}),(function(T){"use strict";T.exports=Object.is||function(a,v){return a===v?a!==0||1/a===1/v:a!==a&&v!==v}}),(function(T,P,a){"use strict";var v=a(3),g=a(301);v({target:"Object",stat:!0,forced:Object.isExtensible!==g},{isExtensible:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(20),x=a(15),y=a(302),b=Object.isFrozen,A=y||g(function(){b(1)});v({target:"Object",stat:!0,forced:A},{isFrozen:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(20),x=a(15),y=a(302),b=Object.isSealed,A=y||g(function(){b(1)});v({target:"Object",stat:!0,forced:A},{isSealed:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(73),x=a(7),y=x(function(){p(1)});v({target:"Object",stat:!0,forced:y},{keys:function(A){return p(g(A))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(39),y=a(18),b=a(135),A=a(5).f;g&&v({target:"Object",proto:!0,forced:p},{__lookupGetter__:function(R){var O=x(this),M=y(R),L;do if(L=A(O,M))return L.get;while(O=b(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(39),y=a(18),b=a(135),A=a(5).f;g&&v({target:"Object",proto:!0,forced:p},{__lookupSetter__:function(R){var O=x(this),M=y(R),L;do if(L=A(O,M))return L.set;while(O=b(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(20),p=a(300).onFreeze,x=a(295),y=a(7),b=Object.preventExtensions,A=y(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!x},{preventExtensions:function(R){return b&&g(R)?b(p(R)):R}})}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(20),x=a(122),y=a(39),b=a(16),A=Object.getPrototypeOf,I=Object.setPrototypeOf,R=Object.prototype,O="__proto__";if(v&&A&&I&&{}[O]!==R)try{g(R,O,{configurable:!0,get:function(){return A(y(this))},set:function(L){var D=b(this);x(L)&&p(D)&&I(D,L)}})}catch(M){}}),(function(T,P,a){"use strict";var v=a(3),g=a(20),p=a(300).onFreeze,x=a(295),y=a(7),b=Object.seal,A=y(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!x},{seal:function(R){return b&&g(R)?b(p(R)):R}})}),(function(T,P,a){"use strict";var v=a(3),g=a(119);v({target:"Object",stat:!0},{setPrototypeOf:g})}),(function(T,P,a){"use strict";var v=a(70),g=a(47),p=a(381);v||g(Object.prototype,"toString",p,{unsafe:!0})}),(function(T,P,a){"use strict";var v=a(70),g=a(69);T.exports=v?{}.toString:function(){return"[object "+g(this)+"]"}}),(function(T,P,a){"use strict";var v=a(3),g=a(359).values;v({target:"Object",stat:!0},{values:function(x){return g(x)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(344);v({global:!0,forced:parseFloat!==g},{parseFloat:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(346);v({global:!0,forced:parseInt!==g},{parseInt:g})}),(function(T,P,a){"use strict";a(386),a(402),a(404),a(405),a(406),a(407)}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(189),x=a(4),y=a(80),b=a(8),A=a(47),I=a(119),R=a(82),O=a(201),M=a(30),L=a(21),D=a(20),N=a(216),F=a(387),G=a(389).set,j=a(392),X=a(397),U=a(398),V=a(394),k=a(51),Y=a(399),K=a(400),J=a(401),Z="Promise",_=K.CONSTRUCTOR,at=K.REJECTION_EVENT,et=K.SUBCLASSING,rt=k.getterFor(Z),nt=k.set,ut=Y&&Y.prototype,ht=Y,pt=ut,yt=x.TypeError,At=x.document,Et=x.process,Ht=J.f,Ut=Ht,kt=!!(At&&At.createEvent&&x.dispatchEvent),Ct="unhandledrejection",It="rejectionhandled",Dt=0,Vt=1,_t=2,Nt=1,Jt=2,ne,ve,le,fe,Ce=function($t){var Xt;return D($t)&&L(Xt=$t.then)?Xt:!1},Be=function($t,Xt){var re=Xt.value,oe=Xt.state===Vt,pe=oe?$t.ok:$t.fail,rn=$t.resolve,vt=$t.reject,Rt=$t.domain,Tt,wt,Ft;try{pe?(oe||(Xt.rejection===Jt&&Pt(Xt),Xt.rejection=Nt),pe===!0?Tt=re:(Rt&&Rt.enter(),Tt=pe(re),Rt&&(Rt.exit(),Ft=!0)),Tt===$t.promise?vt(new yt("Promise-chain cycle")):(wt=Ce(Tt))?b(wt,Tt,rn,vt):rn(Tt)):vt(re)}catch(Lt){Rt&&!Ft&&Rt.exit(),vt(Lt)}},Ie=function($t,Xt){$t.notified||($t.notified=!0,j(function(){for(var re=$t.reactions,oe;oe=re.get();)Be(oe,$t);$t.notified=!1,Xt&&!$t.rejection&&xe($t)}))},ce=function($t,Xt,re){var oe,pe;kt?(oe=At.createEvent("Event"),oe.promise=Xt,oe.reason=re,oe.initEvent($t,!1,!0),x.dispatchEvent(oe)):oe={promise:Xt,reason:re},!at&&(pe=x["on"+$t])?pe(oe):$t===Ct&&X("Unhandled promise rejection",re)},xe=function($t){b(G,x,function(){var Xt=$t.facade,re=$t.value,oe=Ue($t),pe;if(oe&&(pe=U(function(){p?Et.emit("unhandledRejection",re,Xt):ce(Ct,Xt,re)}),$t.rejection=p||Ue($t)?Jt:Nt,pe.error))throw pe.value})},Ue=function($t){return $t.rejection!==Nt&&!$t.parent},Pt=function($t){b(G,x,function(){var Xt=$t.facade;p?Et.emit("rejectionHandled",Xt):ce(It,Xt,$t.value)})},zt=function($t,Xt,re){return function(oe){$t(Xt,oe,re)}},jt=function($t,Xt,re){$t.done||($t.done=!0,re&&($t=re),$t.value=Xt,$t.state=_t,Ie($t,!0))},we=function($t,Xt,re){if(!$t.done){$t.done=!0,re&&($t=re);try{if($t.facade===Xt)throw new yt("Promise can't be resolved itself");var oe=Ce(Xt);oe?j(function(){var pe={done:!1};try{b(oe,Xt,zt(we,pe,$t),zt(jt,pe,$t))}catch(rn){jt(pe,rn,$t)}}):($t.value=Xt,$t.state=Vt,Ie($t,!1))}catch(pe){jt({done:!1},pe,$t)}}};if(_&&(ht=function(Xt){N(this,pt),M(Xt),b(ne,this);var re=rt(this);try{Xt(zt(we,re),zt(jt,re))}catch(oe){jt(re,oe)}},pt=ht.prototype,ne=function(Xt){nt(this,{type:Z,done:!1,notified:!1,parent:!1,reactions:new V,rejection:!1,state:Dt,value:null})},ne.prototype=A(pt,"then",function(Xt,re){var oe=rt(this),pe=Ht(F(this,ht));return oe.parent=!0,pe.ok=L(Xt)?Xt:!0,pe.fail=L(re)&&re,pe.domain=p?Et.domain:void 0,oe.state===Dt?oe.reactions.add(pe):j(function(){Be(pe,oe)}),pe.promise}),ve=function(){var $t=new ne,Xt=rt($t);this.promise=$t,this.resolve=zt(we,Xt),this.reject=zt(jt,Xt)},J.f=Ht=function($t){return $t===ht||$t===le?new ve($t):Ut($t)},!g&&L(Y)&&ut!==Object.prototype)){fe=ut.then,et||A(ut,"then",function(Xt,re){var oe=this;return new ht(function(pe,rn){b(fe,oe,pe,rn)}).then(Xt,re)},{unsafe:!0});try{delete ut.constructor}catch($t){}I&&I(ut,pt)}v({global:!0,constructor:!0,wrap:!0,forced:_},{Promise:ht}),le=y.Promise,R(ht,Z,!1,!0),O(Z)}),(function(T,P,a){"use strict";var v=a(46),g=a(388),p=a(17),x=a(33),y=x("species");T.exports=function(b,A){var I=v(b).constructor,R;return I===void 0||p(R=v(I)[y])?A:g(R)}}),(function(T,P,a){"use strict";var v=a(89),g=a(31),p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not a constructor")}}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(84),x=a(21),y=a(38),b=a(7),A=a(74),I=a(76),R=a(42),O=a(390),M=a(391),L=a(189),D=v.setImmediate,N=v.clearImmediate,F=v.process,G=v.Dispatch,j=v.Function,X=v.MessageChannel,U=v.String,V=0,k={},Y="onreadystatechange",K,J,Z,_;b(function(){K=v.location});var at=function(ut){if(y(k,ut)){var ht=k[ut];delete k[ut],ht()}},et=function(ut){return function(){at(ut)}},rt=function(ut){at(ut.data)},nt=function(ut){v.postMessage(U(ut),K.protocol+"//"+K.host)};(!D||!N)&&(D=function(ht){O(arguments.length,1);var pt=x(ht)?ht:j(ht),yt=I(arguments,1);return k[++V]=function(){g(pt,void 0,yt)},J(V),V},N=function(ht){delete k[ht]},L?J=function(ut){F.nextTick(et(ut))}:G&&G.now?J=function(ut){G.now(et(ut))}:X&&!M?(Z=new X,_=Z.port2,Z.port1.onmessage=rt,J=p(_.postMessage,_)):v.addEventListener&&x(v.postMessage)&&!v.importScripts&&K&&K.protocol!=="file:"&&!b(nt)?(J=nt,v.addEventListener("message",rt,!1)):Y in R("script")?J=function(ut){A.appendChild(R("script"))[Y]=function(){A.removeChild(this),at(ut)}}:J=function(ut){setTimeout(et(ut),0)}),T.exports={set:D,clear:N}}),(function(T){"use strict";var P=TypeError;T.exports=function(a,v){if(a<v)throw new P("Not enough arguments");return a}}),(function(T,P,a){"use strict";var v=a(28);T.exports=/ipad|iphone|ipod/i.test(v)&&/applewebkit/i.test(v)}),(function(T,P,a){"use strict";var v=a(4),g=a(393),p=a(84),x=a(389).set,y=a(394),b=a(391),A=a(395),I=a(396),R=a(189),O=v.MutationObserver||v.WebKitMutationObserver,M=v.document,L=v.process,D=v.Promise,N=g("queueMicrotask"),F,G,j,X,U;if(!N){var V=new y,k=function(){var Y,K;for(R&&(Y=L.domain)&&Y.exit();K=V.get();)try{K()}catch(J){throw V.head&&F(),J}Y&&Y.enter()};!b&&!R&&!I&&O&&M?(G=!0,j=M.createTextNode(""),new O(k).observe(j,{characterData:!0}),F=function(){j.data=G=!G}):!A&&D&&D.resolve?(X=D.resolve(void 0),X.constructor=D,U=p(X.then,X),F=function(){U(k)}):R?F=function(){L.nextTick(k)}:(x=p(x,v),F=function(){x(k)}),N=function(Y){V.head||F(),V.add(Y)}}T.exports=N}),(function(T,P,a){"use strict";var v=a(4),g=a(6),p=Object.getOwnPropertyDescriptor;T.exports=function(x){if(!g)return v[x];var y=p(v,x);return y&&y.value}}),(function(T){"use strict";var P=function(){this.head=null,this.tail=null};P.prototype={add:function(a){var v={item:a,next:null},g=this.tail;g?g.next=v:this.head=v,this.tail=v},get:function(){var a=this.head;if(a){var v=this.head=a.next;return v===null&&(this.tail=null),a.item}}},T.exports=P}),(function(T,P,a){"use strict";var v=a(28);T.exports=/ipad|iphone|ipod/i.test(v)&&typeof Pebble!="undefined"}),(function(T,P,a){"use strict";var v=a(28);T.exports=/web0s(?!.*chrome)/i.test(v)}),(function(T){"use strict";T.exports=function(P,a){try{arguments.length===1?console.error(P):console.error(P,a)}catch(v){}}}),(function(T){"use strict";T.exports=function(P){try{return{error:!1,value:P()}}catch(a){return{error:!0,value:a}}}}),(function(T,P,a){"use strict";var v=a(4);T.exports=v.Promise}),(function(T,P,a){"use strict";var v=a(4),g=a(399),p=a(21),x=a(67),y=a(50),b=a(33),A=a(190),I=a(36),R=a(27),O=g&&g.prototype,M=b("species"),L=!1,D=p(v.PromiseRejectionEvent),N=x("Promise",function(){var F=y(g),G=F!==String(g);if(!G&&R===66||I&&!(O.catch&&O.finally))return!0;if(!R||R<51||!/native code/.test(F)){var j=new g(function(V){V(1)}),X=function(V){V(function(){},function(){})},U=j.constructor={};if(U[M]=X,L=j.then(function(){})instanceof X,!L)return!0}return!G&&(A==="BROWSER"||A==="DENO")&&!D});T.exports={CONSTRUCTOR:N,REJECTION_EVENT:D,SUBCLASSING:L}}),(function(T,P,a){"use strict";var v=a(30),g=TypeError,p=function(x){var y,b;this.promise=new x(function(A,I){if(y!==void 0||b!==void 0)throw new g("Bad Promise constructor");y=A,b=I}),this.resolve=v(y),this.reject=v(b)};T.exports.f=function(x){return new p(x)}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{all:function(R){var O=this,M=x.f(O),L=M.resolve,D=M.reject,N=y(function(){var F=p(O.resolve),G=[],j=0,X=1;b(R,function(U){var V=j++,k=!1;X++,g(F,O,U).then(function(Y){k||(k=!0,G[V]=Y,--X||L(G))},D)}),--X||L(G)});return N.error&&D(N.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(399),g=a(172),p=a(400).CONSTRUCTOR;T.exports=p||!g(function(x){v.all(x).then(void 0,function(){})})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(400).CONSTRUCTOR,x=a(399),y=a(23),b=a(21),A=a(47),I=x&&x.prototype;if(v({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(O){return this.then(void 0,O)}}),!g&&b(x)){var R=y("Promise").prototype.catch;I.catch!==R&&A(I,"catch",R,{unsafe:!0})}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{race:function(R){var O=this,M=x.f(O),L=M.reject,D=y(function(){var N=p(O.resolve);b(R,function(F){g(N,O,F).then(M.resolve,L)})});return D.error&&L(D.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(401),p=a(400).CONSTRUCTOR;v({target:"Promise",stat:!0,forced:p},{reject:function(y){var b=g.f(this),A=b.reject;return A(y),b.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(36),x=a(399),y=a(400).CONSTRUCTOR,b=a(408),A=g("Promise"),I=p&&!y;v({target:"Promise",stat:!0,forced:p||y},{resolve:function(O){return b(I&&this===A?x:this,O)}})}),(function(T,P,a){"use strict";var v=a(46),g=a(20),p=a(401);T.exports=function(x,y){if(v(x),g(y)&&y.constructor===x)return y;var b=p.f(x),A=b.resolve;return A(y),b.promise}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{allSettled:function(R){var O=this,M=x.f(O),L=M.resolve,D=M.reject,N=y(function(){var F=p(O.resolve),G=[],j=0,X=1;b(R,function(U){var V=j++,k=!1;X++,g(F,O,U).then(function(Y){k||(k=!0,G[V]={status:"fulfilled",value:Y},--X||L(G))},function(Y){k||(k=!0,G[V]={status:"rejected",reason:Y},--X||L(G))})}),--X||L(G)});return N.error&&D(N.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(23),y=a(401),b=a(398),A=a(137),I=a(403),R="No one promise resolved";v({target:"Promise",stat:!0,forced:I},{any:function(M){var L=this,D=x("AggregateError"),N=y.f(L),F=N.resolve,G=N.reject,j=b(function(){var X=p(L.resolve),U=[],V=0,k=1,Y=!1;A(M,function(K){var J=V++,Z=!1;k++,g(X,L,K).then(function(_){Z||Y||(Y=!0,F(_))},function(_){Z||Y||(Z=!0,U[J]=_,--k||G(new D(U,R)))})}),--k||G(new D(U,R))});return j.error&&G(j.value),N.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(399),x=a(7),y=a(23),b=a(21),A=a(387),I=a(408),R=a(47),O=p&&p.prototype,M=!!p&&x(function(){O.finally.call({then:function(){}},function(){})});if(v({target:"Promise",proto:!0,real:!0,forced:M},{finally:function(D){var N=A(this,y("Promise")),F=b(D);return this.then(F?function(G){return I(N,D()).then(function(){return G})}:D,F?function(G){return I(N,D()).then(function(){throw G})}:D)}}),!g&&b(p)){var L=y("Promise").prototype.finally;O.finally!==L&&R(O,"finally",L,{unsafe:!0})}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(117),x=a(76),y=a(408),b=a(401),A=a(30),I=a(398),R=a(7),O=g.Promise,M=!1,L=!O||!O.try||R(function(){var D=O.resolve();return O.try(function(N){return M=N===8,D},8)!==D})||!M;v({target:"Promise",stat:!0,forced:L},{try:function(D){var N=arguments.length>1?x(arguments,1):[],F=I(function(){return p(A(D),void 0,N)});if(!F.error)return y(this,F.value);var G=b.f(this),j=G.reject;return j(F.value),G.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(401);v({target:"Promise",stat:!0},{withResolvers:function(){var x=g.f(this);return{promise:x.promise,resolve:x.resolve,reject:x.reject}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(415),p=a(7),x=Array.fromAsync,y=!x||p(function(){var b=0;return x.call(function(){return b++,[]},{length:0}),b!==1});v({target:"Array",stat:!0,forced:y},{fromAsync:g})}),(function(T,P,a){"use strict";var v=a(84),g=a(14),p=a(89),x=a(416),y=a(140),b=a(269),A=a(141),I=a(29),R=a(23),O=a(206),M=a(33),L=a(417),D=a(419).toArray,N=M("asyncIterator"),F=g(O("Array","values")),G=g(F([]).next),j=function(){return new X(this)},X=function(U){this.iterator=F(U)};X.prototype.next=function(){return G(this.iterator)},T.exports=function(V){var k=this,Y=arguments.length,K=Y>1?arguments[1]:void 0,J=Y>2?arguments[2]:void 0;return new(R("Promise"))(function(Z){K!==void 0&&(K=v(K,J));var _=I(V,N),at=_?void 0:A(V)||j,et=p(k)?new k:[],rt=_?x(V,_):new L(b(y(V,at)));Z(D(rt,K,et))})}}),(function(T,P,a){"use strict";var v=a(8),g=a(417),p=a(46),x=a(140),y=a(269),b=a(29),A=a(33),I=A("asyncIterator");T.exports=function(R,O){var M=arguments.length<2?b(R,I):O;return M?p(v(M,R)):new g(y(x(R)))}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(71),x=a(29),y=a(215),b=a(51),A=a(142),I=a(23),R=a(418),O=a(180),M=I("Promise"),L="AsyncFromSyncIterator",D=b.set,N=b.getterFor(L),F=function(j,X,U,V,k){var Y=j.done;M.resolve(j.value).then(function(K){X(O(K,Y))},function(K){if(!Y&&k)try{A(V,"throw",K)}catch(J){K=J}U(K)})},G=function(X){X.type=L,D(this,X)};G.prototype=y(p(R),{next:function(){var X=N(this),U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=g(U?v(X.next,X.iterator,V):v(X.next,X.iterator));F(K,k,Y,X.iterator,!0)})},return:function(){var j=N(this),X=j.iterator,U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=x(X,"return");if(K===void 0)return k(O(V,!0));var J=g(U?v(K,X,V):v(K,X));F(J,k,Y,X)})},throw:function(){var j=N(this),X=j.iterator,U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=x(X,"throw");if(K===void 0){try{A(X,"normal")}catch(Z){return Y(Z)}return Y(new TypeError("The iterator does not provide a throw method"))}var J=g(U?v(K,X,V):v(K,X));F(J,k,Y,X,!0)})}}),T.exports=G}),(function(T,P,a){"use strict";var v=a(4),g=a(35),p=a(21),x=a(71),y=a(135),b=a(47),A=a(33),I=a(36),R="USE_FUNCTION_CONSTRUCTOR",O=A("asyncIterator"),M=v.AsyncIterator,L=g.AsyncIteratorPrototype,D,N;if(L)D=L;else if(p(M))D=M.prototype;else if(g[R]||v[R])try{N=y(y(y(Function("return async function*(){}()")()))),y(N)===Object.prototype&&(D=N)}catch(F){}D?I&&(D=x(D)):D={},p(D[O])||b(D,O,function(){return this}),T.exports=D}),(function(T,P,a){"use strict";var v=a(8),g=a(30),p=a(46),x=a(20),y=a(148),b=a(23),A=a(90),I=a(149),R=a(269),O=a(420),M=function(L){var D=L===0,N=L===1,F=L===2,G=L===3;return function(j,X,U){p(j);var V=X!==void 0;(V||!D)&&g(X);var k=R(j),Y=b("Promise"),K=k.iterator,J=k.next,Z=0;return new Y(function(_,at){var et=function(nt){O(K,at,nt,at)},rt=function(){try{try{y(Z)}catch(nt){return et(nt)}Y.resolve(p(v(J,K))).then(function(nt){try{if(p(nt).done)D?(I(U,Z),_(U)):_(G?!1:F||void 0);else{var ut=nt.value;try{if(V){var ht=Z++,pt=X(ut,ht),yt=function(At){if(N)rt();else if(F)At?rt():O(K,_,!1,at);else if(D)try{A(U,ht,At),rt()}catch(Et){et(Et)}else At?O(K,_,G||ut,at):rt()};x(pt)?Y.resolve(pt).then(yt,et):yt(pt)}else A(U,Z++,ut),rt()}catch(At){et(At)}}}catch(At){at(At)}},at)}catch(nt){at(nt)}};rt()})}};T.exports={toArray:M(0),forEach:M(1),every:M(2),some:M(3),find:M(4)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(23),x=a(29);T.exports=function(y,b,A,I){try{var R=x(y,"return");if(R)return p("Promise").resolve(v(R,y)).then(function(O){try{b!==I&&g(O)}catch(M){I(M);return}b(A)},function(O){b===I?b(A):I(O)})}catch(O){return I(b===I?A:O)}b(A)}}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(23),x=a(30),y=a(216),b=a(47),A=a(215),I=a(77),R=a(33),O=a(51),M=a(255),L=a(27),D=p("Promise"),N=p("SuppressedError"),F=ReferenceError,G=R("asyncDispose"),j=R("toStringTag"),X="AsyncDisposableStack",U=O.set,V=O.getterFor(X),k="async-dispose",Y="disposed",K="pending",J=function(et){var rt=V(et);if(rt.state===Y)throw new F(X+" already disposed");return rt},Z=function(){U(y(this,_),{type:X,state:K,stack:[]}),g||(this.disposed=!1)},_=Z.prototype;A(_,{disposeAsync:function(){var rt=this;return new D(function(nt,ut){var ht=V(rt);if(ht.state===Y)return nt(void 0);ht.state=Y,g||(rt.disposed=!0);var pt=ht.stack,yt=pt.length,At=!1,Et,Ht=function(kt){At?Et=new N(kt,Et):(At=!0,Et=kt),Ut()},Ut=function(){if(yt){var kt=pt[--yt];pt[yt]=null;try{D.resolve(kt()).then(Ut,Ht)}catch(Ct){Ht(Ct)}}else ht.stack=null,At?ut(Et):nt(void 0)};Ut()})},use:function(rt){return M(J(this),rt,k),rt},adopt:function(rt,nt){var ut=J(this);return x(nt),M(ut,void 0,k,function(){return nt(rt)}),rt},defer:function(rt){var nt=J(this);x(rt),M(nt,void 0,k,rt)},move:function(){var rt=J(this),nt=new Z;return V(nt).stack=rt.stack,rt.stack=[],rt.state=Y,g||(this.disposed=!0),nt}}),g&&I(_,"disposed",{configurable:!0,get:function(){return V(this).state===Y}}),b(_,G,_.disposeAsync,{name:"disposeAsync"}),b(_,j,X,{nonWritable:!0});var at=L&&L<136;v({global:!0,constructor:!0,forced:at},{AsyncDisposableStack:Z})}),(function(T,P,a){"use strict";var v=a(8),g=a(47),p=a(23),x=a(29),y=a(38),b=a(33),A=a(418),I=b("asyncDispose"),R=p("Promise");y(A,I)||g(A,I,function(){var O=this;return new R(function(M,L){var D=x(O,"return");D?R.resolve(v(D,O)).then(function(){M(void 0)},L):M(void 0)})})}),(function(T,P,a){"use strict";var v=a(3),g=a(117),p=a(30),x=a(46),y=a(7),b=!y(function(){Reflect.apply(function(){})});v({target:"Reflect",stat:!0,forced:b},{apply:function(I,R,O){return g(p(I),R,x(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(117),x=a(258),y=a(388),b=a(46),A=a(20),I=a(71),R=a(7),O=g("Reflect","construct"),M=Object.prototype,L=[].push,D=R(function(){function G(){}return!(O(function(){},[],G)instanceof G)}),N=!R(function(){O(function(){})}),F=D||N;v({target:"Reflect",stat:!0,forced:F,sham:F},{construct:function(j,X){y(j);var U=arguments.length<3?j:y(arguments[2]);if(b(X),N&&!D)return O(j,X,U);if(j===U){switch(X.length){case 0:return new j;case 1:return new j(X[0]);case 2:return new j(X[0],X[1]);case 3:return new j(X[0],X[1],X[2]);case 4:return new j(X[0],X[1],X[2],X[3])}var V=[null];return p(L,V,X),new(p(x,j,V))}var k=U.prototype,Y=I(A(k)?k:M),K=p(j,Y,X);return A(K)?K:Y}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(46),x=a(18),y=a(44),b=a(21),A=a(7),I=TypeError,R=A(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});v({target:"Reflect",stat:!0,forced:R,sham:!g},{defineProperty:function(M,L,D){p(M);var N=x(L),F,G;if(p(D),("get"in D||"set"in D)&&("get"in D&&!b(F=D.get)&&F!==void 0||"set"in D&&!b(G=D.set)&&G!==void 0||"value"in D||"writable"in D))throw new I("Invalid property descriptor");try{return y.f(M,N,D),!0}catch(j){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(5).f,x=a(18);v({target:"Reflect",stat:!0},{deleteProperty:function(b,A){g(b);var I=x(A),R=p(b,I);return R&&!R.configurable?!1:delete b[I]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(20),x=a(46),y=a(428),b=a(5),A=a(135),I=a(18),R=function(O,M,L){if(x(O)===L)return O[M];var D=b.f(O,M);if(D)return y(D)?D.value:D.get===void 0?void 0:g(D.get,L);var N=A(O);if(p(N))return R(N,M,L)};v({target:"Reflect",stat:!0},{get:function(M,L){return R(x(M),I(L),arguments.length<3?M:arguments[2])}})}),(function(T,P,a){"use strict";var v=a(38);T.exports=function(g){return g!==void 0&&(v(g,"value")||v(g,"writable"))}}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(46),x=a(5);v({target:"Reflect",stat:!0,sham:!g},{getOwnPropertyDescriptor:function(b,A){return x.f(p(b),A)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(135),x=a(136);v({target:"Reflect",stat:!0,sham:!x},{getPrototypeOf:function(b){return p(g(b))}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(301);v({target:"Reflect",stat:!0},{isExtensible:function(y){return g(y),p(y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(56);v({target:"Reflect",stat:!0},{ownKeys:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(46),x=a(295);v({target:"Reflect",stat:!0,sham:!x},{preventExtensions:function(b){p(b);try{var A=g("Object","preventExtensions");return A&&A(b),!0}catch(I){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(20),y=a(428),b=a(7),A=a(44),I=a(5),R=a(135),O=a(11),M=a(18),L=function(N,F,G,j){var X=I.f(p(N),F),U,V,k;if(!X){if(x(V=R(N)))return L(V,F,G,j);X=O(0)}if(y(X)){if(X.writable===!1||!x(j))return!1;if(U=I.f(j,F)){if(!y(U)||U.writable===!1)return!1;A.f(j,F,{value:G})}else try{A.f(j,F,O(0,G))}catch(Y){return!1}}else{if(k=X.set,k===void 0)return!1;g(k,j,G)}return!0},D=b(function(){var N=function(){},F=A.f(new N,"a",{configurable:!0});return Reflect.set(N.prototype,"a",1,F)!==!1});v({target:"Reflect",stat:!0,forced:D},{set:function(F,G,j){return L(p(F),M(G),j,arguments.length<4?F:arguments[3])}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(121),x=a(119);x&&v({target:"Reflect",stat:!0},{setPrototypeOf:function(b,A){g(b),p(A);try{return x(b,A),!0}catch(I){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(82);v({global:!0},{Reflect:{}}),p(g.Reflect,"Reflect",!0)}),(function(T,P,a){"use strict";var v=a(6),g=a(4),p=a(14),x=a(67),y=a(124),b=a(43),A=a(71),I=a(57).f,R=a(24),O=a(439),M=a(68),L=a(440),D=a(443),N=a(123),F=a(47),G=a(7),j=a(38),X=a(51).enforce,U=a(201),V=a(33),k=a(444),Y=a(445),K=V("match"),J=g.RegExp,Z=J.prototype,_=g.SyntaxError,at=p(Z.exec),et=p("".charAt),rt=p("".replace),nt=p("".indexOf),ut=p("".slice),ht=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,pt=/a/g,yt=/a/g,At=new J(pt)!==pt,Et=D.MISSED_STICKY,Ht=D.UNSUPPORTED_Y,Ut=v&&(!At||Et||k||Y||G(function(){return yt[K]=!1,J(pt)!==pt||J(yt)===yt||String(J(pt,"i"))!=="/a/i"})),kt=function(_t){for(var Nt=_t.length,Jt=0,ne="",ve=!1,le;Jt<Nt;Jt++){if(le=et(_t,Jt),le==="\\"){ne+=le+et(_t,++Jt);continue}!ve&&le==="."?ne+="[\\s\\S]":(le==="["?ve=!0:le==="]"&&(ve=!1),ne+=le)}return ne},Ct=function(_t){for(var Nt=_t.length,Jt=0,ne="",ve=[],le=A(null),fe=!1,Ce=!1,Be=0,Ie="",ce;Jt<Nt;Jt++){if(ce=et(_t,Jt),ce==="\\"){if(ce+=et(_t,++Jt),!Ce&&et(ce,1)==="\\"){ne+="\\x5c";continue}}else if(ce==="]")fe=!1;else if(!fe)switch(!0){case ce==="[":fe=!0;break;case ce==="(":ne+=ce,at(ht,ut(_t,Jt+1))?(Jt+=2,Ce=!0,Be++):et(_t,Jt+1)!=="?"&&Be++;continue;case(ce===">"&&Ce):if(Ie===""||j(le,Ie))throw new _("Invalid capture group name");le[Ie]=!0,ve[ve.length]=[Ie,Be],Ce=!1,Ie="";continue}Ce?Ie+=ce:ne+=ce}for(var xe=0;xe<ve.length;xe++)for(var Ue="\\k<"+ve[xe][0]+">",Pt="\\"+ve[xe][1];nt(ne,Ue)>-1;)ne=rt(ne,Ue,Pt);return[ne,ve]};if(x("RegExp",Ut)){for(var It=function(Nt,Jt){var ne=R(Z,this),ve=O(Nt),le=Jt===void 0,fe=[],Ce=Nt,Be,Ie,ce,xe,Ue,Pt;if(!ne&&ve&&le&&Nt.constructor===It)return Nt;if((ve||R(Z,Nt))&&(Nt=Nt.source,le&&(Jt=L(Ce))),Nt=Nt===void 0?"":M(Nt),Jt=Jt===void 0?"":M(Jt),Ce=Nt,k&&"dotAll"in pt&&(Ie=!!Jt&&nt(Jt,"s")>-1,Ie&&(Jt=rt(Jt,/s/g,""))),Be=Jt,Et&&"sticky"in pt&&(ce=!!Jt&&nt(Jt,"y")>-1,ce&&Ht&&(Jt=rt(Jt,/y/g,""))),Y&&(xe=Ct(Nt),Nt=xe[0],fe=xe[1]),Ue=y(J(Nt,Jt),ne?this:Z,It),(Ie||ce||fe.length)&&(Pt=X(Ue),Ie&&(Pt.dotAll=!0,Pt.raw=It(kt(Nt),Be)),ce&&(Pt.sticky=!0),fe.length&&(Pt.groups=fe)),Nt!==Ce)try{b(Ue,"source",Ce===""?"(?:)":Ce)}catch(zt){}return Ue},Dt=I(J),Vt=0;Dt.length>Vt;)N(It,J,Dt[Vt++]);Z.constructor=It,It.prototype=Z,F(g,"RegExp",It,{constructor:!0})}U("RegExp")}),(function(T,P,a){"use strict";var v=a(20),g=a(15),p=a(33),x=p("match");T.exports=function(y){var b;return v(y)&&((b=y[x])!==void 0?!!b:g(y)==="RegExp")}}),(function(T,P,a){"use strict";var v=a(8),g=a(38),p=a(24),x=a(441),y=a(442),b=RegExp.prototype;T.exports=x.correct?function(A){return A.flags}:function(A){return!x.correct&&p(b,A)&&!g(A,"flags")?v(y,A):A.flags}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=v.RegExp,x=!g(function(){var y=!0;try{p(".","d")}catch(D){y=!1}var b={},A="",I=y?"dgimsy":"gimsy",R=function(D,N){Object.defineProperty(b,D,{get:function(){return A+=N,!0}})},O={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(O.hasIndices="d");for(var M in O)R(M,O[M]);var L=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(b);return L!==I||A!==I});T.exports={correct:x}}),(function(T,P,a){"use strict";var v=a(46);T.exports=function(){var g=v(this),p="";return g.hasIndices&&(p+="d"),g.global&&(p+="g"),g.ignoreCase&&(p+="i"),g.multiline&&(p+="m"),g.dotAll&&(p+="s"),g.unicode&&(p+="u"),g.unicodeSets&&(p+="v"),g.sticky&&(p+="y"),p}}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp,x=v(function(){var A=p("a","y");return A.lastIndex=2,A.exec("abcd")!==null}),y=x||v(function(){return!p("a","y").sticky}),b=x||v(function(){var A=p("^r","gy");return A.lastIndex=2,A.exec("str")!==null});T.exports={BROKEN_CARET:b,MISSED_STICKY:y,UNSUPPORTED_Y:x}}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp;T.exports=v(function(){var x=p(".","s");return!(x.dotAll&&x.test(`
|
|
28
|
-
`)&&
|
|
29
|
-
`&&Ut!=="\r"&&Ut!=="\u2028"&&Ut!=="\u2029")&&(At="(?: (?:"+At+"))",Ht=" "+Ht,Et++),nt=new RegExp("^(?:"+At+")",yt)}V&&(nt=new RegExp("^"+At+"$(?!\\s)",yt)),X&&(ut=Z.lastIndex);var kt=v(L,pt?nt:Z,Ht);return pt?kt?(kt.input=at,kt[0]=j(kt[0],Et),kt.index=Z.lastIndex,Z.lastIndex+=kt[0].length):Z.lastIndex=0:X&&kt&&(Z.lastIndex=Z.global?kt.index+kt[0].length:ut),V&&kt&&kt.length>1&&v(M,kt[0],nt,function(){for(var Ct=1;Ct<arguments.length-2;Ct++)arguments[Ct]===void 0&&(kt[Ct]=void 0)}),kt&&ht&&Y(kt,ht),kt}),T.exports=D}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(441),x=a(442);v&&!p.correct&&(g(RegExp.prototype,"flags",{configurable:!0,get:x}),p.correct=!0)}),(function(T,P,a){"use strict";var v=a(6),g=a(443).MISSED_STICKY,p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;v&&g&&x(b,"sticky",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).sticky;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){"use strict";a(449);var v=a(3),g=a(8),p=a(21),x=a(46),y=a(68),b=(function(){var I=!1,R=/[ac]/;return R.exec=function(){return I=!0,/./.exec.apply(this,arguments)},R.test("abc")===!0&&I})(),A=/./.test;v({target:"RegExp",proto:!0,forced:!b},{test:function(I){var R=x(this),O=y(I),M=R.exec;if(!p(M))return g(A,R,O);var L=g(M,R,O);return L===null?!1:(x(L),!0)}})}),(function(T,P,a){"use strict";var v=a(49).PROPER,g=a(47),p=a(46),x=a(68),y=a(7),b=a(440),A="toString",I=RegExp.prototype,R=I[A],O=y(function(){return R.call({source:"a",flags:"b"})!=="/a/b"}),M=v&&R.name!==A;(O||M)&&g(I,A,function(){var D=p(this),N=x(D.source),F=x(b(D));return"/"+N+"/"+F},{unsafe:!0})}),(function(T,P,a){"use strict";a(456)}),(function(T,P,a){"use strict";var v=a(299),g=a(303);v("Set",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(458),p=a(7),x=a(466),y=!x("difference",function(A){return A.size===0}),b=y||p(function(){var A={size:1,has:function(){return!0},keys:function(){var R=0;return{next:function(){var O=R++>1;return I.has(1)&&I.clear(),{done:O,value:2}}}}},I=new Set([1,2,3,4]);return I.difference(A).size!==3});v({target:"Set",proto:!0,real:!0,forced:b},{difference:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(461),x=a(464),y=a(465),b=a(462),A=a(463),I=g.has,R=g.remove;T.exports=function(M){var L=v(this),D=y(M),N=p(L);return x(N)<=D.size?b(N,function(F){D.includes(F)&&R(N,F)}):A(D.getIterator(),function(F){I(N,F)&&R(N,F)}),N}}),(function(T,P,a){"use strict";var v=a(460).has;T.exports=function(g){return v(g),g}}),(function(T,P,a){"use strict";var v=a(14),g=Set.prototype;T.exports={Set,add:v(g.add),has:v(g.has),remove:v(g.delete),proto:g}}),(function(T,P,a){"use strict";var v=a(460),g=a(462),p=v.Set,x=v.add;T.exports=function(y){var b=new p;return g(y,function(A){x(b,A)}),b}}),(function(T,P,a){"use strict";var v=a(14),g=a(463),p=a(460),x=p.Set,y=p.proto,b=v(y.forEach),A=v(y.keys),I=A(new x).next;T.exports=function(R,O,M){return M?g({iterator:A(R),next:I},O):b(R,O)}}),(function(T,P,a){"use strict";var v=a(8);T.exports=function(g,p,x){for(var y=x?g:g.iterator,b=g.next,A,I;!(A=v(b,y)).done;)if(I=p(A.value),I!==void 0)return I}}),(function(T,P,a){"use strict";var v=a(120),g=a(460);T.exports=v(g.proto,"size","get")||function(p){return p.size}}),(function(T,P,a){"use strict";var v=a(30),g=a(46),p=a(8),x=a(61),y=a(269),b="Invalid size",A=RangeError,I=TypeError,R=Math.max,O=function(M,L){this.set=M,this.size=R(L,0),this.has=v(M.has),this.keys=v(M.keys)};O.prototype={getIterator:function(){return y(g(p(this.keys,this.set)))},includes:function(M){return p(this.has,this.set,M)}},T.exports=function(M){g(M);var L=+M.size;if(L!==L)throw new I(b);var D=x(L);if(D<0)throw new A(b);return new O(M,D)}}),(function(T,P,a){"use strict";var v=a(23),g=function(x){return{size:x,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},p=function(x){return{size:x,has:function(){return!0},keys:function(){throw new Error("e")}}};T.exports=function(x,y){var b=v("Set");try{new b()[x](g(0));try{return new b()[x](g(-1)),!1}catch(I){if(!y)return!0;try{return new b()[x](p(-1/0)),!1}catch(R){var A=new b([1,2]);return y(A[x](p(1/0)))}}}catch(I){return!1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(468),x=a(466),y=!x("intersection",function(b){return b.size===2&&b.has(1)&&b.has(2)})||g(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});v({target:"Set",proto:!0,real:!0,forced:y},{intersection:p})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(464),x=a(465),y=a(462),b=a(463),A=g.Set,I=g.add,R=g.has;T.exports=function(M){var L=v(this),D=x(M),N=new A;return p(L)>D.size?b(D.getIterator(),function(F){R(L,F)&&I(N,F)}):y(L,function(F){D.includes(F)&&I(N,F)}),N}}),(function(T,P,a){"use strict";var v=a(3),g=a(470),p=a(466),x=!p("isDisjointFrom",function(y){return!y});v({target:"Set",proto:!0,real:!0,forced:x},{isDisjointFrom:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).has,p=a(464),x=a(465),y=a(462),b=a(463),A=a(142);T.exports=function(R){var O=v(this),M=x(R);if(p(O)<=M.size)return y(O,function(D){if(M.includes(D))return!1},!0)!==!1;var L=M.getIterator();return b(L,function(D){if(g(O,D))return A(L.iterator,"normal",!1)})!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(472),p=a(466),x=!p("isSubsetOf",function(y){return y});v({target:"Set",proto:!0,real:!0,forced:x},{isSubsetOf:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(464),p=a(462),x=a(465);T.exports=function(b){var A=v(this),I=x(b);return g(A)>I.size?!1:p(A,function(R){if(!I.includes(R))return!1},!0)!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(474),p=a(466),x=!p("isSupersetOf",function(y){return!y});v({target:"Set",proto:!0,real:!0,forced:x},{isSupersetOf:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).has,p=a(464),x=a(465),y=a(463),b=a(142);T.exports=function(I){var R=v(this),O=x(I);if(p(R)<O.size)return!1;var M=O.getIterator();return y(M,function(L){if(!g(R,L))return b(M.iterator,"normal",!1)})!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(476),p=a(477),x=a(466),y=!x("symmetricDifference")||!p("symmetricDifference");v({target:"Set",proto:!0,real:!0,forced:y},{symmetricDifference:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(461),x=a(465),y=a(463),b=g.add,A=g.has,I=g.remove;T.exports=function(O){var M=v(this),L=x(O).getIterator(),D=p(M);return y(L,function(N){A(M,N)?I(D,N):b(D,N)}),D}}),(function(T){"use strict";T.exports=function(P){try{var a=new Set,v={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return a.clear(),a.add(4),function(){return{done:!0}}}})}},g=a[P](v);return g.size===1&&g.values().next().value===4}catch(p){return!1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(479),p=a(477),x=a(466),y=!x("union")||!p("union");v({target:"Set",proto:!0,real:!0,forced:y},{union:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).add,p=a(461),x=a(465),y=a(463);T.exports=function(A){var I=v(this),R=x(A).getIterator(),O=p(I);return y(R,function(M){g(O,M)}),O}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(61),y=a(68),b=a(7),A=g("".charAt),I=b(function(){return"\u{20BB7}".at(-2)!=="\uD842"});v({target:"String",proto:!0,forced:I},{at:function(O){var M=y(p(this)),L=M.length,D=x(O),N=D>=0?D:L+D;return N<0||N>=L?void 0:A(M,N)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(482).codeAt;v({target:"String",proto:!0},{codePointAt:function(x){return g(this,x)}})}),(function(T,P,a){"use strict";var v=a(14),g=a(61),p=a(68),x=a(16),y=v("".charAt),b=v("".charCodeAt),A=v("".slice),I=function(R){return function(O,M){var L=p(x(O)),D=g(M),N=L.length,F,G;return D<0||D>=N?R?"":void 0:(F=b(L,D),F<55296||F>56319||D+1===N||(G=b(L,D+1))<56320||G>57343?R?y(L,D):F:R?A(L,D,D+2):(F-55296<<10)+(G-56320)+65536)}};T.exports={codeAt:I(!1),charAt:I(!0)}}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(5).f,x=a(64),y=a(68),b=a(484),A=a(16),I=a(485),R=a(36),O=g("".slice),M=Math.min,L=I("endsWith"),D=!R&&!L&&!!(function(){var N=p(String.prototype,"endsWith");return N&&!N.writable})();v({target:"String",proto:!0,forced:!D&&!L},{endsWith:function(F){var G=y(A(this));b(F);var j=y(F),X=arguments.length>1?arguments[1]:void 0,U=G.length,V=X===void 0?U:M(x(X),U);return O(G,V-j.length,V)===j}})}),(function(T,P,a){"use strict";var v=a(439),g=TypeError;T.exports=function(p){if(v(p))throw new g("The method doesn't accept regular expressions");return p}}),(function(T,P,a){"use strict";var v=a(33),g=v("match");T.exports=function(p){var x=/./;try{"/./"[p](x)}catch(y){try{return x[g]=!1,"/./"[p](x)}catch(b){}}return!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(60),x=RangeError,y=String.fromCharCode,b=String.fromCodePoint,A=g([].join),I=!!b&&b.length!==1;v({target:"String",stat:!0,arity:1,forced:I},{fromCodePoint:function(O){for(var M=[],L=arguments.length,D=0,N;L>D;){if(N=+arguments[D],p(N,1114111)!==N)throw new x(N+" is not a valid code point");M[D++]=N<65536?y(N):y(((N-=65536)>>10)+55296,N%1024+56320)}return A(M,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(484),x=a(16),y=a(68),b=a(485),A=g("".indexOf);v({target:"String",proto:!0,forced:!b("includes")},{includes:function(R){return!!~A(y(x(this)),y(p(R)),arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(68),y=g("".charCodeAt);v({target:"String",proto:!0},{isWellFormed:function(){for(var A=x(p(this)),I=A.length,R=0;R<I;R++){var O=y(A,R);if((O&63488)===55296&&(O>=56320||++R>=I||(y(A,R)&64512)!==56320))return!1}return!0}})}),(function(T,P,a){"use strict";var v=a(482).charAt,g=a(68),p=a(51),x=a(177),y=a(180),b="String Iterator",A=p.set,I=p.getterFor(b);x(String,"String",function(R){A(this,{type:b,string:g(R),index:0})},function(){var O=I(this),M=O.string,L=O.index,D;return L>=M.length?y(void 0,!0):(D=v(M,L),O.index+=D.length,y(D,!1))})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(491),x=a(46),y=a(20),b=a(64),A=a(68),I=a(16),R=a(29),O=a(492),M=a(440),L=a(493),D=g("".indexOf);p("match",function(N,F,G){return[function(X){var U=I(this),V=y(X)?R(X,N):void 0;if(V)return v(V,X,U);var k=A(U);return new RegExp(X)[N](k)},function(j){var X=x(this),U=A(j),V=G(F,X,U);if(V.done)return V.value;var k=A(M(X));if(!~D(k,"g"))return L(X,U);var Y=!!~D(k,"u")||!!~D(k,"v");X.lastIndex=0;for(var K=[],J=0,Z;(Z=L(X,U))!==null;){var _=A(Z[0]);K[J]=_,_===""&&(X.lastIndex=O(U,b(X.lastIndex),Y)),J++}return J===0?null:K}]})}),(function(T,P,a){"use strict";a(449);var v=a(8),g=a(47),p=a(450),x=a(7),y=a(33),b=a(43),A=y("species"),I=RegExp.prototype;T.exports=function(R,O,M,L){var D=y(R),N=!x(function(){var X={};return X[D]=function(){return 7},""[R](X)!==7}),F=N&&!x(function(){var X=!1,U=/a/;if(R==="split"){var V={};V[A]=function(){return U},U={constructor:V,flags:""},U[D]=/./[D]}return U.exec=function(){return X=!0,null},U[D](""),!X});if(!N||!F||M){var G=/./[D],j=O(D,""[R],function(X,U,V,k,Y){var K=U.exec;return K===p||K===I.exec?N&&!Y?{done:!0,value:v(G,U,V,k)}:{done:!0,value:v(X,V,U,k)}:{done:!1}});g(String.prototype,R,j[0]),g(I,D,j[1])}L&&b(I[D],"sham",!0)}}),(function(T,P,a){"use strict";var v=a(482).charAt;T.exports=function(g,p,x){return p+(x&&v(g,p).length||1)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(21),x=a(15),y=a(450),b=TypeError;T.exports=function(A,I){var R=A.exec;if(p(R)){var O=v(R,A,I);return O!==null&&g(O),O}if(x(A)==="RegExp")return v(y,A,I);throw new b("RegExp#exec called on incompatible receiver")}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(85),x=a(178),y=a(180),b=a(16),A=a(64),I=a(68),R=a(46),O=a(20),M=a(15),L=a(439),D=a(440),N=a(29),F=a(47),G=a(7),j=a(33),X=a(387),U=a(492),V=a(493),k=a(51),Y=a(36),K=j("matchAll"),J="RegExp String",Z=J+" Iterator",_=k.set,at=k.getterFor(Z),et=RegExp.prototype,rt=TypeError,nt=p("".indexOf),ut=p("".matchAll),ht=!!ut&&!G(function(){ut("a",/./)}),pt=x(function(Et,Ht,Ut,kt){_(this,{type:Z,regexp:Et,string:Ht,global:Ut,unicode:kt,done:!1})},J,function(){var Et=at(this);if(Et.done)return y(void 0,!0);var Ht=Et.regexp,Ut=Et.string,kt=V(Ht,Ut);return kt===null?(Et.done=!0,y(void 0,!0)):Et.global?(I(kt[0])===""&&(Ht.lastIndex=U(Ut,A(Ht.lastIndex),Et.unicode)),y(kt,!1)):(Et.done=!0,y(kt,!1))}),yt=function(At){var Et=R(this),Ht=I(At),Ut=X(Et,RegExp),kt=I(D(Et)),Ct,It,Dt;return Ct=new Ut(Ut===RegExp?Et.source:Et,kt),It=!!~nt(kt,"g"),Dt=!!~nt(kt,"u")||!!~nt(kt,"v"),Ct.lastIndex=A(Et.lastIndex),new pt(Ct,Ht,It,Dt)};v({target:"String",proto:!0,forced:ht},{matchAll:function(Et){var Ht=b(this),Ut,kt,Ct,It;if(O(Et)){if(L(Et)&&(Ut=I(b(D(Et))),!~nt(Ut,"g")))throw new rt("`.matchAll` does not allow non-global regexes");if(ht)return ut(Ht,Et);if(Ct=N(Et,K),Ct===void 0&&Y&&M(Et)==="RegExp"&&(Ct=yt),Ct)return g(Ct,Et,Ht)}else if(ht)return ut(Ht,Et);return kt=I(Ht),It=new RegExp(Et,"g"),Y?g(yt,It,kt):It[K](kt)}}),Y||K in et||F(et,K,yt)}),(function(T,P,a){"use strict";var v=a(3),g=a(248).end,p=a(496);v({target:"String",proto:!0,forced:p},{padEnd:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(28);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(v)}),(function(T,P,a){"use strict";var v=a(3),g=a(248).start,p=a(496);v({target:"String",proto:!0,forced:p},{padStart:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(12),x=a(39),y=a(68),b=a(63),A=g([].push),I=g([].join);v({target:"String",stat:!0},{raw:function(O){var M=p(x(O).raw),L=b(M);if(!L)return"";for(var D=arguments.length,N=[],F=0;;){if(A(N,y(M[F++])),F===L)return I(N,"");F<D&&A(N,y(arguments[F]))}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(249);v({target:"String",proto:!0},{repeat:g})}),(function(T,P,a){"use strict";var v=a(117),g=a(8),p=a(14),x=a(491),y=a(7),b=a(46),A=a(21),I=a(20),R=a(61),O=a(64),M=a(68),L=a(16),D=a(492),N=a(29),F=a(501),G=a(440),j=a(493),X=a(33),U=X("replace"),V=Math.max,k=Math.min,Y=p([].concat),K=p([].push),J=p("".indexOf),Z=p("".slice),_=function(nt){return nt===void 0?nt:String(nt)},at=(function(){return"a".replace(/./,"$0")==="$0"})(),et=(function(){return/./[U]?/./[U]("a","$0")==="":!1})(),rt=!y(function(){var nt=/./;return nt.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(nt,"$<a>")!=="7"});x("replace",function(nt,ut,ht){var pt=et?"$":"$0";return[function(At,Et){var Ht=L(this),Ut=I(At)?N(At,U):void 0;return Ut?g(Ut,At,Ht,Et):g(ut,M(Ht),At,Et)},function(yt,At){var Et=b(this),Ht=M(yt),Ut=A(At);Ut||(At=M(At));var kt=M(G(Et));if(typeof At=="string"&&!~J(At,pt)&&!~J(At,"$<")&&!~J(kt,"y")){var Ct=ht(ut,Et,Ht,At);if(Ct.done)return Ct.value}var It=!!~J(kt,"g"),Dt;It&&(Dt=!!~J(kt,"u")||!!~J(kt,"v"),Et.lastIndex=0);for(var Vt=[],_t;_t=j(Et,Ht),!(_t===null||(K(Vt,_t),!It));){var Nt=M(_t[0]);Nt===""&&(Et.lastIndex=D(Ht,O(Et.lastIndex),Dt))}for(var Jt="",ne=0,ve=0;ve<Vt.length;ve++){_t=Vt[ve];for(var le=M(_t[0]),fe=V(k(R(_t.index),Ht.length),0),Ce=[],Be,Ie=1;Ie<_t.length;Ie++)K(Ce,_(_t[Ie]));var ce=_t.groups;if(Ut){var xe=Y([le],Ce,fe,Ht);ce!==void 0&&K(xe,ce),Be=M(v(At,void 0,xe))}else Be=F(le,Ht,fe,Ce,ce,At);fe>=ne&&(Jt+=Z(Ht,ne,fe)+Be,ne=fe+le.length)}return Jt+Z(Ht,ne)}]},!rt||!at||et)}),(function(T,P,a){"use strict";var v=a(14),g=a(39),p=Math.floor,x=v("".charAt),y=v("".replace),b=v("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,I=/\$([$&'`]|\d{1,2})/g;T.exports=function(R,O,M,L,D,N){var F=M+R.length,G=L.length,j=I;return D!==void 0&&(D=g(D),j=A),y(N,j,function(X,U){var V;switch(x(U,0)){case"$":return"$";case"&":return R;case"`":return b(O,0,M);case"'":return b(O,F);case"<":V=D[b(U,1,-1)];break;default:var k=+U;if(k===0)return X;if(k>G){var Y=p(k/10);return Y===0?X:Y<=G?L[Y-1]===void 0?x(U,1):L[Y-1]+x(U,1):X}V=L[k-1]}return V===void 0?"":V})}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(14),x=a(16),y=a(21),b=a(20),A=a(439),I=a(68),R=a(29),O=a(440),M=a(501),L=a(33),D=a(36),N=L("replace"),F=TypeError,G=p("".indexOf),j=p("".replace),X=p("".slice),U=Math.max;v({target:"String",proto:!0},{replaceAll:function(k,Y){var K=x(this),J,Z,_,at,et,rt,nt,ut,ht,pt,yt=0,At="";if(b(k)){if(J=A(k),J&&(Z=I(x(O(k))),!~G(Z,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(_=R(k,N),_)return g(_,k,K,Y);if(D&&J)return j(I(K),k,Y)}for(at=I(K),et=I(k),rt=y(Y),rt||(Y=I(Y)),nt=et.length,ut=U(1,nt),ht=G(at,et);ht!==-1;)pt=rt?I(Y(et,ht,at)):M(et,at,ht,[],void 0,Y),At+=X(at,yt,ht)+pt,yt=ht+nt,ht=ht+ut>at.length?-1:G(at,et,ht+ut);return yt<at.length&&(At+=X(at,yt)),At}})}),(function(T,P,a){"use strict";var v=a(8),g=a(491),p=a(46),x=a(20),y=a(16),b=a(369),A=a(68),I=a(29),R=a(493);g("search",function(O,M,L){return[function(N){var F=y(this),G=x(N)?I(N,O):void 0;if(G)return v(G,N,F);var j=A(F);return new RegExp(N)[O](j)},function(D){var N=p(this),F=A(D),G=L(M,N,F);if(G.done)return G.value;var j=N.lastIndex;b(j,0)||(N.lastIndex=0);var X=R(N,F);return b(N.lastIndex,j)||(N.lastIndex=j),X===null?-1:X.index}]})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(491),x=a(46),y=a(20),b=a(16),A=a(387),I=a(492),R=a(64),O=a(68),M=a(29),L=a(440),D=a(493),N=a(443),F=a(7),G=N.UNSUPPORTED_Y,j=4294967295,X=Math.min,U=g([].push),V=g("".slice),k=g("".indexOf),Y=!F(function(){var J=/(?:)/,Z=J.exec;J.exec=function(){return Z.apply(this,arguments)};var _="ab".split(J);return _.length!==2||_[0]!=="a"||_[1]!=="b"}),K="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;p("split",function(J,Z,_){var at="0".split(void 0,0).length?function(et,rt){return et===void 0&&rt===0?[]:v(Z,this,et,rt)}:Z;return[function(rt,nt){var ut=b(this),ht=y(rt)?M(rt,J):void 0;return ht?v(ht,rt,ut,nt):v(at,O(ut),rt,nt)},function(et,rt){var nt=x(this),ut=O(et);if(!K){var ht=_(at,nt,ut,rt,at!==Z);if(ht.done)return ht.value}var pt=A(nt,RegExp),yt=O(L(nt)),At=!!~k(yt,"u")||!!~k(yt,"v");G?~k(yt,"g")||(yt+="g"):~k(yt,"y")||(yt+="y");var Et=new pt(G?"^(?:"+nt.source+")":nt,yt),Ht=rt===void 0?j:rt>>>0;if(Ht===0)return[];if(ut.length===0)return D(Et,ut)===null?[ut]:[];for(var Ut=0,kt=0,Ct=[];kt<ut.length;){Et.lastIndex=G?0:kt;var It=D(Et,G?V(ut,kt):ut),Dt;if(It===null||(Dt=X(R(Et.lastIndex+(G?kt:0)),ut.length))===Ut)kt=I(ut,kt,At);else{if(U(Ct,V(ut,Ut,kt)),Ct.length===Ht)return Ct;for(var Vt=1;Vt<=It.length-1;Vt++)if(U(Ct,It[Vt]),Ct.length===Ht)return Ct;kt=Ut=Dt}}return U(Ct,V(ut,Ut)),Ct}]},K||!Y,G)}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(5).f,x=a(64),y=a(68),b=a(484),A=a(16),I=a(485),R=a(36),O=g("".slice),M=Math.min,L=I("startsWith"),D=!R&&!L&&!!(function(){var N=p(String.prototype,"startsWith");return N&&!N.writable})();v({target:"String",proto:!0,forced:!D&&!L},{startsWith:function(F){var G=y(A(this));b(F);var j=y(F),X=x(M(arguments.length>1?arguments[1]:void 0,G.length));return O(G,X,X+j.length)===j}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(61),y=a(68),b=g("".slice),A=Math.max,I=Math.min,R=!"".substr||"ab".substr(-1)!=="b";v({target:"String",proto:!0,forced:R},{substr:function(M,L){var D=y(p(this)),N=D.length,F=x(M),G=F<0?A(N+F,0):I(F,N),j=L===void 0?N:x(L);if(j<=0)return"";var X=I(G+j,N);return G>=X?"":b(D,G,X)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(14),x=a(16),y=a(68),b=a(7),A=Array,I=p("".charAt),R=p("".charCodeAt),O=p([].join),M="".toWellFormed,L="\uFFFD",D=M&&b(function(){return g(M,1)!=="1"});v({target:"String",proto:!0,forced:D},{toWellFormed:function(){var F=y(x(this));if(D)return g(M,F);for(var G=F.length,j=A(G),X=0;X<G;X++){var U=R(F,X);(U&63488)!==55296?j[X]=I(F,X):U>=56320||X+1>=G||(R(F,X+1)&64512)!==56320?j[X]=L:(j[X]=I(F,X),j[++X]=I(F,X))}return O(j,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(332).trim,p=a(509);v({target:"String",proto:!0,forced:p("trim")},{trim:function(){return g(this)}})}),(function(T,P,a){"use strict";var v=a(49).PROPER,g=a(7),p=a(333),x="\u200B\x85\u180E";T.exports=function(y){return g(function(){return!!p[y]()||x[y]()!==x||v&&p[y].name!==y})}}),(function(T,P,a){"use strict";a(511);var v=a(3),g=a(512);v({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==g},{trimEnd:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(512);v({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==g},{trimRight:g})}),(function(T,P,a){"use strict";var v=a(332).end,g=a(509);T.exports=g("trimEnd")?function(){return v(this)}:"".trimEnd}),(function(T,P,a){"use strict";a(514);var v=a(3),g=a(515);v({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==g},{trimStart:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(515);v({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==g},{trimLeft:g})}),(function(T,P,a){"use strict";var v=a(332).start,g=a(509);T.exports=g("trimStart")?function(){return v(this)}:"".trimStart}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("anchor")},{anchor:function(y){return g(this,"a","name",y)}})}),(function(T,P,a){"use strict";var v=a(14),g=a(16),p=a(68),x=/"/g,y=v("".replace);T.exports=function(b,A,I,R){var O=p(g(b)),M="<"+A;return I!==""&&(M+=" "+I+'="'+y(p(R),x,""")+'"'),M+">"+O+"</"+A+">"}}),(function(T,P,a){"use strict";var v=a(7);T.exports=function(g){return v(function(){var p=""[g]('"');return p!==p.toLowerCase()||p.split('"').length>3})}}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("big")},{big:function(){return g(this,"big","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("blink")},{blink:function(){return g(this,"blink","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("bold")},{bold:function(){return g(this,"b","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fixed")},{fixed:function(){return g(this,"tt","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fontcolor")},{fontcolor:function(y){return g(this,"font","color",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fontsize")},{fontsize:function(y){return g(this,"font","size",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("italics")},{italics:function(){return g(this,"i","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("link")},{link:function(y){return g(this,"a","href",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("small")},{small:function(){return g(this,"small","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("strike")},{strike:function(){return g(this,"strike","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("sub")},{sub:function(){return g(this,"sub","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("sup")},{sup:function(){return g(this,"sup","","")}})}),(function(T,P,a){"use strict";var v=a(532);v("Float32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(8),x=a(6),y=a(533),b=a(224),A=a(213),I=a(216),R=a(11),O=a(43),M=a(338),L=a(217),D=a(534),N=a(535),F=a(18),G=a(38),j=a(69),X=a(20),U=a(22),V=a(71),k=a(24),Y=a(119),K=a(57).f,J=a(536),Z=a(83).forEach,_=a(201),at=a(77),et=a(44),rt=a(5),nt=a(205),ut=a(51),ht=a(124),pt=ut.get,yt=ut.set,At=ut.enforce,Et=et.f,Ht=rt.f,Ut=g.RangeError,kt=A.ArrayBuffer,Ct=kt.prototype,It=A.DataView,Dt=b.NATIVE_ARRAY_BUFFER_VIEWS,Vt=b.TYPED_ARRAY_TAG,_t=b.TypedArray,Nt=b.TypedArrayPrototype,Jt=b.isTypedArray,ne="BYTES_PER_ELEMENT",ve="Wrong length",le=function(ce,xe){at(ce,xe,{configurable:!0,get:function(){return pt(this)[xe]}})},fe=function(ce){var xe;return k(Ct,ce)||(xe=j(ce))==="ArrayBuffer"||xe==="SharedArrayBuffer"},Ce=function(ce,xe){return Jt(ce)&&!U(xe)&&xe in ce&&M(+xe)&&xe>=0},Be=function(xe,Ue){return Ue=F(Ue),Ce(xe,Ue)?R(2,xe[Ue]):Ht(xe,Ue)},Ie=function(xe,Ue,Pt){return Ue=F(Ue),Ce(xe,Ue)&&X(Pt)&&G(Pt,"value")&&!G(Pt,"get")&&!G(Pt,"set")&&!Pt.configurable&&(!G(Pt,"writable")||Pt.writable)&&(!G(Pt,"enumerable")||Pt.enumerable)?(xe[Ue]=Pt.value,xe):Et(xe,Ue,Pt)};x?(Dt||(rt.f=Be,et.f=Ie,le(Nt,"buffer"),le(Nt,"byteOffset"),le(Nt,"byteLength"),le(Nt,"length")),v({target:"Object",stat:!0,forced:!Dt},{getOwnPropertyDescriptor:Be,defineProperty:Ie}),T.exports=function(ce,xe,Ue){var Pt=ce.match(/\d+/)[0]/8,zt=ce+(Ue?"Clamped":"")+"Array",jt="get"+ce,we="set"+ce,$t=g[zt],Xt=$t,re=Xt&&Xt.prototype,oe={},pe=function(Tt,wt){var Ft=pt(Tt);return Ft.view[jt](wt*Pt+Ft.byteOffset,!0)},rn=function(Tt,wt,Ft){var Lt=pt(Tt);Lt.view[we](wt*Pt+Lt.byteOffset,Ue?N(Ft):Ft,!0)},vt=function(Tt,wt){Et(Tt,wt,{get:function(){return pe(this,wt)},set:function(Ft){return rn(this,wt,Ft)},enumerable:!0})};Dt?y&&(Xt=xe(function(Tt,wt,Ft,Lt){return I(Tt,re),ht((function(){return X(wt)?fe(wt)?Lt!==void 0?new $t(wt,D(Ft,Pt),Lt):Ft!==void 0?new $t(wt,D(Ft,Pt)):new $t(wt):Jt(wt)?nt(Xt,wt):p(J,Xt,wt):new $t(L(wt))})(),Tt,Xt)}),Y&&Y(Xt,_t),Z(K($t),function(Tt){Tt in Xt||O(Xt,Tt,$t[Tt])}),Xt.prototype=re):(Xt=xe(function(Tt,wt,Ft,Lt){I(Tt,re);var ue=0,ye=0,Me,Fe,tn;if(!X(wt))tn=L(wt),Fe=tn*Pt,Me=new kt(Fe);else if(fe(wt)){Me=wt,ye=D(Ft,Pt);var Ve=wt.byteLength;if(Lt===void 0){if(Ve%Pt)throw new Ut(ve);if(Fe=Ve-ye,Fe<0)throw new Ut(ve)}else if(Fe=L(Lt)*Pt,Fe+ye>Ve)throw new Ut(ve);tn=Fe/Pt}else return Jt(wt)?nt(Xt,wt):p(J,Xt,wt);for(yt(Tt,{buffer:Me,byteOffset:ye,byteLength:Fe,length:tn,view:new It(Me)});ue<tn;)vt(Tt,ue++)}),Y&&Y(Xt,_t),re=Xt.prototype=V(Nt)),re.constructor!==Xt&&O(re,"constructor",Xt),At(re).TypedArrayConstructor=Xt,Vt&&O(re,Vt,zt);var Rt=Xt!==$t;oe[zt]=Xt,v({global:!0,constructor:!0,forced:Rt,sham:!Dt},oe),ne in Xt||O(Xt,ne,Pt),ne in re||O(re,ne,Pt),_(zt)}):T.exports=function(){}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(172),x=a(224).NATIVE_ARRAY_BUFFER_VIEWS,y=v.ArrayBuffer,b=v.Int8Array;T.exports=!x||!g(function(){b(1)})||!g(function(){new b(-1)})||!p(function(A){new b,new b(null),new b(1.5),new b(A)},!0)||g(function(){return new b(new y(2),1,void 0).length!==1})}),(function(T,P,a){"use strict";var v=a(271),g=RangeError;T.exports=function(p,x){var y=v(p);if(y%x)throw new g("Wrong offset");return y}}),(function(T){"use strict";var P=Math.floor;T.exports=function(a){var v=+a;if(v!==v||v<=0)return 0;if(v>=255)return 255;var g=P(v);return g+.5<v?g+1:v<g+.5||g%2===0?g:g+1}}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(30),x=a(388),y=a(39),b=a(63),A=a(140),I=a(141),R=a(138),O=a(537),M=a(224).aTypedArrayConstructor,L=a(538);T.exports=function(N){var F=x(this),G=arguments.length,j=G>1?arguments[1]:void 0,X=j!==void 0;X&&p(j);var U=y(N),V=I(U),k,Y,K,J,Z,_,at,et;if(V&&!R(V))for(at=A(U,V),et=at.next,U=[];!(_=g(et,at)).done;)U.push(_.value);for(X&&G>2&&(j=v(j,arguments[2])),Y=b(U),K=new(M(F))(Y),J=O(K),k=0;Y>k;k++)Z=X?j(U[k],k):U[k],K[k]=J?L(Z):+Z;return K}}),(function(T,P,a){"use strict";var v=a(69);T.exports=function(g){var p=v(g);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(T,P,a){"use strict";var v=a(19),g=TypeError;T.exports=function(p){var x=v(p,"number");if(typeof x=="number")throw new g("Can't convert number to bigint");return BigInt(x)}}),(function(T,P,a){"use strict";var v=a(532);v("Float64",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int8",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int16",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint8",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint8",function(g){return function(x,y,b){return g(this,x,y,b)}},!0)}),(function(T,P,a){"use strict";var v=a(532);v("Uint16",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(224),g=a(63),p=a(61),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("at",function(A){var I=x(this),R=g(I),O=p(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]})}),(function(T,P,a){"use strict";var v=a(14),g=a(224),p=a(152),x=v(p),y=g.aTypedArray,b=g.exportTypedArrayMethod;b("copyWithin",function(I,R){return x(y(this),I,R,arguments.length>2?arguments[2]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).every,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("every",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(157),p=a(538),x=a(69),y=a(8),b=a(14),A=a(7),I=v.aTypedArray,R=v.exportTypedArrayMethod,O=b("".slice),M=A(function(){var L=0;return new Int8Array(2).fill({valueOf:function(){return L++}}),L!==1});R("fill",function(D){var N=arguments.length;I(this);var F=O(x(this),0,3)==="Big"?p(D):+D;return y(g,this,F,N>1?arguments[1]:void 0,N>2?arguments[2]:void 0)},M)}),(function(T,P,a){"use strict";var v=a(224),g=a(83).filter,p=a(552),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("filter",function(A){var I=g(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){"use strict";var v=a(205),g=a(224).getTypedArrayConstructor;T.exports=function(p,x){return v(g(p),x)}}),(function(T,P,a){"use strict";var v=a(224),g=a(83).find,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("find",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).findIndex,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findIndex",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(162).findLast,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findLast",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(162).findLastIndex,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findLastIndex",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).forEach,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("forEach",function(b){g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(533),g=a(224).exportTypedArrayStaticMethod,p=a(536);g("from",p,v)}),(function(T,P,a){"use strict";var v=a(224),g=a(59).includes,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("includes",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(59).indexOf,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("indexOf",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(224),y=a(176),b=a(33),A=b("iterator"),I=v.Uint8Array,R=p(y.values),O=p(y.keys),M=p(y.entries),L=x.aTypedArray,D=x.exportTypedArrayMethod,N=I&&I.prototype,F=!g(function(){N[A].call([1])}),G=!!N&&N.values&&N[A]===N.values&&N.values.name==="values",j=function(){return R(L(this))};D("entries",function(){return M(L(this))},F),D("keys",function(){return O(L(this))},F),D("values",j,F||!G,{name:"values"}),D(A,j,F||!G,{name:"values"})}),(function(T,P,a){"use strict";var v=a(224),g=a(14),p=v.aTypedArray,x=v.exportTypedArrayMethod,y=g([].join);x("join",function(A){return y(p(this),A)})}),(function(T,P,a){"use strict";var v=a(224),g=a(117),p=a(183),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("lastIndexOf",function(A){var I=arguments.length;return g(p,x(this),I>1?[A,arguments[1]]:[A])})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).map,p=a(552),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("map",function(A){var I=g(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){"use strict";var v=a(224),g=a(533),p=v.aTypedArrayConstructor,x=v.exportTypedArrayStaticMethod;x("of",function(){for(var b=0,A=arguments.length,I=new(p(this))(A);A>b;)I[b]=arguments[b++];return I},g)}),(function(T,P,a){"use strict";var v=a(224),g=a(188).left,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("reduce",function(b){var A=arguments.length;return g(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(188).right,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("reduceRight",function(b){var A=arguments.length;return g(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=v.aTypedArray,p=v.exportTypedArrayMethod,x=Math.floor;p("reverse",function(){for(var b=this,A=g(b).length,I=x(A/2),R=0,O;R<I;)O=b[R],b[R++]=b[--A],b[A]=O;return b})}),(function(T,P,a){"use strict";var v=a(4),g=a(8),p=a(224),x=a(63),y=a(534),b=a(39),A=a(7),I=v.RangeError,R=v.Int8Array,O=R&&R.prototype,M=O&&O.set,L=p.aTypedArray,D=p.exportTypedArrayMethod,N=!A(function(){var G=new Uint8ClampedArray(2);return g(M,G,{length:1,0:3},1),G[1]!==3}),F=N&&p.NATIVE_ARRAY_BUFFER_VIEWS&&A(function(){var G=new R(2);return G.set(1),G.set("2",1),G[0]!==0||G[1]!==2});D("set",function(j){L(this);var X=y(arguments.length>1?arguments[1]:void 0,1),U=b(j);if(N)return g(M,this,U,X);var V=this.length,k=x(U),Y=0;if(k+X>V)throw new I("Wrong length");for(;Y<k;)this[X+Y]=U[Y++]},!N||F)}),(function(T,P,a){"use strict";var v=a(224),g=a(7),p=a(76),x=v.aTypedArray,y=v.getTypedArrayConstructor,b=v.exportTypedArrayMethod,A=g(function(){new Int8Array(1).slice()});b("slice",function(R,O){for(var M=p(x(this),R,O),L=y(this),D=0,N=M.length,F=new L(N);N>D;)F[D]=M[D++];return F},A)}),(function(T,P,a){"use strict";var v=a(224),g=a(83).some,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("some",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(4),g=a(85),p=a(7),x=a(30),y=a(196),b=a(224),A=a(197),I=a(198),R=a(27),O=a(199),M=b.aTypedArray,L=b.exportTypedArrayMethod,D=v.Uint16Array,N=D&&g(D.prototype.sort),F=!!N&&!(p(function(){N(new D(2),null)})&&p(function(){N(new D(2),{})})),G=!!N&&!p(function(){if(R)return R<74;if(A)return A<67;if(I)return!0;if(O)return O<602;var X=new D(516),U=Array(516),V,k;for(V=0;V<516;V++)k=V%4,X[V]=515-V,U[V]=V-2*k+3;for(N(X,function(Y,K){return(Y/4|0)-(K/4|0)}),V=0;V<516;V++)if(X[V]!==U[V])return!0}),j=function(X){return function(U,V){return X!==void 0?+X(U,V)||0:V!==V?U!==U?0:-1:U!==U?1:U===0&&V===0?1/U>0?1/V>0?0:1:1/V>0?-1:0:U>V?1:U<V?-1:0}};L("sort",function(U){return U!==void 0&&x(U),G?N(this,U):y(M(this),j(U))},!G||F)}),(function(T,P,a){"use strict";var v=a(224),g=a(64),p=a(60),x=v.aTypedArray,y=v.getTypedArrayConstructor,b=v.exportTypedArrayMethod;b("subarray",function(I,R){var O=x(this),M=O.length,L=p(I,M),D=y(O);return new D(O.buffer,O.byteOffset+L*O.BYTES_PER_ELEMENT,g((R===void 0?M:p(R,M))-L))})}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(224),x=a(7),y=a(76),b=v.Int8Array,A=p.aTypedArray,I=p.exportTypedArrayMethod,R=[].toLocaleString,O=!!b&&x(function(){R.call(new b(1))}),M=x(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!x(function(){b.prototype.toLocaleString.call([1,2])});I("toLocaleString",function(){return g(R,O?y(A(this)):A(this),y(arguments))},M)}),(function(T,P,a){"use strict";var v=a(63),g=a(224),p=g.aTypedArray,x=g.exportTypedArrayMethod,y=g.getTypedArrayConstructor;x("toReversed",function(){for(var A=p(this),I=v(A),R=new(y(A))(I),O=0;O<I;O++)R[O]=A[I-O-1];return R})}),(function(T,P,a){"use strict";var v=a(224),g=a(14),p=a(30),x=a(205),y=v.aTypedArray,b=v.getTypedArrayConstructor,A=v.exportTypedArrayMethod,I=g(v.TypedArrayPrototype.sort);A("toSorted",function(O){O!==void 0&&p(O);var M=y(this),L=x(b(M),M);return I(L,O)})}),(function(T,P,a){"use strict";var v=a(224).exportTypedArrayMethod,g=a(7),p=a(4),x=a(14),y=p.Uint8Array,b=y&&y.prototype||{},A=[].toString,I=x([].join);g(function(){A.call({})})&&(A=function(){return I(this)});var R=b.toString!==A;v("toString",A,R)}),(function(T,P,a){"use strict";var v=a(224),g=a(537),p=a(63),x=a(61),y=a(538),b=v.aTypedArray,A=v.getTypedArrayConstructor,I=v.exportTypedArrayMethod,R=RangeError,O=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(L){return L===8}})(),M=O&&(function(){try{new Int8Array(1).with(-.5,1)}catch(L){return!0}})();I("with",function(L,D){var N=b(this),F=p(N),G=x(L),j=G<0?F+G:G,X=g(N)?y(D):+D;if(j>=F||j<0)throw new R("Incorrect index");for(var U=new(A(N))(F),V=0;V<F;V++)U[V]=V===j?X:N[V];return U},!O||M)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(205),x=a(580),y=g.Uint8Array,b=!y||!y.fromBase64||!(function(){try{y.fromBase64("a");return}catch(A){}try{y.fromBase64("",null)}catch(A){return!0}})();y&&v({target:"Uint8Array",stat:!0,forced:b},{fromBase64:function(I){var R=x(I,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,R.bytes)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(287),x=a(447),y=a(38),b=a(581),A=a(582),I=a(237),R=b.c2i,O=b.c2iUrl,M=v.SyntaxError,L=v.TypeError,D=v.Array,N=g("".charAt),F=Math.floor,G=function(U,V){for(var k=U.length;V<k;V++){var Y=N(U,V);if(Y!==" "&&Y!==" "&&Y!==`
|
|
30
|
-
`&&Y!=="\f"&&Y!=="\r")break}return V},j=function(U,V,k){var Y=U.length;Y<4&&(U+=Y===2?"AA":"A");var K=(V[N(U,0)]<<18)+(V[N(U,1)]<<12)+(V[N(U,2)]<<6)+V[N(U,3)],J=[K>>16&255,K>>8&255,K&255];if(Y===2){if(k&&J[1]!==0)throw new M("Extra bits");return[J[0]]}if(Y===3){if(k&&J[2]!==0)throw new M("Extra bits");return[J[0],J[1]]}return J},X=function(U,V,k){for(var Y=V.length,K=0;K<Y;K++)U[k+K]=V[K];return k+Y};T.exports=function(U,V,k,Y){x(U),p(V);var K=A(V)==="base64"?R:O,J=V?V.lastChunkHandling:void 0;if(J===void 0&&(J="loose"),J!=="loose"&&J!=="strict"&&J!=="stop-before-partial")throw new L("Incorrect `lastChunkHandling` option");k&&I(k.buffer);var Z=U.length,_=k||D(F(Z*3/4)),at=0,et=0,rt="",nt=0;if(Y)for(;;){if(nt=G(U,nt),nt===Z){if(rt.length>0){if(J==="stop-before-partial")break;if(J==="loose"){if(rt.length===1)throw new M("Malformed padding: exactly one additional character");at=X(_,j(rt,K,!1),at)}else throw new M("Missing padding")}et=Z;break}var ut=N(U,nt);if(++nt,ut==="="){if(rt.length<2)throw new M("Padding is too early");if(nt=G(U,nt),rt.length===2){if(nt===Z){if(J==="stop-before-partial")break;throw new M("Malformed padding: only one =")}N(U,nt)==="="&&(++nt,nt=G(U,nt))}if(nt<Z)throw new M("Unexpected character after padding");at=X(_,j(rt,K,J==="strict"),at),et=Z;break}if(!y(K,ut))throw new M("Unexpected character");var ht=Y-at;if(ht===1&&rt.length===2||ht===2&&rt.length===3||(rt+=ut,rt.length===4&&(at=X(_,j(rt,K,!1),at),rt="",et=nt,at===Y)))break}return k||(_.length=at),{bytes:_,read:et,written:at}}}),(function(T){"use strict";var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=P+"+/",v=P+"-_",g=function(p){for(var x={},y=0;y<64;y++)x[p.charAt(y)]=y;return x};T.exports={i2c:a,c2i:g(a),i2cUrl:v,c2iUrl:g(v)}}),(function(T){"use strict";var P=TypeError;T.exports=function(a){var v=a&&a.alphabet;if(v===void 0||v==="base64"||v==="base64url")return v||"base64";throw new P("Incorrect `alphabet` option")}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(447),x=a(584);g.Uint8Array&&v({target:"Uint8Array",stat:!0},{fromHex:function(b){return x(p(b)).bytes}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=v.Uint8Array,x=v.SyntaxError,y=Math.min,b=g("".match);T.exports=function(A,I){var R=A.length;if(R%2!==0)throw new x("String should be an even number of characters");for(var O=I?y(I.length,R/2):R/2,M=I||new p(O),L=b(A,/[\S\s]{2}/g),D=0;D<O;D++){var N=+("0x"+L[D]+"0");if(N!==N)throw new x("String should only contain hex characters");M[D]=N>>4}return{bytes:M,read:D<<1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(580),x=a(586),y=g.Uint8Array,b=!y||!y.prototype.setFromBase64||!(function(){var A=new y([255,255,255,255,255]);try{A.setFromBase64("",null);return}catch(I){}try{A.setFromBase64("a");return}catch(I){}try{A.setFromBase64("MjYyZg===")}catch(I){return A[0]===50&&A[1]===54&&A[2]===50&&A[3]===255&&A[4]===255}})();y&&v({target:"Uint8Array",proto:!0,forced:b},{setFromBase64:function(I){x(this);var R=p(I,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:R.read,written:R.written}}})}),(function(T,P,a){"use strict";var v=a(69),g=TypeError;T.exports=function(p){if(v(p)==="Uint8Array")return p;throw new g("Argument is not an Uint8Array")}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(447),x=a(586),y=a(237),b=a(584);function A(){try{var I=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(I).setFromHex("cafed00d")}catch(R){return!0}}g.Uint8Array&&v({target:"Uint8Array",proto:!0,forced:A()},{setFromHex:function(R){x(this),p(R),y(this.buffer);var O=b(R,this).read;return{read:O,written:O/2}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(287),y=a(586),b=a(237),A=a(581),I=a(582),R=A.i2c,O=A.i2cUrl,M=Math.floor,L=Math.ceil,D=p("".charAt),N=g.Uint8Array,F=g.Array,G=p([].join),j=!N||!N.prototype.toBase64||!(function(){try{var X=new N;X.toBase64(null)}catch(U){return!0}})();N&&v({target:"Uint8Array",proto:!0,forced:j},{toBase64:function(){var U=y(this),V=arguments.length?x(arguments[0]):void 0,k=I(V)==="base64"?R:O,Y=!!V&&!!V.omitPadding;b(this.buffer);for(var K=0,J=U.length,Z=F(Y?M(J/3)*4+(J%3?J%3+1:0):L(J/3)*4),_=0,at,et=function(rt){return D(k,at>>6*rt&63)};K+2<J;K+=3)at=(U[K]<<16)+(U[K+1]<<8)+U[K+2],Z[_++]=et(3),Z[_++]=et(2),Z[_++]=et(1),Z[_++]=et(0);return K+2===J?(at=(U[K]<<16)+(U[K+1]<<8),Z[_++]=et(3),Z[_++]=et(2),Z[_++]=et(1),Y||(Z[_++]="=")):K+1===J&&(at=U[K]<<16,Z[_++]=et(3),Z[_++]=et(2),Y||(Z[_++]="=",Z[_++]="=")),G(Z,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(586),y=a(237),b=p(1.1.toString),A=p([].join),I=Array,R=g.Uint8Array,O=!R||!R.prototype.toHex||!(function(){try{var M=new R([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(L){return!1}})();R&&v({target:"Uint8Array",proto:!0,forced:O},{toHex:function(){x(this),y(this.buffer);for(var L=I(this.length),D=0,N=this.length;D<N;D++){var F=b(this[D],16);L[D]=F.length===1?"0"+F:F}return A(L,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(68),x=String.fromCharCode,y=g("".charAt),b=g(/./.exec),A=g("".slice),I=/^[\da-f]{2}$/i,R=/^[\da-f]{4}$/i;v({global:!0},{unescape:function(M){for(var L=p(M),D="",N=L.length,F=0,G,j;F<N;){if(G=y(L,F++),G==="%"){if(y(L,F)==="u"){if(j=A(L,F+1,F+5),b(R,j)){D+=x(parseInt(j,16)),F+=5;continue}}else if(j=A(L,F,F+2),b(I,j)){D+=x(parseInt(j,16)),F+=2;continue}}D+=G}return D}})}),(function(T,P,a){"use strict";a(592)}),(function(T,P,a){"use strict";var v=a(295),g=a(4),p=a(14),x=a(215),y=a(300),b=a(299),A=a(593),I=a(20),R=a(51).enforce,O=a(7),M=a(52),L=Object,D=Array.isArray,N=L.isExtensible,F=L.isFrozen,G=L.isSealed,j=L.freeze,X=L.seal,U=!g.ActiveXObject&&"ActiveXObject"in g,V,k=function(rt){return function(){return rt(this,arguments.length?arguments[0]:void 0)}},Y=b("WeakMap",k,A),K=Y.prototype,J=p(K.set),Z=function(){return v&&O(function(){var rt=j([]);return J(new Y,rt,1),!F(rt)})};if(M)if(U){V=A.getConstructor(k,"WeakMap",!0),y.enable();var _=p(K.delete),at=p(K.has),et=p(K.get);x(K,{delete:function(rt){if(I(rt)&&!N(rt)){var nt=R(this);return nt.frozen||(nt.frozen=new V),_(this,rt)||nt.frozen.delete(rt)}return _(this,rt)},has:function(nt){if(I(nt)&&!N(nt)){var ut=R(this);return ut.frozen||(ut.frozen=new V),at(this,nt)||ut.frozen.has(nt)}return at(this,nt)},get:function(nt){if(I(nt)&&!N(nt)){var ut=R(this);return ut.frozen||(ut.frozen=new V),at(this,nt)?et(this,nt):ut.frozen.get(nt)}return et(this,nt)},set:function(nt,ut){if(I(nt)&&!N(nt)){var ht=R(this);ht.frozen||(ht.frozen=new V),at(this,nt)?J(this,nt,ut):ht.frozen.set(nt,ut)}else J(this,nt,ut);return this}})}else Z()&&x(K,{set:function(nt,ut){var ht;return D(nt)&&(F(nt)?ht=j:G(nt)&&(ht=X)),J(this,nt,ut),ht&&ht(nt),this}})}),(function(T,P,a){"use strict";var v=a(14),g=a(215),p=a(300).getWeakData,x=a(216),y=a(46),b=a(17),A=a(20),I=a(137),R=a(83),O=a(38),M=a(51),L=M.set,D=M.getterFor,N=R.find,F=R.findIndex,G=v([].splice),j=0,X=function(k){return k.frozen||(k.frozen=new U)},U=function(){this.entries=[]},V=function(k,Y){return N(k.entries,function(K){return K[0]===Y})};U.prototype={get:function(k){var Y=V(this,k);if(Y)return Y[1]},has:function(k){return!!V(this,k)},set:function(k,Y){var K=V(this,k);K?K[1]=Y:this.entries.push([k,Y])},delete:function(k){var Y=F(this.entries,function(K){return K[0]===k});return~Y&&G(this.entries,Y,1),!!~Y}},T.exports={getConstructor:function(k,Y,K,J){var Z=k(function(rt,nt){x(rt,_),L(rt,{type:Y,id:j++,frozen:null}),b(nt)||I(nt,rt[J],{that:rt,AS_ENTRIES:K})}),_=Z.prototype,at=D(Y),et=function(rt,nt,ut){var ht=at(rt),pt=p(y(nt),!0);return pt===!0?X(ht).set(nt,ut):pt[ht.id]=ut,rt};return g(_,{delete:function(rt){var nt=at(this);if(!A(rt))return!1;var ut=p(rt);return ut===!0?X(nt).delete(rt):ut&&O(ut,nt.id)&&delete ut[nt.id]},has:function(nt){var ut=at(this);if(!A(nt))return!1;var ht=p(nt);return ht===!0?X(ut).has(nt):ht&&O(ht,ut.id)}}),g(_,K?{get:function(nt){var ut=at(this);if(A(nt)){var ht=p(nt);if(ht===!0)return X(ut).get(nt);if(ht)return ht[ut.id]}},set:function(nt,ut){return et(this,nt,ut)}}:{add:function(nt){return et(this,nt,!0)}}),Z}}}),(function(T,P,a){"use strict";var v=a(3),g=a(595),p=a(36),x=g.get,y=g.has,b=g.set;v({target:"WeakMap",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){"use strict";var v=a(14),g=WeakMap.prototype;T.exports={WeakMap,set:v(g.set),get:v(g.get),has:v(g.has),remove:v(g.delete)}}),(function(T,P,a){"use strict";var v=a(3),g=a(30),p=a(597),x=a(598),y=a(595),b=a(36),A=y.get,I=y.has,R=y.set,O=b||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(M){return M instanceof TypeError}})();v({target:"WeakMap",proto:!0,real:!0,forced:O},{getOrInsertComputed:function(L,D){if(b||p(this),x(L),g(D),I(this,L))return A(this,L);var N=D(L);return R(this,L,N),N}})}),(function(T,P,a){"use strict";var v=a(595).has;T.exports=function(g){return v(g),g}}),(function(T,P,a){"use strict";var v=a(595),g=new v.WeakMap,p=v.set,x=v.remove;T.exports=function(y){return p(g,y,1),x(g,y),y}}),(function(T,P,a){"use strict";a(600)}),(function(T,P,a){"use strict";var v=a(299),g=a(593);v("WeakSet",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(390),R=a(581).c2i,O=/[^\d+/a-z]/i,M=/[\t\n\f\r ]+/g,L=/[=]{1,2}$/,D=p("atob"),N=Array,F=String.fromCharCode,G=x("".charAt),j=x("".replace),X=x([].join),U=x(O.exec),V=!!D&&!b(function(){return D("aGk=")!=="hi"}),k=V&&b(function(){return D(" ")!==""}),Y=V&&!b(function(){D("a")}),K=V&&!b(function(){D()}),J=V&&D.length!==1,Z=!V||k||Y||K||J;v({global:!0,bind:!0,enumerable:!0,forced:Z},{atob:function(at){if(I(arguments.length,1),V&&!k&&!Y)return y(D,g,at);var et=j(A(at),M,""),rt=0,nt=0,ut,ht,pt;et.length&3||(et=j(et,L,"")),ut=et.length;var yt=ut&3;if(yt===1||U(O,et))throw new(p("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var At=new N((ut>>2)*3+(yt?yt-1:0)),Et=0;rt<ut;)ht=G(et,rt++),pt=nt&3?(pt<<6)+R[ht]:R[ht],nt++&3&&(At[Et++]=F(255&pt>>(-2*nt&6)));return X(At,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(390),R=a(581).i2c,O=p("btoa"),M=Array,L=x([].join),D=x("".charAt),N=x("".charCodeAt),F=!!O&&!b(function(){return O("hi")!=="aGk="}),G=F&&!b(function(){O()}),j=F&&b(function(){return O(null)!=="bnVsbA=="}),X=F&&O.length!==1;v({global:!0,bind:!0,enumerable:!0,forced:!F||G||j||X},{btoa:function(V){if(I(arguments.length,1),F)return y(O,g,A(V));for(var k=A(V),Y=new M((k.length+2)/3<<2),K=0,J=0,Z=R,_,at;D(k,J)||(Z="=",J%1);){if(at=N(k,J+=.75),at>255)throw new(p("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");_=_<<8|at,Y[K++]=D(Z,63&_>>8-J%1*8)}return L(Y,"")}})}),(function(T,P,a){"use strict";var v=a(4),g=a(604),p=a(605),x=a(168),y=a(43),b=function(I){if(I&&I.forEach!==x)try{y(I,"forEach",x)}catch(R){I.forEach=x}};for(var A in g)g[A]&&b(v[A]&&v[A].prototype);b(p)}),(function(T){"use strict";T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),(function(T,P,a){"use strict";var v=a(42),g=v("span").classList,p=g&&g.constructor&&g.constructor.prototype;T.exports=p===Object.prototype?void 0:p}),(function(T,P,a){"use strict";var v=a(4),g=a(604),p=a(605),x=a(176),y=a(43),b=a(82),A=a(33),I=A("iterator"),R=x.values,O=function(L,D){if(L){if(L[I]!==R)try{y(L,I,R)}catch(F){L[I]=R}if(b(L,D,!0),g[D]){for(var N in x)if(L[N]!==x[N])try{y(L,N,x[N])}catch(F){L[N]=x[N]}}}};for(var M in g)O(v[M]&&v[M].prototype,M);O(p,"DOMTokenList")}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(239),x=a(7),y=a(71),b=a(11),A=a(44).f,I=a(47),R=a(77),O=a(38),M=a(216),L=a(46),D=a(132),N=a(125),F=a(608),G=a(128),j=a(51),X=a(6),U=a(36),V="DOMException",k="DATA_CLONE_ERR",Y=g("Error"),K=g(V)||(function(){try{var Nt=g("MessageChannel")||p("worker_threads").MessageChannel;new Nt().port1.postMessage(new WeakMap)}catch(Jt){if(Jt.name===k&&Jt.code===25)return Jt.constructor}})(),J=K&&K.prototype,Z=Y.prototype,_=j.set,at=j.getterFor(V),et="stack"in new Y(V),rt=function(Nt){return O(F,Nt)&&F[Nt].m?F[Nt].c:0},nt=function(){M(this,ut);var Jt=arguments.length,ne=N(Jt<1?void 0:arguments[0]),ve=N(Jt<2?void 0:arguments[1],"Error"),le=rt(ve);if(_(this,{type:V,name:ve,message:ne,code:le}),X||(this.name=ve,this.message=ne,this.code=le),et){var fe=new Y(ne);fe.name=V,A(this,"stack",b(1,G(fe.stack,1)))}},ut=nt.prototype=y(Z),ht=function(Nt){return{enumerable:!0,configurable:!0,get:Nt}},pt=function(Nt){return ht(function(){return at(this)[Nt]})};X&&(R(ut,"code",pt("code")),R(ut,"message",pt("message")),R(ut,"name",pt("name"))),A(ut,"constructor",b(1,nt));var yt=x(function(){return!(new K instanceof Y)}),At=yt||x(function(){return Z.toString!==D||String(new K(1,2))!=="2: 1"}),Et=yt||x(function(){return new K(1,"DataCloneError").code!==25}),Ht=yt||K[k]!==25||J[k]!==25,Ut=U?At||Et||Ht:yt;v({global:!0,constructor:!0,forced:Ut},{DOMException:Ut?nt:K});var kt=g(V),Ct=kt.prototype;At&&(U||K===kt)&&I(Ct,"toString",D),Et&&X&&K===kt&&R(Ct,"code",ht(function(){return rt(L(this).name)}));for(var It in F)if(O(F,It)){var Dt=F[It],Vt=Dt.s,_t=b(6,Dt.c);O(kt,Vt)||A(kt,Vt,_t),O(Ct,Vt)||A(Ct,Vt,_t)}}),(function(T){"use strict";T.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(11),y=a(44).f,b=a(38),A=a(216),I=a(124),R=a(125),O=a(608),M=a(128),L=a(6),D=a(36),N="DOMException",F=p("Error"),G=p(N),j=function(){A(this,X);var nt=arguments.length,ut=R(nt<1?void 0:arguments[0]),ht=R(nt<2?void 0:arguments[1],"Error"),pt=new G(ut,ht),yt=new F(ut);return yt.name=N,y(pt,"stack",x(1,M(yt.stack,1))),I(pt,this,j),pt},X=j.prototype=G.prototype,U="stack"in new F(N),V="stack"in new G(1,2),k=G&&L&&Object.getOwnPropertyDescriptor(g,N),Y=!!k&&!(k.writable&&k.configurable),K=U&&!Y&&!V;v({global:!0,constructor:!0,forced:D||K},{DOMException:K?j:G});var J=p(N),Z=J.prototype;if(Z.constructor!==J){D||y(Z,"constructor",x(1,J));for(var _ in O)if(b(O,_)){var at=O[_],et=at.s;b(J,et)||y(J,et,x(6,at.c))}}}),(function(T,P,a){"use strict";var v=a(23),g=a(82),p="DOMException";g(v(p),p)}),(function(T,P,a){"use strict";a(612),a(613)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(389).clear;v({global:!0,bind:!0,enumerable:!0,forced:g.clearImmediate!==p},{clearImmediate:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(389).set,x=a(614),y=g.setImmediate?x(p,!1):p;v({global:!0,bind:!0,enumerable:!0,forced:g.setImmediate!==y},{setImmediate:y})}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(21),x=a(190),y=a(28),b=a(76),A=a(390),I=v.Function,R=/MSIE .\./.test(y)||x==="BUN"&&(function(){var O=v.Bun.version.split(".");return O.length<3||O[0]==="0"&&(O[1]<3||O[1]==="3"&&O[2]==="0")})();T.exports=function(O,M){var L=M?2:1;return R?function(D,N){var F=A(arguments.length,1)>L,G=p(D)?D:I(D),j=F?b(arguments,L):[],X=F?function(){g(G,this,j)}:G;return M?O(X,N):O(X)}:O}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(392),x=a(30),y=a(390),b=a(7),A=a(6),I=b(function(){return A&&Object.getOwnPropertyDescriptor(g,"queueMicrotask").value.length!==1});v({global:!0,enumerable:!0,dontCallGetSet:!0,forced:I},{queueMicrotask:function(O){y(arguments.length,1),p(x(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(77),x=a(6),y=TypeError,b=Object.defineProperty,A=g.self!==g;try{if(x){var I=Object.getOwnPropertyDescriptor(g,"self");(A||!I||!I.get||!I.enumerable)&&p(g,"self",{get:function(){return g},set:function(O){if(this!==g)throw new y("Illegal invocation");b(g,"self",{value:O,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else v({global:!0,simple:!0,forced:A},{self:g})}catch(R){}}),(function(T,P,a){"use strict";var v=a(36),g=a(3),p=a(4),x=a(23),y=a(14),b=a(7),A=a(40),I=a(21),R=a(89),O=a(17),M=a(20),L=a(22),D=a(137),N=a(46),F=a(69),G=a(38),j=a(90),X=a(43),U=a(63),V=a(390),k=a(440),Y=a(305),K=a(460),J=a(462),Z=a(238),_=a(129),at=a(240),et=p.Object,rt=p.Array,nt=p.Date,ut=p.Error,ht=p.TypeError,pt=p.PerformanceMark,yt=x("DOMException"),At=Y.Map,Et=Y.has,Ht=Y.get,Ut=Y.set,kt=K.Set,Ct=K.add,It=K.has,Dt=x("Object","keys"),Vt=y([].push),_t=y((!0).valueOf),Nt=y(1.1.valueOf),Jt=y("".valueOf),ne=y(nt.prototype.getTime),ve=A("structuredClone"),le="DataCloneError",fe="Transferring",Ce=function(vt){return!b(function(){var Rt=new p.Set([7]),Tt=vt(Rt),wt=vt(et(7));return Tt===Rt||!Tt.has(7)||!M(wt)||+wt!=7})&&vt},Be=function(vt,Rt){return!b(function(){var Tt=new Rt,wt=vt({a:Tt,b:Tt});return!(wt&&wt.a===wt.b&&wt.a instanceof Rt&&wt.a.stack===Tt.stack)})},Ie=function(vt){return!b(function(){var Rt=vt(new p.AggregateError([1],ve,{cause:3}));return Rt.name!=="AggregateError"||Rt.errors[0]!==1||Rt.message!==ve||Rt.cause!==3})},ce=p.structuredClone,xe=v||!Be(ce,ut)||!Be(ce,yt)||!Ie(ce),Ue=!ce&&Ce(function(vt){return new pt(ve,{detail:vt}).detail}),Pt=Ce(ce)||Ue,zt=function(vt){throw new yt("Uncloneable type: "+vt,le)},jt=function(vt,Rt){throw new yt((Rt||"Cloning")+" of "+vt+" cannot be properly polyfilled in this engine",le)},we=function(vt,Rt){return Pt||jt(Rt),Pt(vt)},$t=function(){var vt;try{vt=new p.DataTransfer}catch(Rt){try{vt=new p.ClipboardEvent("").clipboardData}catch(Tt){}}return vt&&vt.items&&vt.files?vt:null},Xt=function(vt,Rt,Tt){if(Et(Rt,vt))return Ht(Rt,vt);var wt=Tt||F(vt),Ft,Lt,ue,ye,Me,Fe;if(wt==="SharedArrayBuffer")Pt?Ft=Pt(vt):Ft=vt;else{var tn=p.DataView;!tn&&!I(vt.slice)&&jt("ArrayBuffer");try{if(I(vt.slice)&&!vt.resizable)Ft=vt.slice(0);else for(Lt=vt.byteLength,ue=("maxByteLength"in vt)?{maxByteLength:vt.maxByteLength}:void 0,Ft=new ArrayBuffer(Lt,ue),ye=new tn(vt),Me=new tn(Ft),Fe=0;Fe<Lt;Fe++)Me.setUint8(Fe,ye.getUint8(Fe))}catch(Ve){throw new yt("ArrayBuffer is detached",le)}}return Ut(Rt,vt,Ft),Ft},re=function(vt,Rt,Tt,wt,Ft){var Lt=p[Rt];return M(Lt)||jt(Rt),new Lt(Xt(vt.buffer,Ft),Tt,wt)},oe=function(vt,Rt){if(L(vt)&&zt("Symbol"),!M(vt))return vt;if(Rt){if(Et(Rt,vt))return Ht(Rt,vt)}else Rt=new At;var Tt=F(vt),wt,Ft,Lt,ue,ye,Me,Fe,tn;switch(Tt){case"Array":Lt=rt(U(vt));break;case"Object":Lt={};break;case"Map":Lt=new At;break;case"Set":Lt=new kt;break;case"RegExp":Lt=new RegExp(vt.source,k(vt));break;case"Error":switch(Ft=vt.name,Ft){case"AggregateError":Lt=new(x(Ft))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":Lt=new(x(Ft));break;case"CompileError":case"LinkError":case"RuntimeError":Lt=new(x("WebAssembly",Ft));break;default:Lt=new ut}break;case"DOMException":Lt=new yt(vt.message,vt.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Lt=Xt(vt,Rt,Tt);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Me=Tt==="DataView"?vt.byteLength:vt.length,Lt=re(vt,Tt,vt.byteOffset,Me,Rt);break;case"DOMQuad":try{Lt=new DOMQuad(oe(vt.p1,Rt),oe(vt.p2,Rt),oe(vt.p3,Rt),oe(vt.p4,Rt))}catch(Ve){Lt=we(vt,Tt)}break;case"File":if(Pt)try{Lt=Pt(vt),F(Lt)!==Tt&&(Lt=void 0)}catch(Ve){}if(!Lt)try{Lt=new File([vt],vt.name,vt)}catch(Ve){}Lt||jt(Tt);break;case"FileList":if(ue=$t(),ue){for(ye=0,Me=U(vt);ye<Me;ye++)ue.items.add(oe(vt[ye],Rt));Lt=ue.files}else Lt=we(vt,Tt);break;case"ImageData":try{Lt=new ImageData(oe(vt.data,Rt),vt.width,vt.height,{colorSpace:vt.colorSpace})}catch(Ve){Lt=we(vt,Tt)}break;default:if(Pt)Lt=Pt(vt);else switch(Tt){case"BigInt":Lt=et(vt.valueOf());break;case"Boolean":Lt=et(_t(vt));break;case"Number":Lt=et(Nt(vt));break;case"String":Lt=et(Jt(vt));break;case"Date":Lt=new nt(ne(vt));break;case"Blob":try{Lt=vt.slice(0,vt.size,vt.type)}catch(Ve){jt(Tt)}break;case"DOMPoint":case"DOMPointReadOnly":wt=p[Tt];try{Lt=wt.fromPoint?wt.fromPoint(vt):new wt(vt.x,vt.y,vt.z,vt.w)}catch(Ve){jt(Tt)}break;case"DOMRect":case"DOMRectReadOnly":wt=p[Tt];try{Lt=wt.fromRect?wt.fromRect(vt):new wt(vt.x,vt.y,vt.width,vt.height)}catch(Ve){jt(Tt)}break;case"DOMMatrix":case"DOMMatrixReadOnly":wt=p[Tt];try{Lt=wt.fromMatrix?wt.fromMatrix(vt):new wt(vt)}catch(Ve){jt(Tt)}break;case"AudioData":case"VideoFrame":I(vt.clone)||jt(Tt);try{Lt=vt.clone()}catch(Ve){zt(Tt)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":jt(Tt);default:zt(Tt)}}switch(Ut(Rt,vt,Lt),Tt){case"Array":case"Object":for(Fe=Dt(vt),ye=0,Me=U(Fe);ye<Me;ye++)tn=Fe[ye],j(Lt,tn,oe(vt[tn],Rt));break;case"Map":vt.forEach(function(Ve,_n){Ut(Lt,oe(_n,Rt),oe(Ve,Rt))});break;case"Set":vt.forEach(function(Ve){Ct(Lt,oe(Ve,Rt))});break;case"Error":X(Lt,"message",oe(vt.message,Rt)),G(vt,"cause")&&X(Lt,"cause",oe(vt.cause,Rt)),Ft==="AggregateError"?Lt.errors=oe(vt.errors,Rt):Ft==="SuppressedError"&&(Lt.error=oe(vt.error,Rt),Lt.suppressed=oe(vt.suppressed,Rt));case"DOMException":_&&X(Lt,"stack",oe(vt.stack,Rt))}return Lt},pe=function(vt,Rt){if(!M(vt))throw new ht("Transfer option cannot be converted to a sequence");var Tt=[];D(vt,function(_n){Vt(Tt,N(_n))});for(var wt=0,Ft=U(Tt),Lt=new kt,ue,ye,Me,Fe,tn,Ve;wt<Ft;){if(ue=Tt[wt++],ye=F(ue),Fe=void 0,ye==="ArrayBuffer"?It(Lt,ue):Et(Rt,ue))throw new yt("Duplicate transferable",le);if(ye==="ArrayBuffer"){Ct(Lt,ue);continue}if(at)Fe=ce(ue,{transfer:[ue]});else switch(ye){case"ImageBitmap":Me=p.OffscreenCanvas,R(Me)||jt(ye,fe);try{tn=new Me(ue.width,ue.height),Ve=tn.getContext("bitmaprenderer"),Ve.transferFromImageBitmap(ue),Fe=tn.transferToImageBitmap()}catch(_n){}break;case"AudioData":case"VideoFrame":(!I(ue.clone)||!I(ue.close))&&jt(ye,fe);try{Fe=ue.clone(),ue.close()}catch(_n){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":jt(ye,fe)}if(Fe===void 0)throw new yt("This object cannot be transferred: "+ye,le);Ut(Rt,ue,Fe)}return Lt},rn=function(vt){J(vt,function(Rt){at?ce(Rt,{transfer:[Rt]}):I(Rt.transfer)?Rt.transfer():Z?Z(Rt):jt("ArrayBuffer",fe)})};g({global:!0,enumerable:!0,sham:!at,forced:xe},{structuredClone:function(Rt){var Tt=V(arguments.length,1)>1&&!O(arguments[1])?N(arguments[1]):void 0,wt=Tt?Tt.transfer:void 0,Ft,Lt;wt!==void 0&&(Ft=new At,Lt=pe(wt,Ft));var ue=oe(Rt,Ft);return Lt&&rn(Lt),ue}})}),(function(T,P,a){"use strict";a(619),a(620)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(614),x=p(g.setInterval,!0);v({global:!0,bind:!0,forced:g.setInterval!==x},{setInterval:x})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(614),x=p(g.setTimeout,!0);v({global:!0,bind:!0,forced:g.setTimeout!==x},{setTimeout:x})}),(function(T,P,a){"use strict";a(622)}),(function(T,P,a){"use strict";a(489);var v=a(3),g=a(6),p=a(623),x=a(4),y=a(84),b=a(14),A=a(47),I=a(77),R=a(216),O=a(38),M=a(351),L=a(170),D=a(76),N=a(482).codeAt,F=a(624),G=a(625),j=a(68),X=a(82),U=a(390),V=a(626),k=a(51),Y=k.set,K=k.getterFor("URL"),J=V.URLSearchParams,Z=V.getState,_=G.decode,at=G.encode,et=x.URL,rt=x.TypeError,nt=x.parseInt,ut=Math.floor,ht=Math.pow,pt=String.fromCharCode,yt=b("".charAt),At=b(/./.exec),Et=b([].join),Ht=b(1.1.toString),Ut=b([].pop),kt=b([].push),Ct=b("".replace),It=b([].shift),Dt=b("".split),Vt=b("".indexOf),_t=b("".slice),Nt=b("".toLowerCase),Jt=b([].unshift),ne="Invalid authority",ve="Invalid scheme",le="Invalid host",fe="Invalid port",Ce=/[a-z]/i,Be=/[\d+\-.a-z]/i,Ie=/\d/,ce=/^0x/i,xe=/^[0-7]+$/,Ue=/^\d+$/,Pt=/^[\da-f]+$/i,zt=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,jt=/[\0\t\n\r #/:<>?@[\\\]^|]/,we=/^[\u0000-\u0020]+/,$t=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Xt=/[\t\n\r]/g,re=/[^\u0000-\u007F]/,oe="\xA8\xAF\xB4\xB8\u02D8\u02D9\u02DA\u02DB\u02DC\u02DD\u037A\u0384\u0385\u1FBD\u1FBF\u1FC0\u1FC1\u1FCD\u1FCE\u1FCF\u1FDD\u1FDE\u1FDF\u1FED\u1FEE\u1FFD\u1FFE\u2017\u203E\u2047\u2048\u2049\u2100\u2101\u2105\u2106\u2A74\u309B\u309C\uFC5E\uFC5F\uFC60\uFC61\uFC62\uFC63\uFDFA\uFDFB\uFE13\uFE16\uFE47\uFE48\uFE49\uFE4A\uFE4B\uFE4C\uFE55\uFE56\uFE5F\uFE64\uFE65\uFE68\uFE6A\uFE6B\uFE70\uFE72\uFE74\uFE76\uFE78\uFE7A\uFE7C\uFE7E\uFFE3",pe,rn=function(dt){return dt===173||dt===847||dt===8203||dt===12644||dt===65279||dt===65440||dt>=4447&&dt<=4448||dt>=6068&&dt<=6069||dt>=6155&&dt<=6159||dt>=8288&&dt<=8292||dt>=8298&&dt<=8303||dt>=65024&&dt<=65039||dt>=917760&&dt<=917999},vt=function(dt){return dt===65533||dt>=55296&&dt<=57343||dt>=128&&dt<=159||dt>=8206&&dt<=8207||dt>=8232&&dt<=8233||dt>=8234&&dt<=8238||dt>=8293&&dt<=8297||dt>=64976&&dt<=65007||(dt&65534)===65534||dt>=57344&&dt<=63743||dt>=983040&&dt<=1114109},Rt=function(dt){return dt>=65281&&dt<=65374?dt-65248:dt===160||dt===5760||dt===8239||dt===8287||dt===12288||dt>=8192&&dt<=8202||dt<=65535&&Vt(oe,pt(dt))>-1?32:dt},Tt=function(dt){if(!At(re,dt))return dt===""?null:F(dt);var Bt=L(dt),xt="",mt,Gt,Se;for(mt=0;mt<Bt.length;mt++){if(Gt=N(Bt[mt],0),vt(Gt))return null;rn(Gt)||(Se=Rt(Gt),xt+=Se===Gt?Bt[mt]:pt(Se))}return xt===""?null:F(xt)},wt=function(dt){var Bt=Dt(dt,"."),xt,mt;if(Bt[Bt.length-1]===""){if(Bt.length===1)return!1;Bt.length--}return xt=Bt[Bt.length-1],At(Ue,xt)?!0:At(ce,xt)?(mt=_t(xt,2),mt===""||!!At(Pt,mt)):!1},Ft=function(dt){var Bt=Dt(dt,"."),xt,mt,Gt,Se,de,dn,en;if(Bt.length&&Bt[Bt.length-1]===""&&Bt.length--,xt=Bt.length,xt>4)return null;for(mt=[],Gt=0;Gt<xt;Gt++){if(Se=Bt[Gt],Se==="")return null;if(de=10,Se.length>1&&yt(Se,0)==="0"&&(de=At(ce,Se)?16:8,Se=_t(Se,de===8?1:2)),Se==="")dn=0;else{if(!At(de===10?Ue:de===8?xe:Pt,Se))return null;dn=nt(Se,de)}kt(mt,dn)}for(Gt=0;Gt<xt;Gt++)if(dn=mt[Gt],Gt===xt-1){if(dn>=ht(256,5-xt))return null}else if(dn>255)return null;for(en=Ut(mt),Gt=0;Gt<mt.length;Gt++)en+=mt[Gt]*ht(256,3-Gt);return en},Lt=function(dt){var Bt=[0,0,0,0,0,0,0,0],xt=0,mt=null,Gt=0,Se,de,dn,en,Sn,Mn,Qt,hn=function(){return yt(dt,Gt)};if(hn()===":"){if(yt(dt,1)!==":")return;Gt+=2,xt++,mt=xt}for(;hn();){if(xt===8)return;if(hn()===":"){if(mt!==null)return;Gt++,xt++,mt=xt;continue}for(Se=de=0;de<4&&At(Pt,hn());)Se=Se*16+nt(hn(),16),Gt++,de++;if(hn()==="."){if(de===0||(Gt-=de,xt>6))return;for(dn=0;hn();){if(en=null,dn>0)if(hn()==="."&&dn<4)Gt++;else return;if(!At(Ie,hn()))return;for(;At(Ie,hn());){if(Sn=nt(hn(),10),en===null)en=Sn;else{if(en===0)return;en=en*10+Sn}if(en>255)return;Gt++}Bt[xt]=Bt[xt]*256+en,dn++,(dn===2||dn===4)&&xt++}if(dn!==4)return;break}else if(hn()===":"){if(Gt++,!hn())return}else if(hn())return;Bt[xt++]=Se}if(mt!==null)for(Mn=xt-mt,xt=7;xt!==0&&Mn>0;)Qt=Bt[xt],Bt[xt--]=Bt[mt+Mn-1],Bt[mt+--Mn]=Qt;else if(xt!==8)return;return Bt},ue=function(dt){for(var Bt=null,xt=1,mt=null,Gt=0,Se=0;Se<8;Se++)dt[Se]!==0?(Gt>xt&&(Bt=mt,xt=Gt),mt=null,Gt=0):(mt===null&&(mt=Se),++Gt);return Gt>xt?mt:Bt},ye=function(dt){var Bt,xt,mt,Gt;if(typeof dt=="number"){for(Bt=[],xt=0;xt<4;xt++)Jt(Bt,dt%256),dt=ut(dt/256);return Et(Bt,".")}if(typeof dt=="object"){for(Bt="",mt=ue(dt),xt=0;xt<8;xt++)Gt&&dt[xt]===0||(Gt&&(Gt=!1),mt===xt?(Bt+=xt?":":"::",Gt=!0):(Bt+=Ht(dt[xt],16),xt<7&&(Bt+=":")));return"["+Bt+"]"}return dt},Me={},Fe=M({},Me,{" ":1,'"':1,"#":1,"<":1,">":1}),tn=M({},Fe,{"'":1}),Ve=M({},Me,{" ":1,'"':1,"<":1,">":1,"`":1}),_n=M({},Ve,{"#":1,"?":1,"{":1,"}":1,"^":1}),Ci=M({},_n,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Er=function(dt,Bt){var xt=N(dt,0);return xt>=32&&xt<127&&!O(Bt,dt)?dt:dt==="'"&&O(Bt,dt)?"%27":at(dt)},Ga={ftp:21,file:null,http:80,https:443,ws:80,wss:443},xa=function(dt,Bt){var xt;return dt.length===2&&At(Ce,yt(dt,0))&&((xt=yt(dt,1))===":"||!Bt&&xt==="|")},Is=function(dt){var Bt;return dt.length>1&&xa(_t(dt,0,2))&&(dt.length===2||(Bt=yt(dt,2))==="/"||Bt==="\\"||Bt==="?"||Bt==="#")},fl=function(dt){return dt==="."||Nt(dt)==="%2e"},Rs=function(dt){return dt=Nt(dt),dt===".."||dt==="%2e."||dt===".%2e"||dt==="%2e%2e"},Ii={},ws={},Ri={},Os={},Ps={},wi={},Ms={},Ls={},Xa={},Wa={},Oi={},Pi={},Mi={},Li={},Di={},Fi={},ra={},sr={},Ds={},hr={},fn={},Va=function(dt,Bt,xt){var mt=j(dt),Gt,Se,de;if(Bt){if(Se=this.parse(mt),Se)throw new rt(Se);this.searchParams=null}else{if(xt!==void 0&&(Gt=new Va(xt,!0)),Se=this.parse(mt,null,Gt),Se)throw new rt(Se);de=Z(new J),de.bindURL(this),this.searchParams=de}};Va.prototype={type:"URL",parse:function(dt,Bt,xt){var mt=this,Gt=Bt||Ii,Se=0,de="",dn=!1,en=!1,Sn=!1,Mn,Qt,hn,qn;for(dt=j(dt),Bt||(mt.scheme="",mt.username="",mt.password="",mt.host=null,mt.port=null,mt.path=[],mt.query=null,mt.fragment=null,mt.cannotBeABaseURL=!1,dt=Ct(dt,we,""),dt=Ct(dt,$t,"$1")),dt=Ct(dt,Xt,""),Mn=L(dt);Se<=Mn.length;){switch(Qt=Mn[Se],Gt){case Ii:if(Qt&&At(Ce,Qt))de+=Nt(Qt),Gt=ws;else{if(Bt)return ve;Gt=Ri;continue}break;case ws:if(Qt&&At(Be,Qt))de+=Nt(Qt);else if(Qt===":"){if(Bt&&(mt.isSpecial()!==O(Ga,de)||de==="file"&&(mt.includesCredentials()||mt.port!==null)||mt.scheme==="file"&&mt.host===""))return;if(mt.scheme=de,Bt){mt.isSpecial()&&Ga[mt.scheme]===mt.port&&(mt.port=null);return}de="",mt.scheme==="file"?Gt=Li:mt.isSpecial()&&xt&&xt.scheme===mt.scheme?Gt=Os:mt.isSpecial()?Gt=Ls:Mn[Se+1]==="/"?(Gt=Ps,Se++):(mt.cannotBeABaseURL=!0,kt(mt.path,""),Gt=Ds)}else{if(Bt)return ve;de="",Gt=Ri,Se=0;continue}break;case Ri:if(!xt||xt.cannotBeABaseURL&&Qt!=="#")return ve;if(xt.cannotBeABaseURL&&Qt==="#"){mt.scheme=xt.scheme,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",mt.cannotBeABaseURL=!0,Gt=fn;break}Gt=xt.scheme==="file"?Li:wi;continue;case Os:if(Qt==="/"&&Mn[Se+1]==="/")Gt=Xa,Se++;else{Gt=wi;continue}break;case Ps:if(Qt==="/"){Gt=Wa;break}else{Gt=sr;continue}case wi:if(mt.scheme=xt.scheme,Qt===pe)mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query=xt.query;else if(Qt==="/"||Qt==="\\"&&mt.isSpecial())Gt=Ms;else if(Qt==="?")mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query="",Gt=hr;else if(Qt==="#")mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",Gt=fn;else{mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.path.length&&mt.path.length--,Gt=sr;continue}break;case Ms:if(mt.isSpecial()&&(Qt==="/"||Qt==="\\"))Gt=Xa;else if(Qt==="/")Gt=Wa;else{mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,Gt=sr;continue}break;case Ls:if(Gt=Xa,Qt!=="/"||Mn[Se+1]!=="/")continue;Se++;break;case Xa:if(Qt!=="/"&&Qt!=="\\"){Gt=Wa;continue}break;case Wa:if(Qt==="@"){dn&&(de="%40"+de),dn=!0,hn=L(de);for(var ya=0;ya<hn.length;ya++){var ja=hn[ya];if(ja===":"&&!Sn){Sn=!0;continue}var Ta=Er(ja,Ci);Sn?mt.password+=Ta:mt.username+=Ta}de=""}else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()){if(dn&&de==="")return ne;Se-=L(de).length+1,de="",Gt=Oi}else de+=Qt;break;case Oi:case Pi:if(Bt&&mt.scheme==="file"){Gt=Fi;continue}else if(Qt===":"&&!en){if(de==="")return le;if(Bt===Pi)return;if(qn=mt.parseHost(de),qn)return qn;de="",Gt=Mi}else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()){if(mt.isSpecial()&&de==="")return le;if(Bt&&de===""&&(mt.includesCredentials()||mt.port!==null))return;if(qn=mt.parseHost(de),qn)return qn;if(de="",Gt=ra,Bt)return;continue}else Qt==="["?en=!0:Qt==="]"&&(en=!1),de+=Qt;break;case Mi:if(At(Ie,Qt))de+=Qt;else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()||Bt){if(de!==""){var Ni=nt(de,10);if(Ni>65535)return fe;mt.port=mt.isSpecial()&&Ni===Ga[mt.scheme]?null:Ni,de=""}if(Bt)return;Gt=ra;continue}else return fe;break;case Li:if(mt.scheme="file",mt.host="",Qt==="/"||Qt==="\\")Gt=Di;else if(xt&&xt.scheme==="file")switch(Qt){case pe:mt.host=xt.host,mt.path=D(xt.path),mt.query=xt.query;break;case"?":mt.host=xt.host,mt.path=D(xt.path),mt.query="",Gt=hr;break;case"#":mt.host=xt.host,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",Gt=fn;break;default:mt.host=xt.host,Is(Et(D(Mn,Se),""))||(mt.path=D(xt.path),mt.shortenPath()),Gt=sr;continue}else{Gt=sr;continue}break;case Di:if(Qt==="/"||Qt==="\\"){Gt=Fi;break}xt&&xt.scheme==="file"&&(mt.host=xt.host,!Is(Et(D(Mn,Se),""))&&xa(xt.path[0],!0)&&kt(mt.path,xt.path[0])),Gt=sr;continue;case Fi:if(Qt===pe||Qt==="/"||Qt==="\\"||Qt==="?"||Qt==="#"){if(!Bt&&xa(de))Gt=sr;else if(de===""){if(mt.host="",Bt)return;Gt=ra}else{if(qn=mt.parseHost(de),qn)return qn;if(mt.host==="localhost"&&(mt.host=""),Bt)return;de="",Gt=ra}continue}else de+=Qt;break;case ra:if(mt.isSpecial()){if(Gt=sr,Qt!=="/"&&Qt!=="\\")continue}else if(!Bt&&Qt==="?")mt.query="",Gt=hr;else if(!Bt&&Qt==="#")mt.fragment="",Gt=fn;else if(Qt!==pe&&(Gt=sr,Qt!=="/"))continue;break;case sr:if(Qt===pe||Qt==="/"||Qt==="\\"&&mt.isSpecial()||!Bt&&(Qt==="?"||Qt==="#")){if(Rs(de)?(mt.shortenPath(),Qt!=="/"&&!(Qt==="\\"&&mt.isSpecial())&&kt(mt.path,"")):fl(de)?Qt!=="/"&&!(Qt==="\\"&&mt.isSpecial())&&kt(mt.path,""):(mt.scheme==="file"&&!mt.path.length&&xa(de)&&(mt.host!==null&&mt.host!==""&&(mt.host=""),de=yt(de,0)+":"),kt(mt.path,de)),de="",mt.scheme==="file"&&(Qt===pe||Qt==="?"||Qt==="#"))for(;mt.path.length>1&&mt.path[0]==="";)It(mt.path);Qt==="?"?(mt.query="",Gt=hr):Qt==="#"&&(mt.fragment="",Gt=fn)}else de+=Er(Qt,_n);break;case Ds:Qt==="?"?(mt.query="",Gt=hr):Qt==="#"?(mt.fragment="",Gt=fn):Qt!==pe&&(Qt===" "?mt.path[0]+=Mn[Se+1]==="?"||Mn[Se+1]==="#"?"%20":" ":mt.path[0]+=Er(Qt,Me));break;case hr:!Bt&&Qt==="#"?(mt.fragment="",Gt=fn):Qt!==pe&&(mt.query+=Er(Qt,mt.isSpecial()?tn:Fe));break;case fn:Qt!==pe&&(mt.fragment+=Er(Qt,Ve));break}Se++}},parseHost:function(dt){var Bt,xt,mt;if(yt(dt,0)==="["){if(yt(dt,dt.length-1)!=="]"||(Bt=Lt(_t(dt,1,-1)),!Bt))return le;this.host=Bt}else if(this.isSpecial()){if(dt=Tt(_(dt)),dt===null||At(zt,dt))return le;if(wt(dt)){if(Bt=Ft(dt),Bt===null)return le;this.host=Bt}else this.host=dt}else{if(At(jt,dt))return le;for(Bt="",xt=L(dt),mt=0;mt<xt.length;mt++)Bt+=Er(xt[mt],Me);this.host=Bt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return O(Ga,this.scheme)},shortenPath:function(){var dt=this.path,Bt=dt.length;Bt&&(this.scheme!=="file"||Bt!==1||!xa(dt[0],!0))&&dt.length--},serialize:function(){var dt=this,Bt=dt.scheme,xt=dt.username,mt=dt.password,Gt=dt.host,Se=dt.port,de=dt.path,dn=dt.query,en=dt.fragment,Sn=Bt+":";return Gt!==null?(Sn+="//",dt.includesCredentials()&&(Sn+=xt+(mt?":"+mt:"")+"@"),Sn+=ye(Gt),Se!==null&&(Sn+=":"+Se)):Bt==="file"&&(Sn+="//"),Gt===null&&!dt.cannotBeABaseURL&&de.length>1&&de[0]===""&&(Sn+="/."),Sn+=dt.cannotBeABaseURL?de[0]:de.length?"/"+Et(de,"/"):"",dn!==null&&(Sn+="?"+dn),en!==null&&(Sn+="#"+en),Sn},setHref:function(dt){var Bt=this.parse(dt);if(Bt)throw new rt(Bt);this.searchParams.update()},getOrigin:function(){var dt=this.scheme,Bt=this.port;if(dt==="blob")try{return new aa(this.path[0]).origin}catch(xt){return"null"}return dt==="file"||!this.isSpecial()?"null":dt+"://"+ye(this.host)+(Bt!==null?":"+Bt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(dt){this.parse(j(dt)+":",Ii)},getUsername:function(){return this.username},setUsername:function(dt){var Bt=L(j(dt));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var xt=0;xt<Bt.length;xt++)this.username+=Er(Bt[xt],Ci)}},getPassword:function(){return this.password},setPassword:function(dt){var Bt=L(j(dt));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var xt=0;xt<Bt.length;xt++)this.password+=Er(Bt[xt],Ci)}},getHost:function(){var dt=this.host,Bt=this.port;return dt===null?"":Bt===null?ye(dt):ye(dt)+":"+Bt},setHost:function(dt){this.cannotBeABaseURL||this.parse(dt,Oi)},getHostname:function(){var dt=this.host;return dt===null?"":ye(dt)},setHostname:function(dt){this.cannotBeABaseURL||this.parse(dt,Pi)},getPort:function(){var dt=this.port;return dt===null?"":j(dt)},setPort:function(dt){this.cannotHaveUsernamePasswordPort()||(dt=j(dt),dt===""?this.port=null:this.parse(dt,Mi))},getPathname:function(){var dt=this.path;return this.cannotBeABaseURL?dt[0]:dt.length?"/"+Et(dt,"/"):""},setPathname:function(dt){this.cannotBeABaseURL||(this.path=[],this.parse(dt,ra))},getSearch:function(){var dt=this.query;return dt?"?"+dt:""},setSearch:function(dt){dt=j(dt),dt===""?this.query=null:(yt(dt,0)==="?"&&(dt=_t(dt,1)),this.query="",this.parse(dt,hr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var dt=this.fragment;return dt?"#"+dt:""},setHash:function(dt){if(dt=j(dt),dt===""){this.fragment=null;return}yt(dt,0)==="#"&&(dt=_t(dt,1)),this.fragment="",this.parse(dt,fn)},update:function(){this.query=this.searchParams.serialize()||null}};var aa=function(Bt){var xt=R(this,bn),mt=U(arguments.length,1)>1?arguments[1]:void 0,Gt=Y(xt,new Va(Bt,!1,mt));g||(xt.href=Gt.serialize(),xt.origin=Gt.getOrigin(),xt.protocol=Gt.getProtocol(),xt.username=Gt.getUsername(),xt.password=Gt.getPassword(),xt.host=Gt.getHost(),xt.hostname=Gt.getHostname(),xt.port=Gt.getPort(),xt.pathname=Gt.getPathname(),xt.search=Gt.getSearch(),xt.searchParams=Gt.getSearchParams(),xt.hash=Gt.getHash())},bn=aa.prototype,Yt=function(dt,Bt){return{get:function(){return K(this)[dt]()},set:Bt&&function(xt){return K(this)[Bt](xt)},configurable:!0,enumerable:!0}};if(g&&(I(bn,"href",Yt("serialize","setHref")),I(bn,"origin",Yt("getOrigin")),I(bn,"protocol",Yt("getProtocol","setProtocol")),I(bn,"username",Yt("getUsername","setUsername")),I(bn,"password",Yt("getPassword","setPassword")),I(bn,"host",Yt("getHost","setHost")),I(bn,"hostname",Yt("getHostname","setHostname")),I(bn,"port",Yt("getPort","setPort")),I(bn,"pathname",Yt("getPathname","setPathname")),I(bn,"search",Yt("getSearch","setSearch")),I(bn,"searchParams",Yt("getSearchParams")),I(bn,"hash",Yt("getHash","setHash"))),A(bn,"toJSON",function(){return K(this).serialize()},{enumerable:!0}),A(bn,"toString",function(){return K(this).serialize()},{enumerable:!0}),et){var qt=et.createObjectURL,Fs=et.revokeObjectURL;qt&&A(aa,"createObjectURL",y(qt,et)),Fs&&A(aa,"revokeObjectURL",y(Fs,et))}X(aa,"URL"),v({global:!0,constructor:!0,forced:!p,sham:!g},{URL:aa})}),(function(T,P,a){"use strict";var v=a(7),g=a(33),p=a(6),x=a(36),y=g("iterator");T.exports=!v(function(){var b=new URL("b?a=1&b=2&c=3","https://a"),A=b.searchParams,I=new URLSearchParams("a=1&a=2&b=3"),R="";return b.pathname="c%20d",A.forEach(function(O,M){A.delete("b"),R+=M+O}),I.delete("a",2),I.delete("b",void 0),x&&(!b.toJSON||!I.has("a",1)||I.has("a",2)||!I.has("a",void 0)||I.has("b"))||!A.size&&(x||!p)||!A.sort||b.href!=="https://a/c%20d?a=1&c=3"||A.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!A[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||R!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(T,P,a){"use strict";var v=a(14),g=2147483647,p=36,x=1,y=26,b=38,A=700,I=72,R=128,O="-",M=/[^\0-\u007E]/,L=/[.\u3002\uFF0E\uFF61]/g,D="Overflow: input needs wider integers to process",N=p-x,F=RangeError,G=v(L.exec),j=Math.floor,X=String.fromCharCode,U=v("".charCodeAt),V=v([].join),k=v([].push),Y=v("".replace),K=v("".split),J=v("".toLowerCase),Z=function(rt){for(var nt=[],ut=0,ht=rt.length;ut<ht;){var pt=U(rt,ut++);if(pt>=55296&&pt<=56319&&ut<ht){var yt=U(rt,ut++);(yt&64512)===56320?k(nt,((pt&1023)<<10)+(yt&1023)+65536):(k(nt,pt),ut--)}else k(nt,pt)}return nt},_=function(rt){return rt+22+75*(rt<26)},at=function(rt,nt,ut){var ht=0;for(rt=ut?j(rt/A):rt>>1,rt+=j(rt/nt);rt>N*y>>1;)rt=j(rt/N),ht+=p;return j(ht+(N+1)*rt/(rt+b))},et=function(rt){var nt=[];rt=Z(rt);var ut=rt.length,ht=R,pt=0,yt=I,At,Et;for(At=0;At<rt.length;At++)Et=rt[At],Et<128&&k(nt,X(Et));var Ht=nt.length,Ut=Ht;for(Ht&&k(nt,O);Ut<ut;){var kt=g;for(At=0;At<rt.length;At++)Et=rt[At],Et>=ht&&Et<kt&&(kt=Et);var Ct=Ut+1;if(kt-ht>j((g-pt)/Ct))throw new F(D);for(pt+=(kt-ht)*Ct,ht=kt,At=0;At<rt.length;At++){if(Et=rt[At],Et<ht&&++pt>g)throw new F(D);if(Et===ht){for(var It=pt,Dt=p;;){var Vt=Dt<=yt?x:Dt>=yt+y?y:Dt-yt;if(It<Vt)break;var _t=It-Vt,Nt=p-Vt;k(nt,X(_(Vt+_t%Nt))),It=j(_t/Nt),Dt+=p}k(nt,X(_(It))),yt=at(pt,Ct,Ut===Ht),pt=0,Ut++}}pt++,ht++}return V(nt,"")};T.exports=function(rt){var nt=[],ut=K(Y(J(rt),L,"."),"."),ht,pt;for(ht=0;ht<ut.length;ht++)pt=ut[ht],k(nt,G(M,pt)?"xn--"+et(pt):pt);return V(nt,".")}}),(function(T,P,a){"use strict";a(486);var v=a(23),g=a(14),p=String.fromCharCode,x=v("String","fromCodePoint"),y=encodeURIComponent,b=parseInt,A=g("".charAt),I=g([].push),R=g("".replace),O=g("".slice),M=g(/./.exec),L="\uFFFD",D=/^[0-9a-f]+$/i,N=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,F=function(k,Y){var K=O(k,Y,Y+2);return M(D,K)?b(K,16):NaN},G=function(k){for(var Y=0,K=128;K>0&&(k&K)!==0;K>>=1)Y++;return Y},j=function(k){var Y=null,K=k.length;switch(K){case 1:Y=k[0];break;case 2:Y=(k[0]&31)<<6|k[1]&63;break;case 3:Y=(k[0]&15)<<12|(k[1]&63)<<6|k[2]&63;break;case 4:Y=(k[0]&7)<<18|(k[1]&63)<<12|(k[2]&63)<<6|k[3]&63;break}return Y===null||Y>1114111||Y>=55296&&Y<=57343||Y<(K>3?65536:K>2?2048:K>1?128:0)?null:Y},X=function(k){return k.length===2?k:L},U=function(k){for(var Y=k.length,K="",J=0;J<Y;){var Z=A(k,J);if(Z==="%"){if(A(k,J+1)==="%"||J+3>Y){K+="%",J++;continue}var _=F(k,J+1);if(_!==_){K+=Z,J++;continue}J+=2;var at=G(_);if(at===0)Z=p(_);else{if(at===1||at>4){K+=L,J++;continue}for(var et=[_],rt=1;rt<at&&(J++,!(J+3>Y||A(k,J)!=="%"));){var nt=F(k,J+1);if(nt!==nt||nt>191||nt<128||rt===1&&(_===224&&nt<160||_===237&&nt>159||_===240&&nt<144||_===244&&nt>143))break;I(et,nt),J+=2,rt++}if(et.length!==at){K+=L;continue}var ut=j(et);if(ut===null){for(var ht=0;ht<at;ht++)K+=L;J++;continue}else Z=x(ut)}}K+=Z,J++}return K},V=function(k){try{return y(k)}catch(Y){return y(R(k,N,X))}};T.exports={decode:U,encode:V}}),(function(T,P,a){"use strict";a(176);var v=a(3),g=a(4),p=a(393),x=a(8),y=a(14),b=a(6),A=a(623),I=a(625),R=a(47),O=a(77),M=a(215),L=a(82),D=a(178),N=a(51),F=a(216),G=a(21),j=a(38),X=a(84),U=a(69),V=a(46),k=a(20),Y=a(68),K=a(71),J=a(11),Z=a(140),_=a(141),at=a(180),et=a(390),rt=a(33),nt=a(196),ut=rt("iterator"),ht="URLSearchParams",pt=ht+"Iterator",yt=N.set,At=N.getterFor(ht),Et=N.getterFor(pt),Ht=I.decode,Ut=I.encode,kt=p("fetch"),Ct=p("Request"),It=p("Headers"),Dt=Ct&&Ct.prototype,Vt=It&&It.prototype,_t=g.TypeError,Nt=y("".charAt),Jt=y([].join),ne=y([].push),ve=y("".replace),le=y([].shift),fe=y([].splice),Ce=y("".split),Be=y("".slice),Ie=/\+/g,ce=function(vt){return Ht(ve(vt,Ie," "))},xe=/[!'()~]|%20/g,Ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pt=function(vt){return Ue[vt]},zt=function(vt){return ve(Ut(vt),xe,Pt)},jt=D(function(Rt,Tt){yt(this,{type:pt,target:At(Rt).entries,index:0,kind:Tt})},ht,function(){var Rt=Et(this),Tt=Rt.target,wt=Rt.index++;if(!Tt||wt>=Tt.length)return Rt.target=null,at(void 0,!0);var Ft=Tt[wt];switch(Rt.kind){case"keys":return at(Ft.key,!1);case"values":return at(Ft.value,!1)}return at([Ft.key,Ft.value],!1)},!0),we=function(vt){this.entries=[],this.url=null,vt!==void 0&&(k(vt)?this.parseObject(vt):this.parseQuery(typeof vt=="string"?Nt(vt,0)==="?"?Be(vt,1):vt:Y(vt)))};we.prototype={type:ht,bindURL:function(vt){this.url=vt,this.update()},parseObject:function(vt){var Rt=this.entries,Tt=_(vt),wt,Ft,Lt,ue,ye,Me,Fe;if(Tt)for(wt=Z(vt,Tt),Ft=wt.next;!(Lt=x(Ft,wt)).done;){if(ue=Z(V(Lt.value)),ye=ue.next,(Me=x(ye,ue)).done||(Fe=x(ye,ue)).done||!x(ye,ue).done)throw new _t("Expected sequence with length 2");ne(Rt,{key:Y(Me.value),value:Y(Fe.value)})}else for(var tn in vt)j(vt,tn)&&ne(Rt,{key:tn,value:Y(vt[tn])})},parseQuery:function(vt){if(vt)for(var Rt=this.entries,Tt=Ce(vt,"&"),wt=0,Ft,Lt;wt<Tt.length;)Ft=Tt[wt++],Ft.length&&(Lt=Ce(Ft,"="),ne(Rt,{key:ce(le(Lt)),value:ce(Jt(Lt,"="))}))},serialize:function(){for(var vt=this.entries,Rt=[],Tt=0,wt;Tt<vt.length;)wt=vt[Tt++],ne(Rt,zt(wt.key)+"="+zt(wt.value));return Jt(Rt,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var $t=function(){F(this,Xt);var Rt=arguments.length>0?arguments[0]:void 0,Tt=yt(this,new we(Rt));b||(this.size=Tt.entries.length)},Xt=$t.prototype;if(M(Xt,{append:function(Rt,Tt){var wt=At(this);et(arguments.length,2),ne(wt.entries,{key:Y(Rt),value:Y(Tt)}),b||this.size++,wt.updateURL()},delete:function(vt){for(var Rt=At(this),Tt=et(arguments.length,1),wt=Rt.entries,Ft=Y(vt),Lt=Tt<2?void 0:arguments[1],ue=Lt===void 0?Lt:Y(Lt),ye=0;ye<wt.length;){var Me=wt[ye];Me.key===Ft&&(ue===void 0||Me.value===ue)?fe(wt,ye,1):ye++}b||(this.size=wt.length),Rt.updateURL()},get:function(Rt){var Tt=At(this).entries;et(arguments.length,1);for(var wt=Y(Rt),Ft=0;Ft<Tt.length;Ft++)if(Tt[Ft].key===wt)return Tt[Ft].value;return null},getAll:function(Rt){var Tt=At(this).entries;et(arguments.length,1);for(var wt=Y(Rt),Ft=[],Lt=0;Lt<Tt.length;Lt++)Tt[Lt].key===wt&&ne(Ft,Tt[Lt].value);return Ft},has:function(Rt){for(var Tt=At(this).entries,wt=et(arguments.length,1),Ft=Y(Rt),Lt=wt<2?void 0:arguments[1],ue=Lt===void 0?Lt:Y(Lt),ye=0;ye<Tt.length;){var Me=Tt[ye++];if(Me.key===Ft&&(ue===void 0||Me.value===ue))return!0}return!1},set:function(Rt,Tt){var wt=At(this);et(arguments.length,2);for(var Ft=wt.entries,Lt=!1,ue=Y(Rt),ye=Y(Tt),Me=0,Fe;Me<Ft.length;Me++)Fe=Ft[Me],Fe.key===ue&&(Lt?fe(Ft,Me--,1):(Lt=!0,Fe.value=ye));Lt||ne(Ft,{key:ue,value:ye}),b||(this.size=Ft.length),wt.updateURL()},sort:function(){var Rt=At(this);nt(Rt.entries,function(Tt,wt){return Tt.key>wt.key?1:-1}),Rt.updateURL()},forEach:function(Rt){for(var Tt=At(this).entries,wt=X(Rt,arguments.length>1?arguments[1]:void 0),Ft=0,Lt;Ft<Tt.length;)Lt=Tt[Ft++],wt(Lt.value,Lt.key,this)},keys:function(){return new jt(this,"keys")},values:function(){return new jt(this,"values")},entries:function(){return new jt(this,"entries")}},{enumerable:!0}),R(Xt,ut,Xt.entries,{name:"entries"}),R(Xt,"toString",function(){return At(this).serialize()},{enumerable:!0}),b&&O(Xt,"size",{get:function(){return At(this).entries.length},configurable:!0,enumerable:!0}),L($t,ht),v({global:!0,constructor:!0,forced:!A},{URLSearchParams:$t}),!A&&G(It)){var re=y(Vt.has),oe=y(Vt.set),pe=function(vt){if(k(vt)){var Rt=vt.body,Tt;if(U(Rt)===ht)return Tt=vt.headers?new It(vt.headers):new It,re(Tt,"content-type")||oe(Tt,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),K(vt,{body:J(0,Y(Rt)),headers:J(0,Tt)})}return vt};if(G(kt)&&v({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Rt){return kt(Rt,arguments.length>1?pe(arguments[1]):{})}}),G(Ct)){var rn=function(Rt){return F(this,Dt),new Ct(Rt,arguments.length>1?pe(arguments[1]):{})};Dt.constructor=rn,rn.prototype=Dt,v({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:rn})}}T.exports={URLSearchParams:$t,getState:At}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(7),x=a(390),y=a(68),b=a(623),A=g("URL"),I=b&&p(function(){A.canParse()}),R=p(function(){return A.canParse.length!==1});v({target:"URL",stat:!0,forced:!I||R},{canParse:function(M){var L=x(arguments.length,1),D=y(M),N=L<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new A(D,N)}catch(F){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(390),x=a(68),y=a(623),b=g("URL");v({target:"URL",stat:!0,forced:!y},{parse:function(I){var R=p(arguments.length,1),O=x(I),M=R<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new b(O,M)}catch(L){return null}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(206),x=p("URL","toString");v({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return g(x,this)}})}),(function(T,P,a){"use strict";a(626)}),(function(T,P,a){"use strict";var v=a(47),g=a(14),p=a(68),x=a(390),y=URLSearchParams,b=y.prototype,A=g(b.append),I=g(b.delete),R=g(b.forEach),O=g([].push),M=new y("a=1&a=2&b=3");M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&v(b,"delete",function(L){var D=arguments.length,N=D<2?void 0:arguments[1];if(D&&N===void 0)return I(this,L);var F=[];R(this,function(k,Y){O(F,{key:Y,value:k})}),x(D,1);for(var G=p(L),j=p(N),X=0,U=F.length,V;X<U;)V=F[X],I(this,V.key),X++;for(X=0;X<U;)V=F[X++],V.key===G&&V.value===j||A(this,V.key,V.value)},{enumerable:!0,unsafe:!0})}),(function(T,P,a){"use strict";var v=a(47),g=a(14),p=a(68),x=a(390),y=URLSearchParams,b=y.prototype,A=g(b.getAll),I=g(b.has),R=new y("a=1");(R.has("a",2)||!R.has("a",void 0))&&v(b,"has",function(M){var L=arguments.length,D=L<2?void 0:arguments[1];if(L&&D===void 0)return I(this,M);var N=A(this,M);x(L,1);for(var F=p(D),G=0;G<N.length;)if(N[G++]===F)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(T,P,a){"use strict";var v=a(6),g=a(14),p=a(77),x=URLSearchParams.prototype,y=g(x.forEach);v&&!("size"in x)&&p(x,"size",{get:function(){var A=0;return y(this,function(){A++}),A},configurable:!0,enumerable:!0})}),(function(T,P,a){"use strict";a.r(P),a.d(P,{bb:function(){return nm},default:function(){return nm}});var v={};a.r(v),a.d(v,{selection:function(){return Fg},subchart:function(){return zg},zoom:function(){return jg}});var g={};a.r(g),a.d(g,{area:function(){return fp},areaLineRange:function(){return dp},areaSpline:function(){return vp},areaSplineRange:function(){return gp},areaStep:function(){return pp},areaStepRange:function(){return hp},bar:function(){return mp},bubble:function(){return xp},candlestick:function(){return Ap},donut:function(){return Lp},funnel:function(){return Bp},gauge:function(){return zp},line:function(){return Up},pie:function(){return Xp},polar:function(){return Vp},radar:function(){return Hp},scatter:function(){return Yp},spline:function(){return kp},step:function(){return Gp},treemap:function(){return em}});function p(){}function x(t){return t==null?p:function(){return this.querySelector(t)}}function y(t){typeof t!="function"&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=new Array(o),c,u,f=0;f<o;++f)(c=s[f])&&(u=t.call(c,c.__data__,f,s))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new fn(r,this._parents)}function b(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function A(){return[]}function I(t){return t==null?A:function(){return this.querySelectorAll(t)}}function R(t){return function(){return b(t.apply(this,arguments))}}function O(t){typeof t=="function"?t=R(t):t=I(t);for(var e=this._groups,n=e.length,r=[],i=[],s=0;s<n;++s)for(var o=e[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&(r.push(t.call(c,c.__data__,u,o)),i.push(c));return new fn(r,i)}function M(t){return function(){return this.matches(t)}}function L(t){return function(e){return e.matches(t)}}var D=Array.prototype.find;function N(t){return function(){return D.call(this.children,t)}}function F(){return this.firstElementChild}function G(t){return this.select(t==null?F:N(typeof t=="function"?t:L(t)))}var j=Array.prototype.filter;function X(){return Array.from(this.children)}function U(t){return function(){return j.call(this.children,t)}}function V(t){return this.selectAll(t==null?X:U(typeof t=="function"?t:L(t)))}function k(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new fn(r,this._parents)}function Y(t){return new Array(t.length)}function K(){return new fn(this._enter||this._groups.map(Y),this._parents)}function J(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}J.prototype={constructor:J,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Z(t){return function(){return t}}function _(t,e,n,r,i,s){for(var o=0,l,c=e.length,u=s.length;o<u;++o)(l=e[o])?(l.__data__=s[o],r[o]=l):n[o]=new J(t,s[o]);for(;o<c;++o)(l=e[o])&&(i[o]=l)}function at(t,e,n,r,i,s,o){var l,c,u=new Map,f=e.length,d=s.length,h=new Array(f),m;for(l=0;l<f;++l)(c=e[l])&&(h[l]=m=o.call(c,c.__data__,l,e)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<d;++l)m=o.call(t,s[l],l,s)+"",(c=u.get(m))?(r[l]=c,c.__data__=s[l],u.delete(m)):n[l]=new J(t,s[l]);for(l=0;l<f;++l)(c=e[l])&&u.get(h[l])===c&&(i[l]=c)}function et(t){return t.__data__}function rt(t,e){if(!arguments.length)return Array.from(this,et);var n=e?at:_,r=this._parents,i=this._groups;typeof t!="function"&&(t=Z(t));for(var s=i.length,o=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var f=r[u],d=i[u],h=d.length,m=nt(t.call(f,f&&f.__data__,u,r)),S=m.length,E=l[u]=new Array(S),C=o[u]=new Array(S),w=c[u]=new Array(h);n(f,d,E,C,w,m,e);for(var $=0,z=0,B,W;$<S;++$)if(B=E[$]){for($>=z&&(z=$+1);!(W=C[z])&&++z<S;);B._next=W||null}}return o=new fn(o,r),o._enter=l,o._exit=c,o}function nt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ut(){return new fn(this._exit||this._groups.map(Y),this._parents)}function ht(t,e,n){var r=this.enter(),i=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function pt(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,s=r.length,o=Math.min(i,s),l=new Array(i),c=0;c<o;++c)for(var u=n[c],f=r[c],d=u.length,h=l[c]=new Array(d),m,S=0;S<d;++S)(m=u[S]||f[S])&&(h[S]=m);for(;c<i;++c)l[c]=n[c];return new fn(l,this._parents)}function yt(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function At(t){t||(t=Et);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],l=o.length,c=i[s]=new Array(l),u,f=0;f<l;++f)(u=o[f])&&(c[f]=u);c.sort(e)}return new fn(i,this._parents).order()}function Et(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ht(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ut(){return Array.from(this)}function kt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function Ct(){let t=0;for(const e of this)++t;return t}function It(){return!this.node()}function Dt(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],s=0,o=i.length,l;s<o;++s)(l=i[s])&&t.call(l,l.__data__,s,i);return this}var Vt="http://www.w3.org/1999/xhtml",_t={svg:"http://www.w3.org/2000/svg",xhtml:Vt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Nt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),_t.hasOwnProperty(e)?{space:_t[e],local:t}:t}function Jt(t){return function(){this.removeAttribute(t)}}function ne(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ve(t,e){return function(){this.setAttribute(t,e)}}function le(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ce(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Be(t,e){var n=Nt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ne:Jt:typeof e=="function"?n.local?Ce:fe:n.local?le:ve)(n,e))}function Ie(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ce(t){return function(){this.style.removeProperty(t)}}function xe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ue(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Pt(t,e,n){return arguments.length>1?this.each((e==null?ce:typeof e=="function"?Ue:xe)(t,e,n==null?"":n)):zt(this.node(),t)}function zt(t,e){return t.style.getPropertyValue(e)||Ie(t).getComputedStyle(t,null).getPropertyValue(e)}function jt(t){return function(){delete this[t]}}function we(t,e){return function(){this[t]=e}}function $t(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Xt(t,e){return arguments.length>1?this.each((e==null?jt:typeof e=="function"?$t:we)(t,e)):this.node()[t]}function re(t){return t.trim().split(/^|\s+/)}function oe(t){return t.classList||new pe(t)}function pe(t){this._node=t,this._names=re(t.getAttribute("class")||"")}pe.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function rn(t,e){for(var n=oe(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function vt(t,e){for(var n=oe(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Rt(t){return function(){rn(this,t)}}function Tt(t){return function(){vt(this,t)}}function wt(t,e){return function(){(e.apply(this,arguments)?rn:vt)(this,t)}}function Ft(t,e){var n=re(t+"");if(arguments.length<2){for(var r=oe(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?wt:e?Rt:Tt)(n,e))}function Lt(){this.textContent=""}function ue(t){return function(){this.textContent=t}}function ye(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function Me(t){return arguments.length?this.each(t==null?Lt:(typeof t=="function"?ye:ue)(t)):this.node().textContent}function Fe(){this.innerHTML=""}function tn(t){return function(){this.innerHTML=t}}function Ve(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function _n(t){return arguments.length?this.each(t==null?Fe:(typeof t=="function"?Ve:tn)(t)):this.node().innerHTML}function Ci(){this.nextSibling&&this.parentNode.appendChild(this)}function Er(){return this.each(Ci)}function Ga(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xa(){return this.each(Ga)}function Is(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vt&&e.documentElement.namespaceURI===Vt?e.createElement(t):e.createElementNS(n,t)}}function fl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Rs(t){var e=Nt(t);return(e.local?fl:Is)(e)}function Ii(t){var e=typeof t=="function"?t:Rs(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function ws(){return null}function Ri(t,e){var n=typeof t=="function"?t:Rs(t),r=e==null?ws:typeof e=="function"?e:x(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Os(){var t=this.parentNode;t&&t.removeChild(this)}function Ps(){return this.each(Os)}function wi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ms(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ls(t){return this.select(t?Ms:wi)}function Xa(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Wa(t){return function(e){t.call(this,e,this.__data__)}}function Oi(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Pi(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function Mi(t,e,n){return function(){var r=this.__on,i,s=Wa(e);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(i):this.__on=[i]}}function Li(t,e,n){var r=Oi(t+""),i,s=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<s;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(l=e?Mi:Pi,i=0;i<s;++i)this.each(l(r[i],e,n));return this}function Di(t,e,n){var r=Ie(t),i=r.CustomEvent;typeof i=="function"?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 Fi(t,e){return function(){return Di(this,t,e)}}function ra(t,e){return function(){return Di(this,t,e.apply(this,arguments))}}function sr(t,e){return this.each((typeof e=="function"?ra:Fi)(t,e))}function*Ds(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var hr=[null];function fn(t,e){this._groups=t,this._parents=e}function Va(){return new fn([[document.documentElement]],hr)}function aa(){return this}fn.prototype=Va.prototype={constructor:fn,select:y,selectAll:O,selectChild:G,selectChildren:V,filter:k,data:rt,enter:K,exit:ut,join:ht,merge:pt,selection:aa,order:yt,sort:At,call:Ht,nodes:Ut,node:kt,size:Ct,empty:It,each:Dt,attr:Be,style:Pt,property:Xt,classed:Ft,text:Me,html:_n,raise:Er,lower:xa,append:Ii,insert:Ri,remove:Ps,clone:Ls,datum:Xa,on:Li,dispatch:sr,[Symbol.iterator]:Ds};var bn=Va;function Yt(t){return typeof t=="string"?new fn([[document.querySelector(t)]],[document.documentElement]):new fn([[t]],hr)}const qt={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},Fs={export:"exportApi",flow:"flow",xgrids:"grid",ygrids:"grid",regions:"regions",category:"category",categories:"category"},dt=16,Bt=10,xt=6,mt=3,Gt=xt+mt,Se=1,de={x:{start:"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z",end:"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"},y:{start:"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z",end:"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"}},dn={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},en={Area:[qt.AREA,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.AREA_STEP,qt.AREA_STEP_RANGE],AreaRange:[qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.AREA_STEP_RANGE],Arc:[qt.PIE,qt.DONUT,qt.GAUGE,qt.POLAR,qt.RADAR],Line:[qt.LINE,qt.SPLINE,qt.AREA,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.STEP,qt.AREA_STEP,qt.AREA_STEP_RANGE],Step:[qt.STEP,qt.AREA_STEP,qt.AREA_STEP_RANGE],Spline:[qt.SPLINE,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE]},Sn=Math.sqrt(50),Mn=Math.sqrt(10),Qt=Math.sqrt(2);function hn(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=Sn?10:s>=Mn?5:s>=Qt?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=n&&n<2?hn(t,e,n*2):[l,c,u]}function qn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,s,o]=r?hn(e,t,n):hn(t,e,n);if(!(s>=i))return[];const l=s-i+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(s-u)/-o;else for(let u=0;u<l;++u)c[u]=(s-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function ya(t,e,n){return e=+e,t=+t,n=+n,hn(t,e,n)[2]}function ja(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?ya(e,t,n):ya(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Ta(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ni(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function dl(t){let e,n,r;t.length!==2?(e=Ta,n=(l,c)=>Ta(t(l),c),r=(l,c)=>t(l)-c):(e=t===Ta||t===Ni?t:am,n=t,r=t);function i(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){const d=i(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:o,right:s}}function am(){return 0}function im(t){return t===null?NaN:+t}function*GR(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Fu=dl(Ta),sm=Fu.right,XR=Fu.left,WR=dl(im).center;var om=sm;function hl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Nu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $i(){}var Bi=.7,Ns=1/Bi,Ha="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lm=/^#([0-9a-f]{3,8})$/,cm=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),um=new RegExp(`^rgb\\(${Cr},${Cr},${Cr}\\)$`),fm=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${zi}\\)$`),dm=new RegExp(`^rgba\\(${Cr},${Cr},${Cr},${zi}\\)$`),hm=new RegExp(`^hsl\\(${zi},${Cr},${Cr}\\)$`),vm=new RegExp(`^hsla\\(${zi},${Cr},${Cr},${zi}\\)$`),$u={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};hl($i,ba,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Bu,formatHex:Bu,formatHex8:gm,formatHsl:pm,formatRgb:zu,toString:zu});function Bu(){return this.rgb().formatHex()}function gm(){return this.rgb().formatHex8()}function pm(){return Wu(this).formatHsl()}function zu(){return this.rgb().formatRgb()}function ba(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=lm.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Uu(e):n===3?new Yn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?$s(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?$s(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=cm.exec(t))?new Yn(e[1],e[2],e[3],1):(e=um.exec(t))?new Yn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=fm.exec(t))?$s(e[1],e[2],e[3],e[4]):(e=dm.exec(t))?$s(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hm.exec(t))?Xu(e[1],e[2]/100,e[3]/100,1):(e=vm.exec(t))?Xu(e[1],e[2]/100,e[3]/100,e[4]):$u.hasOwnProperty(t)?Uu($u[t]):t==="transparent"?new Yn(NaN,NaN,NaN,0):null}function Uu(t){return new Yn(t>>16&255,t>>8&255,t&255,1)}function $s(t,e,n,r){return r<=0&&(t=e=n=NaN),new Yn(t,e,n,r)}function mm(t){return t instanceof $i||(t=ba(t)),t?(t=t.rgb(),new Yn(t.r,t.g,t.b,t.opacity)):new Yn}function Bs(t,e,n,r){return arguments.length===1?mm(t):new Yn(t,e,n,r==null?1:r)}function Yn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}hl(Yn,Bs,Nu($i,{brighter(t){return t=t==null?Ns:Math.pow(Ns,t),new Yn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Bi:Math.pow(Bi,t),new Yn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Yn(Sa(this.r),Sa(this.g),Sa(this.b),zs(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:ku,formatHex:ku,formatHex8:xm,formatRgb:Gu,toString:Gu}));function ku(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function xm(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gu(){const t=zs(this.opacity);return`${t===1?"rgb(":"rgba("}${Sa(this.r)}, ${Sa(this.g)}, ${Sa(this.b)}${t===1?")":`, ${t})`}`}function zs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Sa(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Aa(t){return t=Sa(t),(t<16?"0":"")+t.toString(16)}function Xu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vr(t,e,n,r)}function Wu(t){if(t instanceof vr)return new vr(t.h,t.s,t.l,t.opacity);if(t instanceof $i||(t=ba(t)),!t)return new vr;if(t instanceof vr)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,l=s-i,c=(s+i)/2;return l?(e===s?o=(n-r)/l+(n<r)*6:n===s?o=(r-e)/l+2:o=(e-n)/l+4,l/=c<.5?s+i:2-s-i,o*=60):l=c>0&&c<1?0:o,new vr(o,l,c,t.opacity)}function ym(t,e,n,r){return arguments.length===1?Wu(t):new vr(t,e,n,r==null?1:r)}function vr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hl(vr,ym,Nu($i,{brighter(t){return t=t==null?Ns:Math.pow(Ns,t),new vr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Bi:Math.pow(Bi,t),new vr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Yn(vl(t>=240?t-240:t+120,i,r),vl(t,i,r),vl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new vr(Vu(this.h),Us(this.s),Us(this.l),zs(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=zs(this.opacity);return`${t===1?"hsl(":"hsla("}${Vu(this.h)}, ${Us(this.s)*100}%, ${Us(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Vu(t){return t=(t||0)%360,t<0?t+360:t}function Us(t){return Math.max(0,Math.min(1,t||0))}function vl(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function ju(t,e,n,r,i){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*r+o*i)/6}function Tm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],s=t[r+1],o=r>0?t[r-1]:2*i-s,l=r<e-1?t[r+2]:2*s-i;return ju((n-r/e)*e,o,i,s,l)}}function bm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],s=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return ju((n-r/e)*e,i,s,o,l)}}var ks=(t=>()=>t);function Hu(t,e){return function(n){return t+n*e}}function Sm(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function VR(t,e){var n=e-t;return n?Hu(t,n>180||n<-180?n-360*Math.round(n/360):n):ks(isNaN(t)?e:t)}function Am(t){return(t=+t)==1?Yu:function(e,n){return n-e?Sm(e,n,t):ks(isNaN(e)?n:e)}}function Yu(t,e){var n=e-t;return n?Hu(t,n):ks(isNaN(t)?e:t)}var Gs=(function t(e){var n=Am(e);function r(i,s){var o=n((i=Bs(i)).r,(s=Bs(s)).r),l=n(i.g,s.g),c=n(i.b,s.b),u=Yu(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function Ku(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),s=new Array(n),o,l;for(o=0;o<n;++o)l=Bs(e[o]),r[o]=l.r||0,i[o]=l.g||0,s[o]=l.b||0;return r=t(r),i=t(i),s=t(s),l.opacity=1,function(c){return l.r=r(c),l.g=i(c),l.b=s(c),l+""}}}var jR=Ku(Tm),HR=Ku(bm);function Zu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=t[i]*(1-s)+e[i]*s;return r}}function Ju(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function YR(t,e){return(Ju(e)?Zu:Qu)(t,e)}function Qu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=Ya(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(l){for(o=0;o<r;++o)s[o]=i[o](l);return s}}function Em(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function gr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cm(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Ya(t[i],e[i]):r[i]=e[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var gl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(gl.source,"g");function Im(t){return function(){return t}}function Rm(t){return function(e){return t(e)+""}}function _u(t,e){var n=gl.lastIndex=pl.lastIndex=0,r,i,s,o=-1,l=[],c=[];for(t=t+"",e=e+"";(r=gl.exec(t))&&(i=pl.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),l[o]?l[o]+=s:l[++o]=s),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:gr(r,i)})),n=pl.lastIndex;return n<e.length&&(s=e.slice(n),l[o]?l[o]+=s:l[++o]=s),l.length<2?c[0]?Rm(c[0].x):Im(e):(e=c.length,function(u){for(var f=0,d;f<e;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Ya(t,e){var n=typeof e,r;return e==null||n==="boolean"?ks(e):(n==="number"?gr:n==="string"?(r=ba(e))?(e=r,Gs):_u:e instanceof ba?Gs:e instanceof Date?Em:Ju(e)?Zu:Array.isArray(e)?Qu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Cm:gr)(t,e)}function wm(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Om(t){return function(){return t}}function Pm(t){return+t}var qu=[0,1];function Ka(t){return t}function ml(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Om(isNaN(e)?NaN:.5)}function Mm(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Lm(t,e,n){var r=t[0],i=t[1],s=e[0],o=e[1];return i<r?(r=ml(i,r),s=n(o,s)):(r=ml(r,i),s=n(s,o)),function(l){return s(r(l))}}function Dm(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),s=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=ml(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(l){var c=om(t,l,1,r)-1;return s[c](i[c](l))}}function Xs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function xl(){var t=qu,e=qu,n=Ya,r,i,s,o=Ka,l,c,u;function f(){var h=Math.min(t.length,e.length);return o!==Ka&&(o=Mm(t[0],t[h-1])),l=h>2?Dm:Lm,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?s:(c||(c=l(t.map(r),e,n)))(r(o(h)))}return d.invert=function(h){return o(i((u||(u=l(e,t.map(r),gr)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,Pm),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=wm,f()},d.clamp=function(h){return arguments.length?(o=h?!0:Ka,f()):o!==Ka},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,m){return r=h,i=m,f()}}function tf(){return xl()(Ka,Ka)}function Ui(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function KR(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Fm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ki(t){if(!(e=Fm.exec(t)))throw new Error("invalid format: "+t);var e;return new yl({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]})}ki.prototype=yl.prototype;function yl(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}yl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Nm(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ws(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Za(t){return t=Ws(Math.abs(t)),t?t[1]:NaN}function $m(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(e)/3)))*3-Za(Math.abs(t)))}function Bm(t,e){return function(n,r){for(var i=n.length,s=[],o=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),s.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=t[o=(o+1)%t.length];return s.reverse().join(e)}}function zm(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function Um(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Vs;function km(t,e){var n=Ws(t,e);if(!n)return Vs=void 0,t.toPrecision(e);var r=n[0],i=n[1],s=i-(Vs=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ws(t,Math.max(0,e+s-1))[0]}function ef(t,e){var n=Ws(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")}var nf={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Nm,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)=>ef(t*100,e),r:ef,s:km,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rf(t){return t}var af=Array.prototype.map,sf=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Gm(t){var e=t.grouping===void 0||t.thousands===void 0?rf:Bm(af.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?rf:zm(af.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=ki(d);var m=d.fill,S=d.align,E=d.sign,C=d.symbol,w=d.zero,$=d.width,z=d.comma,B=d.precision,W=d.trim,H=d.type;H==="n"?(z=!0,H="g"):nf[H]||(B===void 0&&(B=12),W=!0,H="g"),(w||m==="0"&&S==="=")&&(w=!0,m="0",S="=");var Q=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),q=(C==="$"?r:/[%p]/.test(H)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),st=nf[H],it=/[defgprs%]/.test(H);B=B===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function ot(ct){var gt=Q,tt=q,ft,lt,bt;if(H==="c")tt=st(ct)+tt,ct="";else{ct=+ct;var St=ct<0||1/ct<0;if(ct=isNaN(ct)?c:st(Math.abs(ct),B),W&&(ct=Um(ct)),St&&+ct==0&&E!=="+"&&(St=!1),gt=(St?E==="("?E:l:E==="-"||E==="("?"":E)+gt,tt=(H==="s"&&!isNaN(ct)&&Vs!==void 0?sf[8+Vs/3]:"")+tt+(St&&E==="("?")":""),it){for(ft=-1,lt=ct.length;++ft<lt;)if(bt=ct.charCodeAt(ft),48>bt||bt>57){tt=(bt===46?i+ct.slice(ft+1):ct.slice(ft))+tt,ct=ct.slice(0,ft);break}}}z&&!w&&(ct=e(ct,1/0));var Mt=gt.length+ct.length+tt.length,Ot=Mt<$?new Array($-Mt+1).join(m):"";switch(z&&w&&(ct=e(Ot+ct,Ot.length?$-tt.length:1/0),Ot=""),S){case"<":ct=gt+ct+tt+Ot;break;case"=":ct=gt+Ot+ct+tt;break;case"^":ct=Ot.slice(0,Mt=Ot.length>>1)+gt+ct+tt+Ot.slice(Mt);break;default:ct=Ot+gt+ct+tt;break}return s(ct)}return ot.toString=function(){return d+""},ot}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(Za(h)/3)))*3,S=Math.pow(10,-m),E=u((d=ki(d),d.type="f",d),{suffix:sf[8+m/3]});return function(C){return E(S*C)}}return{format:u,formatPrefix:f}}var js,Tl,of;Xm({thousands:",",grouping:[3],currency:["$",""]});function Xm(t){return js=Gm(t),Tl=js.format,of=js.formatPrefix,js}function Wm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Za(e)-Za(t))+1}function Vm(t){return Math.max(0,-Za(Math.abs(t)))}function jm(t,e,n,r){var i=ja(t,e,n),s;switch(r=ki(r==null?",f":r),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(s=$m(i,o))&&(r.precision=s),of(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Wm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Vm(i))&&(r.precision=s-(r.type==="%")*2);break}}return Tl(r)}function lf(t){var e=t.domain;return t.ticks=function(n){var r=e();return qn(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return jm(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,s=r.length-1,o=r[i],l=r[s],c,u,f=10;for(l<o&&(u=o,o=l,l=u,u=i,i=s,s=u);f-- >0;){if(u=ya(o,l,n),u===c)return r[i]=o,r[s]=l,e(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function Hs(){var t=tf();return t.copy=function(){return Xs(t,Hs())},Ui.apply(t,arguments),lf(t)}function cf(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function uf(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hm(t){var e=1,n=t(cf(e),uf(e));return n.constant=function(r){return arguments.length?t(cf(e=+r),uf(e)):e},lf(n)}function ff(){var t=Hm(xl());return t.copy=function(){return Xs(t,ff()).constant(t.constant())},Ui.apply(t,arguments)}function df(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],o;return s<i&&(o=n,n=r,r=o,o=i,i=s,s=o),t[n]=e.floor(i),t[r]=e.ceil(s),t}function hf(t){return Math.log(t)}function vf(t){return Math.exp(t)}function Ym(t){return-Math.log(-t)}function Km(t){return-Math.exp(-t)}function Zm(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Jm(t){return t===10?Zm:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Qm(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function gf(t){return(e,n)=>-t(-e,n)}function _m(t){const e=t(hf,vf),n=e.domain;let r=10,i,s;function o(){return i=Qm(r),s=Jm(r),n()[0]<0?(i=gf(i),s=gf(s),t(Ym,Km)):t(hf,vf),e}return e.base=function(l){return arguments.length?(r=+l,o()):r},e.domain=function(l){return arguments.length?(n(l),o()):n()},e.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),m=i(f),S,E;const C=l==null?10:+l;let w=[];if(!(r%1)&&m-h<C){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(S=1;S<r;++S)if(E=h<0?S/s(-h):S*s(h),!(E<u)){if(E>f)break;w.push(E)}}else for(;h<=m;++h)for(S=r-1;S>=1;--S)if(E=h>0?S/s(-h):S*s(h),!(E<u)){if(E>f)break;w.push(E)}w.length*2<C&&(w=qn(u,f,C))}else w=qn(h,m,Math.min(m-h,C)).map(s);return d?w.reverse():w},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=ki(c)).precision==null&&(c.trim=!0),c=Tl(c)),l===1/0)return c;const u=Math.max(1,r*l/e.ticks().length);return f=>{let d=f/s(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},e.nice=()=>n(df(n(),{floor:l=>s(Math.floor(i(l))),ceil:l=>s(Math.ceil(i(l)))})),e}function pf(){const t=_m(xl()).domain([1,10]);return t.copy=()=>Xs(t,pf()).base(t.base()),Ui.apply(t,arguments),t}const Br=1e3,or=Br*60,zr=or*60,Ur=zr*24,bl=Ur*7,mf=Ur*30,Sl=Ur*365,Al=new Date,El=new Date;function In(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const o=i(s),l=i.ceil(s);return s-o<l-s?o:l},i.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,l)=>{const c=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s<o)||!(l>0))return c;let u;do c.push(u=new Date(+s)),e(s,l),t(s);while(u<s&&s<o);return c},i.filter=s=>In(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;e(o,-1),!s(o););else for(;--l>=0;)for(;e(o,1),!s(o););}),n&&(i.count=(s,o)=>(Al.setTime(+s),El.setTime(+o),t(Al),t(El),Math.floor(n(Al,El))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const Ys=In(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ys.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?In(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ys);const ZR=Ys.range,Ea=In(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getUTCSeconds()),JR=Ea.range,Cl=In(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Br)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getMinutes()),QR=Cl.range,Il=In(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getUTCMinutes()),_R=Il.range,Rl=In(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Br-t.getMinutes()*or)},(t,e)=>{t.setTime(+t+e*zr)},(t,e)=>(e-t)/zr,t=>t.getHours()),qR=Rl.range,wl=In(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*zr)},(t,e)=>(e-t)/zr,t=>t.getUTCHours()),tw=wl.range,Gi=In(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*or)/Ur,t=>t.getDate()-1),ew=Gi.range,Ks=In(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Ur,t=>t.getUTCDate()-1),nw=Ks.range,xf=In(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Ur,t=>Math.floor(t/Ur)),rw=xf.range;function Ca(t){return In(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*or)/bl)}const Zs=Ca(0),Js=Ca(1),qm=Ca(2),tx=Ca(3),Ja=Ca(4),ex=Ca(5),nx=Ca(6),aw=Zs.range,iw=Js.range,sw=qm.range,ow=tx.range,lw=Ja.range,cw=ex.range,uw=nx.range;function Ia(t){return In(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/bl)}const Qs=Ia(0),_s=Ia(1),rx=Ia(2),ax=Ia(3),Qa=Ia(4),ix=Ia(5),sx=Ia(6),fw=Qs.range,dw=_s.range,hw=rx.range,vw=ax.range,gw=Qa.range,pw=ix.range,mw=sx.range,Ol=In(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),xw=Ol.range,Pl=In(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),yw=Pl.range,kr=In(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());kr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:In(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)});const Tw=kr.range,Gr=In(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());Gr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:In(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)});const bw=Gr.range;function yf(t,e,n,r,i,s){const o=[[Ea,1,Br],[Ea,5,5*Br],[Ea,15,15*Br],[Ea,30,30*Br],[s,1,or],[s,5,5*or],[s,15,15*or],[s,30,30*or],[i,1,zr],[i,3,3*zr],[i,6,6*zr],[i,12,12*zr],[r,1,Ur],[r,2,2*Ur],[n,1,bl],[e,1,mf],[e,3,3*mf],[t,1,Sl]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),S=m?m.range(u,+f+1):[];return h?S.reverse():S}function c(u,f,d){const h=Math.abs(f-u)/d,m=dl(([,,C])=>C).right(o,h);if(m===o.length)return t.every(ja(u/Sl,f/Sl,d));if(m===0)return Ys.every(Math.max(ja(u,f,d),1));const[S,E]=o[h/o[m-1][2]<o[m][2]/h?m-1:m];return S.every(E)}return[l,c]}const[ox,lx]=yf(Gr,Pl,Qs,xf,wl,Il),[cx,ux]=yf(kr,Ol,Zs,Gi,Rl,Cl);function Ml(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 Ll(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Xi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function fx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,o=t.shortDays,l=t.months,c=t.shortMonths,u=Wi(i),f=Vi(i),d=Wi(s),h=Vi(s),m=Wi(o),S=Vi(o),E=Wi(l),C=Vi(l),w=Wi(c),$=Vi(c),z={a:bt,A:St,b:Mt,B:Ot,c:null,d:Cf,e:Cf,f:Fx,g:Vx,G:Hx,H:Mx,I:Lx,j:Dx,L:If,m:Nx,M:$x,p:Kt,q:ee,Q:Lf,s:Df,S:Bx,u:zx,U:Ux,V:kx,w:Gx,W:Xx,x:null,X:null,y:Wx,Y:jx,Z:Yx,"%":Mf},B={a:Ae,A:Ee,b:Te,B:De,c:null,d:wf,e:wf,f:Qx,g:oy,G:cy,H:Kx,I:Zx,j:Jx,L:Of,m:_x,M:qx,p:me,q:Pe,Q:Lf,s:Df,S:ty,u:ey,U:ny,V:ry,w:ay,W:iy,x:null,X:null,y:sy,Y:ly,Z:uy,"%":Mf},W={a:it,A:ot,b:ct,B:gt,c:tt,d:Af,e:Af,f:Rx,g:Sf,G:bf,H:Ef,I:Ef,j:Ax,L:Ix,m:Sx,M:Ex,p:st,q:bx,Q:Ox,s:Px,S:Cx,u:px,U:mx,V:xx,w:gx,W:yx,x:ft,X:lt,y:Sf,Y:bf,Z:Tx,"%":wx};z.x=H(n,z),z.X=H(r,z),z.c=H(e,z),B.x=H(n,B),B.X=H(r,B),B.c=H(e,B);function H(Zt,he){return function(ge){var Wt=[],We=-1,Xe=0,pn=Zt.length,Cn,be,un;for(ge instanceof Date||(ge=new Date(+ge));++We<pn;)Zt.charCodeAt(We)===37&&(Wt.push(Zt.slice(Xe,We)),(be=Tf[Cn=Zt.charAt(++We)])!=null?Cn=Zt.charAt(++We):be=Cn==="e"?" ":"0",(un=he[Cn])&&(Cn=un(ge,be)),Wt.push(Cn),Xe=We+1);return Wt.push(Zt.slice(Xe,We)),Wt.join("")}}function Q(Zt,he){return function(ge){var Wt=Xi(1900,void 0,1),We=q(Wt,Zt,ge+="",0),Xe,pn;if(We!=ge.length)return null;if("Q"in Wt)return new Date(Wt.Q);if("s"in Wt)return new Date(Wt.s*1e3+("L"in Wt?Wt.L:0));if(he&&!("Z"in Wt)&&(Wt.Z=0),"p"in Wt&&(Wt.H=Wt.H%12+Wt.p*12),Wt.m===void 0&&(Wt.m="q"in Wt?Wt.q:0),"V"in Wt){if(Wt.V<1||Wt.V>53)return null;"w"in Wt||(Wt.w=1),"Z"in Wt?(Xe=Ll(Xi(Wt.y,0,1)),pn=Xe.getUTCDay(),Xe=pn>4||pn===0?_s.ceil(Xe):_s(Xe),Xe=Ks.offset(Xe,(Wt.V-1)*7),Wt.y=Xe.getUTCFullYear(),Wt.m=Xe.getUTCMonth(),Wt.d=Xe.getUTCDate()+(Wt.w+6)%7):(Xe=Ml(Xi(Wt.y,0,1)),pn=Xe.getDay(),Xe=pn>4||pn===0?Js.ceil(Xe):Js(Xe),Xe=Gi.offset(Xe,(Wt.V-1)*7),Wt.y=Xe.getFullYear(),Wt.m=Xe.getMonth(),Wt.d=Xe.getDate()+(Wt.w+6)%7)}else("W"in Wt||"U"in Wt)&&("w"in Wt||(Wt.w="u"in Wt?Wt.u%7:"W"in Wt?1:0),pn="Z"in Wt?Ll(Xi(Wt.y,0,1)).getUTCDay():Ml(Xi(Wt.y,0,1)).getDay(),Wt.m=0,Wt.d="W"in Wt?(Wt.w+6)%7+Wt.W*7-(pn+5)%7:Wt.w+Wt.U*7-(pn+6)%7);return"Z"in Wt?(Wt.H+=Wt.Z/100|0,Wt.M+=Wt.Z%100,Ll(Wt)):Ml(Wt)}}function q(Zt,he,ge,Wt){for(var We=0,Xe=he.length,pn=ge.length,Cn,be;We<Xe;){if(Wt>=pn)return-1;if(Cn=he.charCodeAt(We++),Cn===37){if(Cn=he.charAt(We++),be=W[Cn in Tf?he.charAt(We++):Cn],!be||(Wt=be(Zt,ge,Wt))<0)return-1}else if(Cn!=ge.charCodeAt(Wt++))return-1}return Wt}function st(Zt,he,ge){var Wt=u.exec(he.slice(ge));return Wt?(Zt.p=f.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function it(Zt,he,ge){var Wt=m.exec(he.slice(ge));return Wt?(Zt.w=S.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function ot(Zt,he,ge){var Wt=d.exec(he.slice(ge));return Wt?(Zt.w=h.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function ct(Zt,he,ge){var Wt=w.exec(he.slice(ge));return Wt?(Zt.m=$.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function gt(Zt,he,ge){var Wt=E.exec(he.slice(ge));return Wt?(Zt.m=C.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function tt(Zt,he,ge){return q(Zt,e,he,ge)}function ft(Zt,he,ge){return q(Zt,n,he,ge)}function lt(Zt,he,ge){return q(Zt,r,he,ge)}function bt(Zt){return o[Zt.getDay()]}function St(Zt){return s[Zt.getDay()]}function Mt(Zt){return c[Zt.getMonth()]}function Ot(Zt){return l[Zt.getMonth()]}function Kt(Zt){return i[+(Zt.getHours()>=12)]}function ee(Zt){return 1+~~(Zt.getMonth()/3)}function Ae(Zt){return o[Zt.getUTCDay()]}function Ee(Zt){return s[Zt.getUTCDay()]}function Te(Zt){return c[Zt.getUTCMonth()]}function De(Zt){return l[Zt.getUTCMonth()]}function me(Zt){return i[+(Zt.getUTCHours()>=12)]}function Pe(Zt){return 1+~~(Zt.getUTCMonth()/3)}return{format:function(Zt){var he=H(Zt+="",z);return he.toString=function(){return Zt},he},parse:function(Zt){var he=Q(Zt+="",!1);return he.toString=function(){return Zt},he},utcFormat:function(Zt){var he=H(Zt+="",B);return he.toString=function(){return Zt},he},utcParse:function(Zt){var he=Q(Zt+="",!0);return he.toString=function(){return Zt},he}}}var Tf={"-":"",_:" ",0:"0"},On=/^\s*\d+/,dx=/^%/,hx=/[\\^$*+?|[\]().{}]/g;function _e(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function vx(t){return t.replace(hx,"\\$&")}function Wi(t){return new RegExp("^(?:"+t.map(vx).join("|")+")","i")}function Vi(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function gx(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function px(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function mx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function xx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function yx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function bf(t,e,n){var r=On.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Sf(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Tx(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 bx(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Sx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Af(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ax(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ef(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ex(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Cx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ix(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Rx(t,e,n){var r=On.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wx(t,e,n){var r=dx.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ox(t,e,n){var r=On.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Px(t,e,n){var r=On.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Cf(t,e){return _e(t.getDate(),e,2)}function Mx(t,e){return _e(t.getHours(),e,2)}function Lx(t,e){return _e(t.getHours()%12||12,e,2)}function Dx(t,e){return _e(1+Gi.count(kr(t),t),e,3)}function If(t,e){return _e(t.getMilliseconds(),e,3)}function Fx(t,e){return If(t,e)+"000"}function Nx(t,e){return _e(t.getMonth()+1,e,2)}function $x(t,e){return _e(t.getMinutes(),e,2)}function Bx(t,e){return _e(t.getSeconds(),e,2)}function zx(t){var e=t.getDay();return e===0?7:e}function Ux(t,e){return _e(Zs.count(kr(t)-1,t),e,2)}function Rf(t){var e=t.getDay();return e>=4||e===0?Ja(t):Ja.ceil(t)}function kx(t,e){return t=Rf(t),_e(Ja.count(kr(t),t)+(kr(t).getDay()===4),e,2)}function Gx(t){return t.getDay()}function Xx(t,e){return _e(Js.count(kr(t)-1,t),e,2)}function Wx(t,e){return _e(t.getFullYear()%100,e,2)}function Vx(t,e){return t=Rf(t),_e(t.getFullYear()%100,e,2)}function jx(t,e){return _e(t.getFullYear()%1e4,e,4)}function Hx(t,e){var n=t.getDay();return t=n>=4||n===0?Ja(t):Ja.ceil(t),_e(t.getFullYear()%1e4,e,4)}function Yx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+_e(e/60|0,"0",2)+_e(e%60,"0",2)}function wf(t,e){return _e(t.getUTCDate(),e,2)}function Kx(t,e){return _e(t.getUTCHours(),e,2)}function Zx(t,e){return _e(t.getUTCHours()%12||12,e,2)}function Jx(t,e){return _e(1+Ks.count(Gr(t),t),e,3)}function Of(t,e){return _e(t.getUTCMilliseconds(),e,3)}function Qx(t,e){return Of(t,e)+"000"}function _x(t,e){return _e(t.getUTCMonth()+1,e,2)}function qx(t,e){return _e(t.getUTCMinutes(),e,2)}function ty(t,e){return _e(t.getUTCSeconds(),e,2)}function ey(t){var e=t.getUTCDay();return e===0?7:e}function ny(t,e){return _e(Qs.count(Gr(t)-1,t),e,2)}function Pf(t){var e=t.getUTCDay();return e>=4||e===0?Qa(t):Qa.ceil(t)}function ry(t,e){return t=Pf(t),_e(Qa.count(Gr(t),t)+(Gr(t).getUTCDay()===4),e,2)}function ay(t){return t.getUTCDay()}function iy(t,e){return _e(_s.count(Gr(t)-1,t),e,2)}function sy(t,e){return _e(t.getUTCFullYear()%100,e,2)}function oy(t,e){return t=Pf(t),_e(t.getUTCFullYear()%100,e,2)}function ly(t,e){return _e(t.getUTCFullYear()%1e4,e,4)}function cy(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Qa(t):Qa.ceil(t),_e(t.getUTCFullYear()%1e4,e,4)}function uy(){return"+0000"}function Mf(){return"%"}function Lf(t){return+t}function Df(t){return Math.floor(+t/1e3)}var _a,Dl,Ff,Fl,Nf;fy({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function fy(t){return _a=fx(t),Dl=_a.format,Ff=_a.parse,Fl=_a.utcFormat,Nf=_a.utcParse,_a}function dy(t){return new Date(t)}function hy(t){return t instanceof Date?+t:+new Date(+t)}function Nl(t,e,n,r,i,s,o,l,c,u){var f=tf(),d=f.invert,h=f.domain,m=u(".%L"),S=u(":%S"),E=u("%I:%M"),C=u("%I %p"),w=u("%a %d"),$=u("%b %d"),z=u("%B"),B=u("%Y");function W(H){return(c(H)<H?m:l(H)<H?S:o(H)<H?E:s(H)<H?C:r(H)<H?i(H)<H?w:$:n(H)<H?z:B)(H)}return f.invert=function(H){return new Date(d(H))},f.domain=function(H){return arguments.length?h(Array.from(H,hy)):h().map(dy)},f.ticks=function(H){var Q=h();return t(Q[0],Q[Q.length-1],H==null?10:H)},f.tickFormat=function(H,Q){return Q==null?W:u(Q)},f.nice=function(H){var Q=h();return(!H||typeof H.range!="function")&&(H=e(Q[0],Q[Q.length-1],H==null?10:H)),H?h(df(Q,H)):f},f.copy=function(){return Xs(f,Nl(t,e,n,r,i,s,o,l,c,u))},f}function vy(){return Ui.apply(Nl(cx,ux,kr,Ol,Zs,Gi,Rl,Cl,Ea,Dl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function gy(){return Ui.apply(Nl(ox,lx,Gr,Pl,Qs,Ks,wl,Il,Ea,Fl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Ge=t=>t||t===0,ie=t=>typeof t=="function",je=t=>typeof t=="string",ae=t=>typeof t=="number",mn=t=>typeof t=="undefined",sn=t=>typeof t!="undefined",Ra=t=>typeof t=="boolean",py=t=>Math.ceil(t/10)*10,qa=t=>Math.ceil(t)+.5,wa=t=>t[1]-t[0],Kn=t=>typeof t=="object",my=t=>{for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},lr=t=>mn(t)||t===null||je(t)&&t.length===0||Kn(t)&&!(t instanceof Date)&&my(t)||ae(t)&&isNaN(t),vn=t=>!lr(t),qe=t=>Array.isArray(t),He=t=>t&&!(t!=null&&t.nodeType)&&Kn(t)&&!qe(t);function xy(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function yy(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",r=s=>setTimeout(s,1),i=s=>clearTimeout(s);return[e?t.requestAnimationFrame:r,e?t.cancelAnimationFrame:i,n?t.requestIdleCallback:r,n?t.cancelIdleCallback:i]}const se=xy(),Ye=se==null?void 0:se.document,[$f,Ty,Bf,by]=yy(se),Sy=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Ay=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),qs=new Map;Sy.forEach(t=>qs.set(t.toLowerCase(),t));const to=new Map;Ay.forEach(t=>to.set(t.toLowerCase(),t));const Ey=new Set(["http:","https:","mailto:"]),Cy=new Set(["href","src","xlink:href"]),Iy=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Ry=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,wy=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,zf=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,Uf=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,Oy=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function $l(t){return t.replace(/:/gi,":").replace(/&newline;/gi,`
|
|
31
|
-
`).replace(/&tab;/gi," ").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&#(\d+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,16)))}function kf(t){const n=$l(t).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?Ey.has(r[0]):!0}function Py(t){const n=$l(t).replace(/[\u0000-\u001f]/g,"");Uf.lastIndex=0;let r;for(;(r=Uf.exec(n))!==null;)if(!kf(r[1]))return null;const i=n.toLowerCase().replace(/\s/g,"");for(const s of Oy)if(i.includes(s))return null;return t}const My={'"':""","'":"'","`":"`"},Ly=/["'`]/g;function Bl(t){return t.replace(Ly,e=>My[e])}function Dy(t,e,n=!1){if(Cy.has(t))return kf(e)?n?Bl(e):e:null;if(t==="style"){const i=Py(e);return i===null?null:n?Bl(i):i}const r=$l(e).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?Bl(e):e}function Fy(t){const e=t.match(Iy);return e?e[1].toLowerCase():null}function Ny(t){const e=Fy(t);return e!==null&&qs.has(e)}function $y(t){var e,n,r;const i=t.match(Ry);if(i){const E=i[1].toLowerCase();return`</${(e=qs.get(E))!=null?e:E}>`}const s=t.match(wy);if(!s)return"";const[,o,l,c]=s,u=o.toLowerCase(),f=(n=qs.get(u))!=null?n:u,d=[];zf.lastIndex=0;let h;for(;(h=zf.exec(l))!==null;){const E=h[1].toLowerCase(),C=h[2],w=h[3],$=h[4];if(E.startsWith("on"))continue;const z=(r=to.get(E))!=null?r:E;let B,W;if(C!==void 0)B=C,W='"';else if(w!==void 0)B=w,W="'";else if($!==void 0)B=$,W='"';else{to.has(E)&&d.push(z);continue}if(to.has(E)){const Q=Dy(E,B,$!==void 0);Q!==null&&d.push(`${z}=${W}${Q}${W}`)}}const m=d.length>0?` ${d.join(" ")}`:"";return`<${f}${m}${c?"/>":">"}`}function pr(t){return typeof t!="string"||!t||t.indexOf("<")===-1?t:t.replace(/<\/?[^>]*>|<[^>]*$|[^<>\s]+>/g,e=>e.startsWith("<")&&!e.endsWith(">")?e.replace(/</g,"<"):e.startsWith("<!--")?"":e.startsWith("<")?Ny(e)?$y(e):e.replace(/</g,"<"):e.slice(0,-1)+">")}var By=Object.defineProperty,Gf=Object.getOwnPropertySymbols,zy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Xf=(t,e,n)=>e in t?By(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wf=(t,e)=>{for(var n in e||(e={}))zy.call(e,n)&&Xf(t,n,e[n]);if(Gf)for(var n of Gf(e))Uy.call(e,n)&&Xf(t,n,e[n]);return t};function Vf(t,e){for(let n=0;n<t.length;n++){const r=t[n];r!==null&&sn(r)&&e(r,n)}}function ia(t,e,n){return sn(t[e])?t[e]:n}function ky(t,e){for(const n in t)if(t[n]===e)return!0;return!1}function Ne(t,e,...n){const r=ie(t);return r&&t.call(e,...n),r}function eo(t,e){let n=0;const r=function(...i){!--n&&e.apply(this,i)};"duration"in t?t.each(()=>++n).on("end",r):(++n,t.call(r))}const Ln=t=>t.charAt(0).toUpperCase()+t.slice(1);function Gy(t,e="-"){return t.split(e).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Oa=t=>[].slice.call(t);function Xy(...t){const e=n=>{if(qe(n))return n.map(e);if(He(n)&&n.constructor){const r=new n.constructor;for(const i in n)r[i]=e(n[i]);return r}return n};return t.map(n=>e(n)).reduce((n,r)=>Wf(Wf({},n),r))}function xn(t={},e){qe(e)&&e.forEach(n=>xn(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}function zl(t){const e=t[0]instanceof Date,n=Array.from(new Set(e?t.map(Number):t));return e?n.map(r=>new Date(r)):n}function Wy(t){return t&&t.length?t.reduce((e,n)=>e.concat(n)):[]}function Xr(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return He(t)&&He(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const i=n[r];i instanceof Date?t[r]=new Date(i.getTime()):He(i)?(!t[r]&&(t[r]={}),t[r]=Xr(t[r],i)):t[r]=qe(i)?i.concat():i}}),Xr(t,...e)}function ti(t,e=!0){let n;return t[0]instanceof Date?n=e?(r,i)=>r-i:(r,i)=>i-r:e&&!t.every(isNaN)?n=(r,i)=>r-i:e||(n=(r,i)=>r>i&&-1||r<i&&1||r===i&&0),t.concat().sort(n)}function mr(t,e){let n=e.filter(r=>vn(r));if(n.length)if(ae(n[0])){let r=t==="min"?1/0:-1/0;for(const i of n)(t==="min"?i<r:i>r)&&(r=i);n=r}else n[0]instanceof Date&&(n=ti(n,t==="min")[0]);else n=void 0;return n}const no=(t,e,n=1)=>{const r=[],i=Math.max(0,Math.ceil((e-t)/n))|0;for(let s=0;s<i;s++)r.push(t+s*n);return r};let Vy=0;function Ir(t=!0){const e=++Vy;return t?String(e):e}function Ul(t,e,n,r,i){if(n>r)return-1;const s=Math.floor((n+r)/2);let{x:o,w:l=0}=t[s];return i&&(o=t[s].y,l=t[s].h),e>=o&&e<=o+l?s:e<o?Ul(t,e,n,s-1,i):Ul(t,e,s+1,r,i)}function Pa(t,e){return pr(t.replace(/\{=([^}]+)\}/g,(n,r)=>{var i;return(i=e[r])!=null?i:""}))}function Wn(t){var e;let n;if(t instanceof Date)n=t;else if(je(t)){const{config:r,format:i}=this;n=(e=i.dataTime(r.data_xFormat)(t))!=null?e:new Date(t)}else ae(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function jf(t){if(He(t)&&!je(t)){const o=t;return{top:o.top||0,right:o.right||0,bottom:o.bottom||0,left:o.left||0}}const e=(je(t)?t.trim().split(/\s+/):[t]).map(o=>+o||0),[n,r=n,i=n,s=r]=e;return{top:n,right:r,bottom:i,left:s}}function Hf(t,e){e()===!1?$f(()=>Hf(t,e)):t()}function Yf(t,e=(n=>n)){const n=new Set;return Vf(t,(r,i)=>{n.add(e(r,i))}),n}function Kf(t,e,n=(r=>r)){const r=new Map;return Vf(t,(i,s)=>{r.set(e(i,s),n(i,s))}),r}function sa(t="linear",e,n){const r={linear:Hs,log:ff,_log:pf,time:vy,utc:gy}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var jy={getXScale(t,e,n,r){const i=this,s=i.state.loading!=="append"&&i.scale.zoom||sa(i.axis.getAxisType("x"),t,e);return i.getCustomizedXScale(n?s.domain(n):s,r)},getYScale(t,e,n,r,i){const o=this.axis.getAxisType(t);if(i&&i.type===o)return i.range([e,n]),r&&i.domain(r),i;const l=sa(o,e,n);return r&&l.domain(r),l},getYScaleById(t,e=!1){var n;const r=((n=this.axis)==null?void 0:n.getId(t))==="y2",i=e?r?"subY2":"subY":r?"y2":"y";return this.scale[i]},getCustomizedXScale(t,e){const n=this,r=()=>(e?e():n.axis.x.tickOffset())||(n.axis.isCategorized()?(t(1)-t(0))/2:0),i=n.config.axis_x_inverted,s=function(o){return t(o)+r()};for(const o in t)s[o]=t[o];return s.orgDomain=()=>t.domain(),s.orgScale=()=>t,n.axis.isCategorized()&&(s.domain=function(o){let l=o;return arguments.length?(t.domain(l),s):(l=this.orgDomain(),i?[l[0]+1,l[1]]:[l[0],l[1]+1])}),s},updateScales(t,e=!0){var n,r,i,s,o,l,c,u,f;const d=this,{axis:h,config:m,format:S,org:E,scale:C,state:{current:w,width:$,height:z,width2:B,height2:W,hasAxis:H,hasTreemap:Q}}=d;if(H){const q=m.axis_rotated,st=d.getResettedPadding(1),it={x:q?st:0,y:q?0:z,subX:q?1:0,subY:q?0:W},ot={x:q?z:$,y:q?$:st,subX:q?z:$,subY:q?B:1},ct=e?(n=C.x)==null?void 0:n.orgDomain():C.zoom||(i=(r=C.x)==null?void 0:r.domain)==null?void 0:i.call(r),gt=e?E.xDomain:C.zoom||(o=(s=C.subX)==null?void 0:s.domain)==null?void 0:o.call(s);C.x=d.getXScale(it.x,ot.x,ct,()=>h.x.tickOffset()),C.subX=d.getXScale(it.x,ot.x,gt,tt=>{var ft;return tt%1?0:((ft=h.subX)!=null?ft:h.x).tickOffset()}),S.xAxisTick=h.getXAxisTickFormat(),S.subXAxisTick=h.getXAxisTickFormat(!0),h.setAxis("x",C.x,m.axis_x_tick_outer,t),m.subchart_show&&h.setAxis("subX",C.subX,(l=m.subchart_axis_x_tick_outer)!=null?l:m.axis_x_tick_outer,t),C.y=d.getYScale("y",it.y,ot.y,C.y?C.y.domain():m.axis_y_default,C.y),C.subY=d.getYScale("y",it.subY,ot.subY,C.subY?C.subY.domain():m.axis_y_default,C.subY),h.setAxis("y",C.y,m.axis_y_tick_outer,t),m.subchart_show&&m.subchart_axis_y_show&&h.setAxis("subY",C.subY,(c=m.subchart_axis_y_tick_outer)!=null?c:m.axis_y_tick_outer,t),(m.axis_y2_show||m.subchart_axis_y2_show)&&(C.y2=d.getYScale("y2",it.y,ot.y,C.y2?C.y2.domain():m.axis_y2_default,C.y2),C.subY2=d.getYScale("y2",it.subY,ot.subY,C.subY2?C.subY2.domain():m.axis_y2_default,C.subY2),h.setAxis("y2",C.y2,m.axis_y2_tick_outer,t),m.subchart_show&&m.subchart_axis_y2_show&&h.setAxis("subY2",C.subY2,(u=m.subchart_axis_y2_tick_outer)!=null?u:m.axis_y2_tick_outer,t))}else if(Q){const q=d.getCurrentPadding();C.x=Hs().rangeRound([q.left,w.width-q.right]),C.y=Hs().rangeRound([q.top,w.height-q.bottom])}else(f=d.updateArc)==null||f.call(d)},xx(t){const e=this,{config:n,scale:{x:r,zoom:i}}=e,s=n.zoom_enabled&&i?i:r;return t?s(Ge(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:r,scale:{x:i,zoom:s}}=e,o=r.zoom_enabled&&s?s:i;let l=e.getBaseValue(t);return n.isTimeSeries()?l=Wn.call(e,l):n.isCategorized()&&je(l)&&(l=r.axis_x_categories.indexOf(l)),o(l)},yv(t){const e=this,{scale:{y:n,y2:r}}=e;return(t.axis&&t.axis==="y2"?r:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}};const Zf=1e5;function xr(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function tr(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function ei(t,e,n=[]){var r;const i=typeof e=="string"?e:e==null?void 0:e.id;return!((r=t.isGrouped)!=null&&r.call(t,i))||n.some(s=>s(t,e))}function oa(t,e){var n;const r=typeof e=="string"?e:e==null?void 0:e.id;return r&&((n=t.data_types)==null?void 0:n[r])||t.data_type||qt.LINE}function ro(t){const e=+t;return Number.isFinite(e)?e:null}function Jf(t){var e,n;const r=(n=(e=t.scale.zoom||t.scale.x)==null?void 0:e.domain)==null?void 0:n.call(e),i=ro(r==null?void 0:r[0]),s=ro(r==null?void 0:r[1]);return i===null||s===null?null:[Math.min(i,s),Math.max(i,s)]}function ao(t){return ro(t==null?void 0:t.x)}function Hy(t,e,n){let r=0,i=t.length;for(;r<i;){const s=r+i>>1,o=ao(t[s]);if(o===null)return 0;(n?o<e:o>e)?r=s+1:i=s}return r}function Yy(t,e,n){let r=0,i=t.length;for(;r<i;){const s=r+i>>1,o=ao(t[s]);if(o===null)return t.length;(n?o<=e:o>=e)?r=s+1:i=s}return r}function Wr(t,e,n=1){const r=(e==null?void 0:e.values)||[],i={start:0,end:r.length},s=Jf(t);if(!r.length||!s)return i;const o=t.state,l=o._canvasVisibleRangeCache||(o._canvasVisibleRangeCache=new Map),c=[e.id,r.length,o.dataGeneration,s[0],s[1],n].join(":"),u=l.get(e.id);if((u==null?void 0:u.key)===c)return u.range;const f=ao(r[0]),d=ao(r[r.length-1]);if(f===null||d===null)return i;const h=f<=d,m=Hy(r,s[0],h),S=Yy(r,s[1],h),E={start:Math.max(0,Math.min(m,S)-n),end:Math.min(r.length,Math.max(m,S)+n)};return l.set(e.id,{key:c,range:E}),E}function er(t,e){return oa(t.config,e)===qt.BAR}function ji(t,e){return en.Area.indexOf(oa(t.config,e))>-1}function ni(t,e){const n=oa(t.config,e);return en.Line.indexOf(n)>-1}function la(t,e){return oa(t.config,e)===qt.SCATTER}function ca(t,e){return oa(t.config,e)===qt.BUBBLE}function yr(t,e){return ni(t,e)||la(t,e)||ca(t,e)}function Vn(t,e){return oa(t.config,e)===qt.CANDLESTICK}function kl(t,e){return oa(t.config,e)===qt.TREEMAP}function Sw(t,e){const n=oa(t,e);return n===qt.BAR||en.Area.indexOf(n)>-1}function An(t,e){const n=t.getBaseValue(e);return n!=null}function gn(t,e){return Number.isFinite(t)&&Number.isFinite(e)}function Qf(t,e,n){const r=Math.ceil(n)+1,i=Math.max(1,Math.ceil(t)+r*2+1),s=Math.max(1,Math.ceil(e)+r*2+1);return{data:new Uint8Array(i*s),height:s,offset:r,width:i}}function _f(t,e,n){const r=Math.round(e)+t.offset,i=Math.round(n)+t.offset;if(r<0||r>=t.width||i<0||i>=t.height)return!1;const s=i*t.width+r;return t.data[s]?!1:(t.data[s]=1,!0)}function Nn(t,e,n,r=`axis_${e}`){const i=t[`${r}_tick_${n}`];return i!==void 0?i:t[`axis_${e}_tick_${n}`]}function io(t,e){const n=typeof t=="function"?t.call(e):t;return n!=null&&n.length?n:void 0}function qf(t,e,n){var r,i,s,o,l,c;if((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r,n))return e instanceof Date?e:Wn.call(t,e);if(n==="x"&&((o=(s=t.axis)==null?void 0:s.isCategorized)!=null&&o.call(s))&&typeof e=="string"){const u=t.config.axis_x_categories.indexOf(e);return u>=0?u:e}return(c=(l=t.axis)==null?void 0:l.isLog)!=null&&c.call(l,n)&&e!==null&&e!==void 0?+e:e}function Vr(t,e){return qf(t,e,"x")}function Hi(t,e,n="y"){return qf(t,e,n)}function td(t,e,n="y"){return e.map(r=>Hi(t,r,n))}function Gl(t,e){return e.map(n=>Vr(t,n)).filter(n=>{var r,i;return!(typeof n=="string"&&((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)))})}function Ma(t,e){const n=typeof e=="function"?e():e;return t.ticks?t.ticks(n):t.domain()}function ed(t,e){const[n,r]=t.domain(),i=+n,s=+r;if(e||!Number.isFinite(i)||!Number.isFinite(s)||s<=0)return Ma(t,e);const o=sa("_log").domain([i>0?i:1,s]).range(t.range());let l=o.ticks();for(let c=s.toFixed().length;l.length>15;c--)l=o.ticks(c);return l.length&&(l.splice(0,1,n),l.splice(l.length-1,1,r)),l}function Yi(t,e){const n=+t,r=+e;return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r)<1e-6:t===e}function Ky(t,e){const[n,r]=e,i=t.slice();return n!==void 0&&!i.some(s=>Yi(s,n))&&i.unshift(n),r!==void 0&&!i.some(s=>Yi(s,r))&&i.push(r),i}function nd(t,e){const n=Vr(t,e);return ro(n)}function Xl(t){var e,n,r,i,s,o,l,c;const{scale:u}=t,f=(n=(e=u.zoom)==null?void 0:e.domain)==null?void 0:n.call(e),d=((i=(r=u.subX)==null?void 0:r.domain)==null?void 0:i.call(r))||((o=(s=u.x)==null?void 0:s.orgDomain)==null?void 0:o.call(s))||((c=(l=u.x)==null?void 0:l.domain)==null?void 0:c.call(l));return!(f!=null&&f.length)||!(d!=null&&d.length)?!1:!Yi(f[0],d[0])||!Yi(f[1],d[1])}function Zn(t){return Xl(t)?t.scale.zoom:t.scale.x}function Zy(t,e,n=0){var r,i;const s=(i=(r=Zn(t)).domain)==null?void 0:i.call(r);if(!(s!=null&&s.length))return!0;const o=nd(t,e),l=+s[0],c=+s[1];return o===null||!Number.isFinite(l)||!Number.isFinite(c)?!0:o>=Math.min(l,c)-n&&o<=Math.max(l,c)+n}function Jy(t,e){const n=[e>0?Math.abs(t[e]-t[e-1]):1/0,e<t.length-1?Math.abs(t[e+1]-t[e]):1/0].filter(Number.isFinite),r=Math.min(...n);return Number.isFinite(r)?r/2:0}function rd(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<e?n=i+1:r=i}return n}function Qy(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<=e?n=i+1:r=i}return n}function _y(t,e){var n;const{axis:r,state:i}=t,s=[i.dataGeneration,(n=r==null?void 0:r.isTimeSeries)!=null&&n.call(r)?1:0,e.map(u=>`${u.id}:${u.values.length}`).join(",")].join("|"),o=i._canvasXDataTickCache;if((o==null?void 0:o.key)===s)return o;const l=t.mapTargetsToUniqueXs(e),c={key:s,values:l,comparable:l.map(u=>{var f;return(f=nd(t,u))!=null?f:NaN})};return i._canvasXDataTickCache=c,c}function qy(t,e){const{values:n,comparable:r}=e;if(!Xl(t))return n;const i=Jf(t);if(!i||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>Zy(t,f));const[s,o]=i;let l=rd(r,s),c=Qy(r,o);const u=f=>{const d=rd(r,f);let h=-1,m=1/0;for(const S of[d-1,d]){const E=r[S],C=Math.abs(E-f);C<m&&(m=C,h=S)}h>-1&&h<r.length&&m<=Jy(r,h)+1e-6&&(l=Math.min(l,h),c=Math.max(c,h+1))};return u(s),u(o),n.slice(Math.max(0,l),Math.min(n.length,c))}function t0(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function e0(t,e){var n,r,i;const{config:s,state:o}=t,c=(((r=(n=Zn(t)).domain)==null?void 0:r.call(n))||[]).map(f=>f instanceof Date?+f:String(f)).join(","),u=s.axis_rotated?o.height:o.width;return[e?1:0,o.dataGeneration,c,u,s.axis_x_tick_fit?1:0,s.axis_x_tick_count||"",s.axis_x_tick_culling,s.axis_x_tick_culling_max||"",s.axis_x_tick_culling_reverse?1:0,((i=s.axis_x_categories)==null?void 0:i.length)||0,t0(s.axis_x_tick_values,o.redrawGeneration)].join("|")}function Wl(t,e,n,r=!1){var i;return(i=t.axis)!=null&&i.generateTickValues?t.axis.generateTickValues(e,n,r):e}function n0(t,e){const[n,r]=t,i=[];if(!e||!Number.isFinite(e))return i;for(let s=Math.round(n);s<=r;s+=e)i.push(s);return i}function so(t,e=!0){var n,r,i,s,o,l,c;const{axis:u,config:f}=t,d=Zn(t),h=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),m=t.state._canvasXTickValuesCache||(t.state._canvasXTickValuesCache=new Map),S=e0(t,e),E=m.get(S);if(E)return E;const C=z=>(m.set(S,z),z);if(!(h!=null&&h.length))return C([]);const w=io(f.axis_x_tick_values,t.api);if(w){const z=Gl(t,w);return C(e?jl(t,z):z)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const z=_y(t,h),B=qy(t,z),W=Wl(t,B,f.axis_x_tick_count,(r=u==null?void 0:u.isTimeSeries)==null?void 0:r.call(u));return C(e?jl(t,W,!0):W)}if(Xl(t)&&!((i=u==null?void 0:u.isCategorized)!=null&&i.call(u))){const z=((o=(s=t.zoom)==null?void 0:s.getDomain)==null?void 0:o.call(s))||d.domain(),B=Ky(Ma(d,f.axis_x_tick_count||Bt),z);return C(e?lo(B,Hl(t)):B)}if((l=u==null?void 0:u.isCategorized)!=null&&l.call(u)&&((c=f.axis_x_categories)!=null&&c.length)){const z=f.axis_x_categories.map((B,W)=>W);return C(e?lo(z,Hl(t)):z)}const $=Ma(d,f.axis_x_tick_count||Bt);return C(e?lo($,Hl(t)):$)}function r0(t){const{config:e,state:{height2:n,width2:r}}=t,i=e.axis_rotated?n:r,s=Nn(e,"x","count","subchart_axis_x"),o=Nn(e,"x","culling","subchart_axis_x"),l=Nn(e,"x","culling_max","subchart_axis_x");if(s)return s;if(o!==!1)return Math.min(l||Bt,Math.max(2,Math.floor(i/70)))}function ad(t,e=!0){var n,r,i,s;const{axis:o,config:l,scale:c}=t,u=c.subX,f=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),d=Nn(l,"x","count","subchart_axis_x"),h=r0(t),m=(C,w=!1)=>e?jl(t,C,w,"subchart_axis_x",h):C;if(!u||!(f!=null&&f.length))return[];const S=io(Nn(l,"x","values","subchart_axis_x"),t.api);if(S)return m(Gl(t,S));if(l.axis_x_tick_fit&&t.mapTargetsToUniqueXs){const C=Wl(t,t.mapTargetsToUniqueXs(f),d,(r=o==null?void 0:o.isTimeSeries)==null?void 0:r.call(o));return m(C,!0)}if((i=o==null?void 0:o.isCategorized)!=null&&i.call(o)&&((s=l.axis_x_categories)!=null&&s.length))return m(l.axis_x_categories.map((C,w)=>w),!0);const E=Ma(u,d||Bt);return m(E,!0)}function id(t,e=Zn(t),n=t.config.axis_x_tick_outer){var r,i;const s=e,o=((r=s.orgDomain)==null?void 0:r.call(s))||((i=s.domain)==null?void 0:i.call(s));if(!(o!=null&&o.length))return[];const l=+o[0],c=+o[o.length-1];if(!Number.isFinite(l)||!Number.isFinite(c))return[];const u=Math.ceil(Math.min(l,c)),f=Math.floor(Math.max(l,c)),d=Array.from({length:Math.max(0,f-u+1)},(h,m)=>u+m);return n?d.slice(1,-1):d}function Vl(t,e,n=Zn(t)){var r,i,s,o,l;const c=n,u=Vr(t,e);if((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)){const f=(s=c.orgScale)==null?void 0:s.call(c);if(f)return f(u);const d=((l=(o=t.axis.x)==null?void 0:o.tickOffset)==null?void 0:l.call(o))||(c(1)-c(0))/2;return c(u)-d}return c(u)}function sd(t,e,n,r=Zn(t)){if(e.length<2)return!1;const i=Math.max(1,n)/2,s=e.map(l=>Vl(t,l,r)).filter(Number.isFinite).sort((l,c)=>l-c);if(s.length<2)return!1;let o=s[0]+i;for(let l=1;l<s.length;l++){const c=s[l]-i,u=s[l]+i;if(c<=o+Se)return!0;o=Math.max(o,u)}return!1}function oo(t,e,n=Zn(t)){const r=new Set;return e.filter(i=>{const s=Vl(t,i,n),o=Math.round(s);return!Number.isFinite(s)||r.has(o)?!1:(r.add(o),!0)})}function a0(t,e,n=1){var r;const{axis:i,config:s}=t;if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const l=id(t);return oo(t,l)}if(s.axis_x_tick_culling===!1||s.axis_x_tick_culling_lines===!1)return e;const o=so(t,!1);return sd(t,o,n)?e:oo(t,o)}function i0(t,e,n=1){var r;const{axis:i,config:s,scale:o}=t,l=o.subX,c=Nn(s,"x","culling","subchart_axis_x"),u=Nn(s,"x","culling_lines","subchart_axis_x"),f=Nn(s,"x","outer","subchart_axis_x");if(!l)return[];if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const h=id(t,l,f);return oo(t,h,l)}if(c===!1||u===!1)return e;const d=ad(t,!1);return sd(t,d,n,l)?e:oo(t,d,l)}function Ki(t,e="y",n,r=!0,i=t.scale[e],s=`axis_${e}`){var o,l,c;const{axis:u,config:f}=t,d=`axis_${e}`,h=io(Nn(f,e,"values",s),t.api),m=C=>r?c0(t,e,C,s):C;if(h)return m(td(t,h,e));const S=n0(i.domain(),f[`${d}_tick_stepSize`]);if(S.length)return m(S);const E=n!=null?n:Nn(f,e,"count",s);if((o=u==null?void 0:u.isTimeSeries)!=null&&o.call(u,e)&&f[`${d}_tick_time_value`])return m(Ma(i,f[`${d}_tick_time_value`]));if((l=u==null?void 0:u.isLog)!=null&&l.call(u,e))return m(ed(i,E));if(E){const C=i.domain();return m(Wl(t,C,C.every(w=>w===0)?1:E,(c=u==null?void 0:u.isTimeSeries)==null?void 0:c.call(u,e)))}return m(Ma(i,Bt))}function s0(t,e,n){const r=e==="x"?Zn(t):t.scale[e],i=r!=null&&r.copy?r.copy():r;return n.domain&&(i!=null&&i.domain)&&i.domain(n.domain),i}function o0(t,e,n,r){var i,s,o;const l=r.tick||{},c=io(l.values,t.api);return c?e==="x"?Gl(t,c):td(t,c,e):e!=="x"&&((s=(i=t.axis)==null?void 0:i.isLog)!=null&&s.call(i,e))?ed(n,l.count):Ma(n,(o=l.count)!=null?o:Bt)}function l0(t,e){var n;const r=(n=e.tick)==null?void 0:n.format;return typeof r=="function"?r.bind(t.api):(i=>i)}function lo(t,e){const n=t.length-1;if(e&&n>e){const r=t.length-1;return e<=1?[t[0]]:Array.from({length:e},(i,s)=>t[Math.round(s*r/(e-1))])}return t}function c0(t,e,n,r=`axis_${e}`){const{config:i}=t;if(!Nn(i,e,"culling",r))return n;const o=Nn(i,e,"culling_max",r)||Bt,l=Nn(i,e,"culling_reverse",r),c=n.slice().sort((h,m)=>{const S=+h,E=+m,C=Number.isFinite(S)&&Number.isFinite(E)?S-E:String(h).localeCompare(String(m));return l?-C:C}),u=c.length;let f=0;for(let h=1;h<u;h++)if(u/h<o){f=h;break}if(!f)return n;const d=new Set(c.filter((h,m)=>m%f===0));return n.filter(h=>d.has(h))}function jl(t,e,n=!1,r="axis_x",i){const{config:s}=t;if(Nn(s,"x","culling",r)===!1)return e;const l=i||Nn(s,"x","culling_max",r)||Bt,c=Nn(s,"x","culling_reverse",r),u=n?e:e.slice().sort((m,S)=>{const E=+m,C=+S;return Number.isFinite(E)&&Number.isFinite(C)?c?C-E:E-C:c?String(S).localeCompare(String(m)):String(m).localeCompare(String(S))}),f=u.length;let d=0;for(let m=1;m<f;m++)if(f/m<l){d=m;break}if(!d)return e;if(n)return e.filter((m,S)=>c?(f-1-S)%d===0:S%d===0);const h=new Set(u.filter((m,S)=>S%d===0));return e.filter(m=>h.has(m))}function Hl(t){const{config:e,state:{height:n,width:r}}=t,i=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||Bt,Math.max(2,Math.floor(i/70)))}function u0(t){var e,n;const{axis:r,config:i}=t,s=(n=(e=r==null?void 0:r.y)==null?void 0:e.getGeneratedTicks)==null?void 0:n.call(e,i.grid_y_ticks);return s!=null&&s.length?s:i.grid_y_ticks?lo(Ki(t,"y",void 0,!1),i.grid_y_ticks):Ki(t,"y",void 0,!1)}var f0=Object.defineProperty,d0=(t,e,n)=>e in t?f0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h0=(t,e,n)=>d0(t,typeof e!="symbol"?e+"":e,n);class od{constructor(e){h0(this,"ctx",e)}get context(){return this.ctx}withContext(e,n){const r=this.ctx;this.ctx=e;try{n()}finally{this.ctx=r}}withState(e){const{ctx:n}=this;n.save();try{e(n)}finally{n.restore()}}withTranslation(e,n,r){this.withState(i=>{i.translate(e,n),r(i)})}clipRect(e,n){this.withState(r=>{r.beginPath(),r.rect(e.x,e.y,e.w,e.h),r.clip(),n(r)})}measureText(e){return this.ctx.measureText(e)}traceLine(e,n,r,i){const{ctx:s}=this;s.moveTo(e,n),s.lineTo(r,i)}traceCrispLine(e,n,r,i,s){this.traceLine(this.crisp(e,s),this.crisp(n,s),this.crisp(r,s),this.crisp(i,s))}traceCircle(e,n,r){this.ctx.moveTo(e+r,n),this.ctx.arc(e,n,r,0,Math.PI*2)}strokePath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.stroke()})}fillPath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.fill()})}fillRect(e,n){this.withStyle(n,r=>{r.fillRect(e.x,e.y,e.w,e.h)})}fillRoundRect(e,n=0,r){const i=this.normalizeRect(e),s=this.getRectRadii(i,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.fillRect(i,r);return}this.fillPath(o=>{this.traceRoundRect(o,i,s)},r)}strokeRoundRect(e,n=0,r){const i=this.normalizeRect(e),s=this.getRectRadii(i,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.strokeRect(i,r);return}this.strokePath(o=>{this.traceRoundRect(o,i,s)},r)}strokeRect(e,n){this.withStyle(n,r=>{r.strokeRect(e.x,e.y,e.w,e.h)})}text(e,n,r,i){const s=(l,c,u)=>{(i==null?void 0:i.maxWidth)===void 0?l.fillText(e,c,u):l.fillText(e,c,u,i.maxWidth)},o=l=>{i!=null&&i.angle?(l.translate(n,r),l.rotate(i.angle*Math.PI/180),s(l,0,0)):s(l,n,r)};i!=null&&i.angle?this.withState(l=>{this.applyStyle(i),o(l)}):this.withStyle(i,o)}textLines(e,n,r,i){this.withState(s=>{const o=e.split(`
|
|
32
|
-
`),l=xr((i==null?void 0:i.font)||s.font),c=o.length>1?-((o.length-1)*l):0;this.applyStyle(i),s.translate(n,r),i!=null&&i.angle&&s.rotate(i.angle*Math.PI/180),o.forEach((u,f)=>{const d=c+f*l;(i==null?void 0:i.maxWidth)===void 0?s.fillText(u,0,d):s.fillText(u,0,d,i.maxWidth)})})}point(e,n,r,i,s){this.withStyle(s,o=>{const l=!(s!=null&&s.stroke)||s.fill!==void 0,c=(s==null?void 0:s.stroke)!==void 0;if(e==="rectangle"){const u=i*2,f={x:n-i,y:r-i,w:u,h:u};l&&o.fillRect(f.x,f.y,f.w,f.h),c&&o.strokeRect(f.x,f.y,f.w,f.h)}else o.beginPath(),o.arc(n,r,i,0,Math.PI*2),l&&o.fill(),c&&o.stroke()})}getRectRadii(e,n){const r=typeof n=="number"?{tl:n,tr:n,br:n,bl:n}:{tl:n.tl||0,tr:n.tr||0,br:n.br||0,bl:n.bl||0},i=Math.max(0,Math.min(Math.abs(e.w),Math.abs(e.h))/2);return{tl:Math.max(0,Math.min(r.tl,i)),tr:Math.max(0,Math.min(r.tr,i)),br:Math.max(0,Math.min(r.br,i)),bl:Math.max(0,Math.min(r.bl,i))}}traceRoundRect(e,n,r){const{x:i,y:s,w:o,h:l}=n,c=i+o,u=s+l;e.moveTo(i+r.tl,s),e.lineTo(c-r.tr,s),r.tr?e.quadraticCurveTo(c,s,c,s+r.tr):e.lineTo(c,s),e.lineTo(c,u-r.br),r.br?e.quadraticCurveTo(c,u,c-r.br,u):e.lineTo(c,u),e.lineTo(i+r.bl,u),r.bl?e.quadraticCurveTo(i,u,i,u-r.bl):e.lineTo(i,u),e.lineTo(i,s+r.tl),r.tl?e.quadraticCurveTo(i,s,i+r.tl,s):e.lineTo(i,s),e.closePath()}normalizeRect(e){const n=e.w<0?e.x+e.w:e.x,r=e.h<0?e.y+e.h:e.y;return{x:n,y:r,w:Math.abs(e.w),h:Math.abs(e.h)}}applyStyle(e){if(!e)return;const{ctx:n}=this;e.fill!==void 0&&(n.fillStyle=e.fill),e.stroke!==void 0&&(n.strokeStyle=e.stroke),e.lineWidth!==void 0&&(n.lineWidth=e.lineWidth),e.alpha!==void 0&&(n.globalAlpha=e.alpha),e.font!==void 0&&(n.font=e.font),e.textAlign!==void 0&&(n.textAlign=e.textAlign),e.textBaseline!==void 0&&(n.textBaseline=e.textBaseline),e.lineDash!==void 0&&n.setLineDash(e.lineDash)}withStyle(e,n){e?this.withState(r=>{this.applyStyle(e),n(r)}):n(this.ctx)}crisp(e,n){return n%2?Math.round(e)+.5:Math.round(e)}}var v0=Object.defineProperty,g0=Object.defineProperties,p0=Object.getOwnPropertyDescriptors,ld=Object.getOwnPropertySymbols,m0=Object.prototype.hasOwnProperty,x0=Object.prototype.propertyIsEnumerable,Yl=(t,e,n)=>e in t?v0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cd=(t,e)=>{for(var n in e||(e={}))m0.call(e,n)&&Yl(t,n,e[n]);if(ld)for(var n of ld(e))x0.call(e,n)&&Yl(t,n,e[n]);return t},ud=(t,e)=>g0(t,p0(e)),Kl=(t,e,n)=>Yl(t,typeof e!="symbol"?e+"":e,n);const fd=20,dd=15;function Zl(t){return t?-1:1}function y0(t,e){return t?e?-1:1:e?1:-1}function T0(t,e){var n,r,i;const s=e==="y2"?"subY2":"subY",o=(i=(r=(n=t.axis)==null?void 0:n[s])==null?void 0:r.tickFormat)==null?void 0:i.call(r),l=t.config[`subchart_axis_${e}_tick_format`]||t.config[`axis_${e}_tick_format`];return o||(typeof l=="function"?l.bind(t.api):(c=>c))}function b0(t){return t?{stroke:t.lineColor,lineWidth:t.lineWidth,lineDash:t.dashArray}:void 0}function S0(t){return t?{fill:t.labelColor,font:t.labelFont}:void 0}function Jl(t,e,n){return{x:t.left-fd,y:0,w:e+fd*2,h:n}}function Ql(t,e,n){return{x:0,y:t.top-dd,w:e,h:n+dd*2}}function A0(t,e){var n,r;const i=(r=(n=t.config.axis_tooltip)==null?void 0:n.backgroundColor)!=null?r:"black";return typeof i=="string"?i:(i==null?void 0:i[e])||null}function E0(t,e,n){var r,i;const s=t.scale[e];if(!(s!=null&&s.invert))return null;const o=s.invert(n);if(o==null)return null;if(e==="x"&&((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r)))return t.format.xAxisTick(o);const l=Number(o);return Number.isFinite(l)?l.toFixed(2):`${o}`}function C0(t,e){const{config:n,state:{height:r,margin:i,width:s}}=t,o=n.axis_rotated,l={x:i.left,y:i.top};return e==="x"?!o&&(l.y+=r):e==="y"?o&&(l.y+=r):o?l.y-=1:l.x+=s,l}function I0(t,e,n,r){return r?{x:t.x+n,y:t.y-e}:{x:t.x+e,y:t.y+n}}function hd(t,e){const n=t?t(e):e;return n==null?"":String(n)}function Zi(t,e){return t[`${e}TickFont`]||t.labelFont}function _l(t,e){const n=t.measureText("0"),r=(n.fontBoundingBoxAscent||0)+(n.fontBoundingBoxDescent||0),i=(n.actualBoundingBoxAscent||0)+(n.actualBoundingBoxDescent||0),s=(e||10)*(11.5/10);return Math.max(e,r,i,s)}function R0(t){return 11.5-2.5*(t/15)*(t>0?1:-1)}function w0(t){return 8*Math.sin(Math.PI*(t/180))}function ql(t,e){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?/em$/.test(t.trim())?n*e:n:0}return 0}function O0(t,e,n){if(!e)return[t];const r=n.measureText("0").width||5.5;function i(s,o){let l;for(let c=1;c<o.length;c++)if(o.charAt(c)===" "&&(l=c),e<r*(c+1)){const u=l||c;return i(s.concat(o.slice(0,u)),o.slice(l?l+1:c))}return s.concat(o)}return i([],t)}function tc(t,e,n,r){var i,s;const o=t.config.axis_x_tick_width;if(o&&o>0)return o;if(n)return 95;if((s=(i=t.axis)==null?void 0:i.isCategorized)!=null&&s.call(i)&&e.length>1){const l=r(Vr(t,e[0])),c=r(Vr(t,e[1]));return Math.max(0,Math.abs(c-l)-12)}return 110}function vd(t,e,n,r,i=[],s=!1,o=Zn(t),l){const c=n?n(r):r;if(c==null)return[""];if(Array.isArray(c))return c.map(f=>String(f));const u=String(c);return u.indexOf(`
|
|
13
|
+
* - d3-axis ^3.0.1
|
|
14
|
+
* - d3-brush ^3.0.1
|
|
15
|
+
* - d3-drag ^3.0.1
|
|
16
|
+
* - d3-hierarchy ^3.1.3
|
|
17
|
+
* - d3-interpolate ^3.0.2
|
|
18
|
+
* - d3-scale ^4.0.3
|
|
19
|
+
* - d3-selection ^3.0.1
|
|
20
|
+
* - d3-shape ^3.2.1
|
|
21
|
+
* - d3-time-format ^4.1.1
|
|
22
|
+
* - d3-transition ^3.0.2
|
|
23
|
+
* - d3-zoom ^3.0.1
|
|
24
|
+
*/(function(Ys,nr){if(typeof exports=="object"&&typeof module=="object")module.exports=nr();else if(typeof define=="function"&&define.amd)define([],nr);else{var Ks=nr();for(var S in Ks)(typeof exports=="object"?exports:Ys)[S]=Ks[S]}})(this,function(){return(function(){var Qf=[(function(S,P,i){"use strict";i(1),i(100),i(101),i(102),i(103),i(104),i(105),i(106),i(107),i(108),i(109),i(110),i(111),i(112),i(113),i(114),i(115),i(116),i(130),i(131),i(133),i(143),i(144),i(145),i(147),i(151),i(154),i(156),i(158),i(159),i(160),i(161),i(163),i(164),i(166),i(167),i(169),i(173),i(174),i(175),i(176),i(181),i(182),i(184),i(185),i(186),i(187),i(191),i(192),i(193),i(194),i(195),i(200),i(202),i(203),i(204),i(207),i(208),i(209),i(210),i(211),i(212),i(223),i(225),i(226),i(228),i(229),i(232),i(235),i(241),i(242),i(243),i(244),i(245),i(246),i(250),i(251),i(253),i(254),i(256),i(257),i(259),i(260),i(261),i(262),i(263),i(270),i(271),i(272),i(277),i(278),i(279),i(280),i(282),i(283),i(284),i(286),i(287),i(288),i(289),i(290),i(291),i(292),i(294),i(299),i(300),i(301),i(302),i(94),i(304),i(305),i(312),i(314),i(315),i(316),i(318),i(319),i(320),i(321),i(322),i(324),i(325),i(326),i(327),i(328),i(329),i(331),i(332),i(333),i(334),i(335),i(336),i(337),i(338),i(339),i(342),i(343),i(345),i(346),i(347),i(348),i(349),i(350),i(352),i(354),i(355),i(356),i(357),i(359),i(360),i(362),i(363),i(364),i(365),i(367),i(368),i(369),i(370),i(371),i(372),i(373),i(374),i(375),i(377),i(378),i(379),i(380),i(381),i(382),i(383),i(384),i(385),i(386),i(387),i(389),i(390),i(391),i(392),i(416),i(417),i(418),i(419),i(420),i(421),i(428),i(429),i(430),i(431),i(432),i(433),i(434),i(436),i(437),i(438),i(439),i(440),i(441),i(442),i(443),i(444),i(445),i(453),i(455),i(456),i(458),i(459),i(460),i(461),i(462),i(464),i(474),i(476),i(478),i(480),i(482),i(485),i(487),i(488),i(490),i(493),i(494),i(495),i(496),i(497),i(501),i(502),i(504),i(505),i(506),i(507),i(509),i(510),i(511),i(512),i(513),i(514),i(515),i(517),i(520),i(523),i(526),i(527),i(528),i(529),i(530),i(531),i(532),i(533),i(534),i(535),i(536),i(537),i(538),i(546),i(547),i(548),i(549),i(550),i(551),i(552),i(553),i(554),i(555),i(556),i(557),i(558),i(560),i(561),i(562),i(563),i(564),i(565),i(566),i(567),i(568),i(569),i(570),i(571),i(572),i(573),i(574),i(575),i(576),i(577),i(578),i(579),i(580),i(581),i(582),i(583),i(584),i(585),i(586),i(590),i(592),i(594),i(595),i(596),i(597),i(598),i(601),i(603),i(606),i(608),i(609),i(610),i(613),i(614),i(616),i(617),i(618),i(622),i(623),i(624),i(625),i(628),i(634),i(635),i(636),i(637),i(638),i(639),i(640),i(80)}),(function(S,P,i){"use strict";i(2),i(91),i(93),i(94),i(99)}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(8),y=i(14),T=i(36),A=i(6),C=i(26),I=i(7),R=i(38),O=i(24),F=i(46),L=i(12),M=i(18),$=i(68),D=i(11),z=i(71),H=i(73),X=i(57),U=i(75),j=i(66),W=i(5),K=i(44),Q=i(72),tt=i(10),J=i(47),q=i(77),rt=i(34),ft=i(53),ct=i(54),ut=i(40),gt=i(33),pt=i(78),mt=i(79),St=i(81),Ct=i(82),wt=i(51),jt=i(83).forEach,Ut=ft("hidden"),yt="Symbol",Tt="prototype",Ot=wt.set,Bt=wt.getterFor(yt),Kt=Object[Tt],qt=p.Symbol,$t=qt&&qt[Tt],Jt=p.RangeError,te=p.TypeError,de=p.QObject,ue=W.f,he=K.f,Ee=U.f,$e=tt.f,Ie=y([].push),oe=rt("symbols"),ye=rt("op-symbols"),ke=rt("wks"),Ft=!de||!de[Tt]||!de[Tt].findChild,Xt=function(Mt,It,Dt){var zt=ue(Kt,It);return zt&&delete Kt[It],he(Mt,It,Dt),zt&&Mt!==Kt&&he(Kt,It,zt),Mt},Qt=A&&I(function(){return z(he({},"a",{get:function(){return he(this,"a",{value:7}).a}})).a!==7})?Xt:he,Re=function(Mt,It){var Dt=oe[Mt]=z($t);return Ot(Dt,{type:yt,tag:Mt,description:It}),A||(Dt.description=It),Dt},Wt=function(It,Dt,zt){It===Kt&&Wt(ye,Dt,zt),F(It);var Nt=M(Dt);return F(zt),R(oe,Nt)?(("enumerable"in zt?!zt.enumerable:!R(It,Nt)||R(It,Ut)&&It[Ut][Nt])?(R(It,Ut)||he(It,Ut,D(1,z(null))),It[Ut][Nt]=!0):(R(It,Ut)&&It[Ut][Nt]&&(It[Ut][Nt]=!1),zt=z(zt,{enumerable:D(0,!1)})),Qt(It,Nt,zt)):he(It,Nt,zt)},Ht=function(It,Dt){F(It);var zt=L(Dt),Nt=H(zt).concat(vt(zt));return jt(Nt,function(le){(!A||m(fe,zt,le))&&Wt(It,le,zt[le])}),It},ie=function(It,Dt){return Dt===void 0?z(It):Ht(z(It),Dt)},fe=function(It){var Dt=M(It),zt=m($e,this,Dt);return this===Kt&&R(oe,Dt)&&!R(ye,Dt)?!1:zt||!R(this,Dt)||!R(oe,Dt)||R(this,Ut)&&this[Ut][Dt]?zt:!0},me=function(It,Dt){var zt=L(It),Nt=M(Dt);if(!(zt===Kt&&R(oe,Nt)&&!R(ye,Nt))){var le=ue(zt,Nt);return le&&R(oe,Nt)&&!(R(zt,Ut)&&zt[Ut][Nt])&&(le.enumerable=!0),le}},Qe=function(It){var Dt=Ee(L(It)),zt=[];return jt(Dt,function(Nt){!R(oe,Nt)&&!R(ct,Nt)&&Ie(zt,Nt)}),zt},vt=function(Mt){var It=Mt===Kt,Dt=Ee(It?ye:L(Mt)),zt=[];return jt(Dt,function(Nt){R(oe,Nt)&&(!It||R(Kt,Nt))&&Ie(zt,oe[Nt])}),zt};C||(qt=function(){if(O($t,this))throw new te("Symbol is not a constructor");var It=!arguments.length||arguments[0]===void 0?void 0:$(arguments[0]),Dt=ut(It),zt=function(Nt){var le=this===void 0?p:this;le===Kt&&m(zt,ye,Nt),R(le,Ut)&&R(le[Ut],Dt)&&(le[Ut][Dt]=!1);var Te=D(1,Nt);try{Qt(le,Dt,Te)}catch(Ce){if(!(Ce instanceof Jt))throw Ce;Xt(le,Dt,Te)}};return A&&Ft&&Qt(Kt,Dt,{configurable:!0,set:zt}),Re(Dt,It)},$t=qt[Tt],J($t,"toString",function(){return Bt(this).tag}),J(qt,"withoutSetter",function(Mt){return Re(ut(Mt),Mt)}),tt.f=fe,K.f=Wt,Q.f=Ht,W.f=me,X.f=U.f=Qe,j.f=vt,pt.f=function(Mt){return Re(gt(Mt),Mt)},A&&(q($t,"description",{configurable:!0,get:function(){return Bt(this).description}}),T||J(Kt,"propertyIsEnumerable",fe,{unsafe:!0}))),g({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:qt}),jt(H(ke),function(Mt){mt(Mt)}),g({target:yt,stat:!0,forced:!C},{useSetter:function(){Ft=!0},useSimple:function(){Ft=!1}}),g({target:"Object",stat:!0,forced:!C,sham:!A},{create:ie,defineProperty:Wt,defineProperties:Ht,getOwnPropertyDescriptor:me}),g({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:Qe}),St(),Ct(qt,yt),ct[Ut]=!0}),(function(S,P,i){"use strict";var g=i(4),p=i(5).f,m=i(43),y=i(47),T=i(37),A=i(55),C=i(67);S.exports=function(I,R){var O=I.target,F=I.global,L=I.stat,M,$,D,z,H,X;if(F?$=g:L?$=g[O]||T(O,{}):$=g[O]&&g[O].prototype,$)for(D in R){if(H=R[D],I.dontCallGetSet?(X=p($,D),z=X&&X.value):z=$[D],M=C(F?D:O+(L?".":"#")+D,I.forced),!M&&z!==void 0){if(typeof H==typeof z)continue;A(H,z)}(I.sham||z&&z.sham)&&m(H,"sham",!0),y($,D,H,I)}}}),(function(S){"use strict";var P=function(i){return i&&i.Math===Math&&i};S.exports=P(typeof globalThis=="object"&&globalThis)||P(typeof window=="object"&&window)||P(typeof self=="object"&&self)||P(typeof global=="object"&&global)||P(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(S,P,i){"use strict";var g=i(6),p=i(8),m=i(10),y=i(11),T=i(12),A=i(18),C=i(38),I=i(41),R=Object.getOwnPropertyDescriptor;P.f=g?R:function(F,L){if(F=T(F),L=A(L),I)try{return R(F,L)}catch(M){}if(C(F,L))return y(!p(m.f,F,L),F[L])}}),(function(S,P,i){"use strict";var g=i(7);S.exports=!g(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(S){"use strict";S.exports=function(P){try{return!!P()}catch(i){return!0}}}),(function(S,P,i){"use strict";var g=i(9),p=Function.prototype.call;S.exports=g?p.bind(p):function(){return p.apply(p,arguments)}}),(function(S,P,i){"use strict";var g=i(7);S.exports=!g(function(){var p=function(){}.bind();return typeof p!="function"||p.hasOwnProperty("prototype")})}),(function(S,P){"use strict";var i={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,p=g&&!i.call({1:2},1);P.f=p?function(y){var T=g(this,y);return!!T&&T.enumerable}:i}),(function(S){"use strict";S.exports=function(P,i){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:i}}}),(function(S,P,i){"use strict";var g=i(13),p=i(16);S.exports=function(m){return g(p(m))}}),(function(S,P,i){"use strict";var g=i(14),p=i(7),m=i(15),y=Object,T=g("".split);S.exports=p(function(){return!y("z").propertyIsEnumerable(0)})?function(A){return m(A)==="String"?T(A,""):y(A)}:y}),(function(S,P,i){"use strict";var g=i(9),p=Function.prototype,m=p.call,y=g&&p.bind.bind(m,m);S.exports=g?y:function(T){return function(){return m.apply(T,arguments)}}}),(function(S,P,i){"use strict";var g=i(14),p=g({}.toString),m=g("".slice);S.exports=function(y){return m(p(y),8,-1)}}),(function(S,P,i){"use strict";var g=i(17),p=TypeError;S.exports=function(m){if(g(m))throw new p("Can't call method on "+m);return m}}),(function(S){"use strict";S.exports=function(P){return P==null}}),(function(S,P,i){"use strict";var g=i(19),p=i(22);S.exports=function(m){var y=g(m,"string");return p(y)?y:y+""}}),(function(S,P,i){"use strict";var g=i(8),p=i(20),m=i(22),y=i(29),T=i(32),A=i(33),C=TypeError,I=A("toPrimitive");S.exports=function(R,O){if(!p(R)||m(R))return R;var F=y(R,I),L;if(F){if(O===void 0&&(O="default"),L=g(F,R,O),!p(L)||m(L))return L;throw new C("Can't convert object to primitive value")}return O===void 0&&(O="number"),T(R,O)}}),(function(S,P,i){"use strict";var g=i(21);S.exports=function(p){return typeof p=="object"?p!==null:g(p)}}),(function(S){"use strict";var P=typeof document=="object"&&document.all;S.exports=typeof P=="undefined"&&P!==void 0?function(i){return typeof i=="function"||i===P}:function(i){return typeof i=="function"}}),(function(S,P,i){"use strict";var g=i(23),p=i(21),m=i(24),y=i(25),T=Object;S.exports=y?function(A){return typeof A=="symbol"}:function(A){var C=g("Symbol");return p(C)&&m(C.prototype,T(A))}}),(function(S,P,i){"use strict";var g=i(4),p=i(21),m=function(y){return p(y)?y:void 0};S.exports=function(y,T){return arguments.length<2?m(g[y]):g[y]&&g[y][T]}}),(function(S,P,i){"use strict";var g=i(14);S.exports=g({}.isPrototypeOf)}),(function(S,P,i){"use strict";var g=i(26);S.exports=g&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(S,P,i){"use strict";var g=i(27),p=i(7),m=i(4),y=m.String;S.exports=!!Object.getOwnPropertySymbols&&!p(function(){var T=Symbol("symbol detection");return!y(T)||!(Object(T)instanceof Symbol)||!Symbol.sham&&g&&g<41})}),(function(S,P,i){"use strict";var g=i(4),p=i(28),m=g.process,y=g.Deno,T=m&&m.versions||y&&y.version,A=T&&T.v8,C,I;A&&(C=A.split("."),I=C[0]>0&&C[0]<4?1:+(C[0]+C[1])),!I&&p&&(C=p.match(/Edge\/(\d+)/),(!C||C[1]>=74)&&(C=p.match(/Chrome\/(\d+)/),C&&(I=+C[1]))),S.exports=I}),(function(S,P,i){"use strict";var g=i(4),p=g.navigator,m=p&&p.userAgent;S.exports=m?String(m):""}),(function(S,P,i){"use strict";var g=i(30),p=i(17);S.exports=function(m,y){var T=m[y];return p(T)?void 0:g(T)}}),(function(S,P,i){"use strict";var g=i(21),p=i(31),m=TypeError;S.exports=function(y){if(g(y))return y;throw new m(p(y)+" is not a function")}}),(function(S){"use strict";var P=String;S.exports=function(i){try{return P(i)}catch(g){return"Object"}}}),(function(S,P,i){"use strict";var g=i(8),p=i(21),m=i(20),y=TypeError;S.exports=function(T,A){var C,I;if(A==="string"&&p(C=T.toString)&&!m(I=g(C,T))||p(C=T.valueOf)&&!m(I=g(C,T))||A!=="string"&&p(C=T.toString)&&!m(I=g(C,T)))return I;throw new y("Can't convert object to primitive value")}}),(function(S,P,i){"use strict";var g=i(4),p=i(34),m=i(38),y=i(40),T=i(26),A=i(25),C=g.Symbol,I=p("wks"),R=A?C.for||C:C&&C.withoutSetter||y;S.exports=function(O){return m(I,O)||(I[O]=T&&m(C,O)?C[O]:R("Symbol."+O)),I[O]}}),(function(S,P,i){"use strict";var g=i(35),p=Object.create||Object;S.exports=function(m,y){return g[m]||(g[m]=y||p(null))}}),(function(S,P,i){"use strict";var g=i(36),p=i(4),m=i(37),y="__core-js_shared__",T=S.exports=p[y]||m(y,{});(T.versions||(T.versions=[])).push({version:"3.51.0",mode:g?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.51.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),(function(S){"use strict";S.exports=!1}),(function(S,P,i){"use strict";var g=i(4),p=Object.defineProperty;S.exports=function(m,y){try{p(g,m,{value:y,configurable:!0,writable:!0})}catch(T){g[m]=y}return y}}),(function(S,P,i){"use strict";var g=i(14),p=i(39),m=g({}.hasOwnProperty);S.exports=Object.hasOwn||function(T,A){return m(p(T),A)}}),(function(S,P,i){"use strict";var g=i(16),p=Object;S.exports=function(m){return p(g(m))}}),(function(S,P,i){"use strict";var g=i(14),p=0,m=Math.random(),y=g(1.1.toString);S.exports=function(T){return"Symbol("+(T===void 0?"":T)+")_"+y(++p+m,36)}}),(function(S,P,i){"use strict";var g=i(6),p=i(7),m=i(42);S.exports=!g&&!p(function(){return Object.defineProperty(m("div"),"a",{get:function(){return 7}}).a!==7})}),(function(S,P,i){"use strict";var g=i(4),p=i(20),m=g.document,y=p(m)&&p(m.createElement);S.exports=function(T){return y?m.createElement(T):{}}}),(function(S,P,i){"use strict";var g=i(6),p=i(44),m=i(11);S.exports=g?function(y,T,A){return p.f(y,T,m(1,A))}:function(y,T,A){return y[T]=A,y}}),(function(S,P,i){"use strict";var g=i(6),p=i(41),m=i(45),y=i(46),T=i(18),A=TypeError,C=Object.defineProperty,I=Object.getOwnPropertyDescriptor,R="enumerable",O="configurable",F="writable";P.f=g?m?function(M,$,D){if(y(M),$=T($),y(D),typeof M=="function"&&$==="prototype"&&"value"in D&&F in D&&!D[F]){var z=I(M,$);z&&z[F]&&(M[$]=D.value,D={configurable:O in D?D[O]:z[O],enumerable:R in D?D[R]:z[R],writable:!1})}return C(M,$,D)}:C:function(M,$,D){if(y(M),$=T($),y(D),p)try{return C(M,$,D)}catch(z){}if("get"in D||"set"in D)throw new A("Accessors not supported");return"value"in D&&(M[$]=D.value),M}}),(function(S,P,i){"use strict";var g=i(6),p=i(7);S.exports=g&&p(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(S,P,i){"use strict";var g=i(20),p=String,m=TypeError;S.exports=function(y){if(g(y))return y;throw new m(p(y)+" is not an object")}}),(function(S,P,i){"use strict";var g=i(21),p=i(44),m=i(48),y=i(37);S.exports=function(T,A,C,I){I||(I={});var R=I.enumerable,O=I.name!==void 0?I.name:A;if(g(C)&&m(C,O,I),I.global)R?T[A]=C:y(A,C);else{try{I.unsafe?T[A]&&(R=!0):delete T[A]}catch(F){}R?T[A]=C:p.f(T,A,{value:C,enumerable:!1,configurable:!I.nonConfigurable,writable:!I.nonWritable})}return T}}),(function(S,P,i){"use strict";var g=i(14),p=i(7),m=i(21),y=i(38),T=i(6),A=i(49).CONFIGURABLE,C=i(50),I=i(51),R=I.enforce,O=I.get,F=String,L=Object.defineProperty,M=g("".slice),$=g("".replace),D=g([].join),z=T&&!p(function(){return L(function(){},"length",{value:8}).length!==8}),H=String(String).split("String"),X=S.exports=function(U,j,W){M(F(j),0,7)==="Symbol("&&(j="["+$(F(j),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),W&&W.getter&&(j="get "+j),W&&W.setter&&(j="set "+j),(!y(U,"name")||A&&U.name!==j)&&(T?L(U,"name",{value:j,configurable:!0}):U.name=j),z&&W&&y(W,"arity")&&U.length!==W.arity&&L(U,"length",{value:W.arity});try{W&&y(W,"constructor")&&W.constructor?T&&L(U,"prototype",{writable:!1}):U.prototype&&(U.prototype=void 0)}catch(Q){}var K=R(U);return y(K,"source")||(K.source=D(H,typeof j=="string"?j:"")),U};Function.prototype.toString=X(function(){return m(this)&&O(this).source||C(this)},"toString")}),(function(S,P,i){"use strict";var g=i(6),p=i(38),m=Function.prototype,y=g&&Object.getOwnPropertyDescriptor,T=p(m,"name"),A=T&&function(){}.name==="something",C=T&&(!g||g&&y(m,"name").configurable);S.exports={EXISTS:T,PROPER:A,CONFIGURABLE:C}}),(function(S,P,i){"use strict";var g=i(14),p=i(21),m=i(35),y=g(Function.toString);p(m.inspectSource)||(m.inspectSource=function(T){return y(T)}),S.exports=m.inspectSource}),(function(S,P,i){"use strict";var g=i(52),p=i(4),m=i(20),y=i(43),T=i(38),A=i(35),C=i(53),I=i(54),R="Object already initialized",O=p.TypeError,F=p.WeakMap,L,M,$,D=function(U){return $(U)?M(U):L(U,{})},z=function(U){return function(j){var W;if(!m(j)||(W=M(j)).type!==U)throw new O("Incompatible receiver, "+U+" required");return W}};if(g||A.state){var H=A.state||(A.state=new F);H.get=H.get,H.has=H.has,H.set=H.set,L=function(U,j){if(H.has(U))throw new O(R);return j.facade=U,H.set(U,j),j},M=function(U){return H.get(U)||{}},$=function(U){return H.has(U)}}else{var X=C("state");I[X]=!0,L=function(U,j){if(T(U,X))throw new O(R);return j.facade=U,y(U,X,j),j},M=function(U){return T(U,X)?U[X]:{}},$=function(U){return T(U,X)}}S.exports={set:L,get:M,has:$,enforce:D,getterFor:z}}),(function(S,P,i){"use strict";var g=i(4),p=i(21),m=g.WeakMap;S.exports=p(m)&&/native code/.test(String(m))}),(function(S,P,i){"use strict";var g=i(34),p=i(40),m=g("keys");S.exports=function(y){return m[y]||(m[y]=p(y))}}),(function(S){"use strict";S.exports={}}),(function(S,P,i){"use strict";var g=i(38),p=i(56),m=i(5),y=i(44);S.exports=function(T,A,C){for(var I=p(A),R=y.f,O=m.f,F=0;F<I.length;F++){var L=I[F];!g(T,L)&&!(C&&g(C,L))&&R(T,L,O(A,L))}}}),(function(S,P,i){"use strict";var g=i(23),p=i(14),m=i(57),y=i(66),T=i(46),A=p([].concat);S.exports=g("Reflect","ownKeys")||function(I){var R=m.f(T(I)),O=y.f;return O?A(R,O(I)):R}}),(function(S,P,i){"use strict";var g=i(58),p=i(65),m=p.concat("length","prototype");P.f=Object.getOwnPropertyNames||function(T){return g(T,m)}}),(function(S,P,i){"use strict";var g=i(14),p=i(38),m=i(12),y=i(59).indexOf,T=i(54),A=g([].push);S.exports=function(C,I){var R=m(C),O=0,F=[],L;for(L in R)!p(T,L)&&p(R,L)&&A(F,L);for(;I.length>O;)p(R,L=I[O++])&&(~y(F,L)||A(F,L));return F}}),(function(S,P,i){"use strict";var g=i(12),p=i(60),m=i(63),y=function(T){return function(A,C,I){var R=g(A),O=m(R);if(O===0)return!T&&-1;var F=p(I,O),L;if(T&&C!==C){for(;O>F;)if(L=R[F++],L!==L)return!0}else for(;O>F;F++)if((T||F in R)&&R[F]===C)return T||F||0;return!T&&-1}};S.exports={includes:y(!0),indexOf:y(!1)}}),(function(S,P,i){"use strict";var g=i(61),p=Math.max,m=Math.min;S.exports=function(y,T){var A=g(y);return A<0?p(A+T,0):m(A,T)}}),(function(S,P,i){"use strict";var g=i(62);S.exports=function(p){var m=+p;return m!==m||m===0?0:g(m)}}),(function(S){"use strict";var P=Math.ceil,i=Math.floor;S.exports=Math.trunc||function(p){var m=+p;return(m>0?i:P)(m)}}),(function(S,P,i){"use strict";var g=i(64);S.exports=function(p){return g(p.length)}}),(function(S,P,i){"use strict";var g=i(61),p=Math.min;S.exports=function(m){var y=g(m);return y>0?p(y,9007199254740991):0}}),(function(S){"use strict";S.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(S,P){"use strict";P.f=Object.getOwnPropertySymbols}),(function(S,P,i){"use strict";var g=i(7),p=i(21),m=/#|\.prototype\./,y=function(R,O){var F=A[T(R)];return F===I?!0:F===C?!1:p(O)?g(O):!!O},T=y.normalize=function(R){return String(R).replace(m,".").toLowerCase()},A=y.data={},C=y.NATIVE="N",I=y.POLYFILL="P";S.exports=y}),(function(S,P,i){"use strict";var g=i(69),p=String;S.exports=function(m){if(g(m)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return p(m)}}),(function(S,P,i){"use strict";var g=i(70),p=i(21),m=i(15),y=i(33),T=y("toStringTag"),A=Object,C=m((function(){return arguments})())==="Arguments",I=function(R,O){try{return R[O]}catch(F){}};S.exports=g?m:function(R){var O,F,L;return R===void 0?"Undefined":R===null?"Null":typeof(F=I(O=A(R),T))=="string"?F:C?m(O):(L=m(O))==="Object"&&p(O.callee)?"Arguments":L}}),(function(S,P,i){"use strict";var g=i(33),p=g("toStringTag"),m={};m[p]="z",S.exports=String(m)==="[object z]"}),(function(S,P,i){"use strict";var g=i(46),p=i(72),m=i(65),y=i(54),T=i(74),A=i(42),C=i(53),I=">",R="<",O="prototype",F="script",L=C("IE_PROTO"),M=function(){},$=function(U){return R+F+I+U+R+"/"+F+I},D=function(U){U.write($("")),U.close();var j=U.parentWindow.Object;return U=null,j},z=function(){var U=A("iframe"),j="java"+F+":",W;return U.style.display="none",T.appendChild(U),U.src=String(j),W=U.contentWindow.document,W.open(),W.write($("document.F=Object")),W.close(),W.F},H,X=function(){try{H=new ActiveXObject("htmlfile")}catch(j){}X=typeof document!="undefined"?document.domain&&H?D(H):z():D(H);for(var U=m.length;U--;)delete X[O][m[U]];return X()};y[L]=!0,S.exports=Object.create||function(j,W){var K;return j!==null?(M[O]=g(j),K=new M,M[O]=null,K[L]=j):K=X(),W===void 0?K:p.f(K,W)}}),(function(S,P,i){"use strict";var g=i(6),p=i(45),m=i(44),y=i(46),T=i(12),A=i(73);P.f=g&&!p?Object.defineProperties:function(I,R){y(I);for(var O=T(R),F=A(R),L=F.length,M=0,$;L>M;)m.f(I,$=F[M++],O[$]);return I}}),(function(S,P,i){"use strict";var g=i(58),p=i(65);S.exports=Object.keys||function(y){return g(y,p)}}),(function(S,P,i){"use strict";var g=i(23);S.exports=g("document","documentElement")}),(function(S,P,i){"use strict";var g=i(15),p=i(12),m=i(57).f,y=i(76),T=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],A=function(C){try{return m(C)}catch(I){return y(T)}};S.exports.f=function(I){return T&&g(I)==="Window"?A(I):m(p(I))}}),(function(S,P,i){"use strict";var g=i(14);S.exports=g([].slice)}),(function(S,P,i){"use strict";var g=i(48),p=i(44);S.exports=function(m,y,T){return T.get&&g(T.get,y,{getter:!0}),T.set&&g(T.set,y,{setter:!0}),p.f(m,y,T)}}),(function(S,P,i){"use strict";var g=i(33);P.f=g}),(function(S,P,i){"use strict";var g=i(80),p=i(38),m=i(78),y=i(44).f;S.exports=function(T){var A=g.Symbol||(g.Symbol={});p(A,T)||y(A,T,{value:m.f(T)})}}),(function(S,P,i){"use strict";var g=i(4);S.exports=g}),(function(S,P,i){"use strict";var g=i(8),p=i(23),m=i(33),y=i(47);S.exports=function(){var T=p("Symbol"),A=T&&T.prototype,C=A&&A.valueOf,I=m("toPrimitive");A&&!A[I]&&y(A,I,function(R){return g(C,this)},{arity:1})}}),(function(S,P,i){"use strict";var g=i(44).f,p=i(38),m=i(33),y=m("toStringTag");S.exports=function(T,A,C){T&&!C&&(T=T.prototype),T&&!p(T,y)&&g(T,y,{configurable:!0,value:A})}}),(function(S,P,i){"use strict";var g=i(84),p=i(13),m=i(39),y=i(63),T=i(86),A=i(90),C=function(I){var R=I===1,O=I===2,F=I===3,L=I===4,M=I===6,$=I===7,D=I===5||M;return function(z,H,X){for(var U=m(z),j=p(U),W=y(j),K=g(H,X),Q=0,tt=0,J=R?T(z,W):O||$?T(z,0):void 0,q,rt;W>Q;Q++)if((D||Q in j)&&(q=j[Q],rt=K(q,Q,U),I))if(R)A(J,Q,rt);else if(rt)switch(I){case 3:return!0;case 5:return q;case 6:return Q;case 2:A(J,tt++,q)}else switch(I){case 4:return!1;case 7:A(J,tt++,q)}return M?-1:F||L?L:J}};S.exports={forEach:C(0),map:C(1),filter:C(2),some:C(3),every:C(4),find:C(5),findIndex:C(6),filterReject:C(7)}}),(function(S,P,i){"use strict";var g=i(85),p=i(30),m=i(9),y=g(g.bind);S.exports=function(T,A){return p(T),A===void 0?T:m?y(T,A):function(){return T.apply(A,arguments)}}}),(function(S,P,i){"use strict";var g=i(15),p=i(14);S.exports=function(m){if(g(m)==="Function")return p(m)}}),(function(S,P,i){"use strict";var g=i(87);S.exports=function(p,m){return new(g(p))(m===0?0:m)}}),(function(S,P,i){"use strict";var g=i(88),p=i(89),m=i(20),y=i(33),T=y("species"),A=Array;S.exports=function(C){var I;return g(C)&&(I=C.constructor,p(I)&&(I===A||g(I.prototype))?I=void 0:m(I)&&(I=I[T],I===null&&(I=void 0))),I===void 0?A:I}}),(function(S,P,i){"use strict";var g=i(15);S.exports=Array.isArray||function(m){return g(m)==="Array"}}),(function(S,P,i){"use strict";var g=i(14),p=i(7),m=i(21),y=i(69),T=i(23),A=i(50),C=function(){},I=T("Reflect","construct"),R=/^\s*(?:class|function)\b/,O=g(R.exec),F=!R.test(C),L=function(D){if(!m(D))return!1;try{return I(C,[],D),!0}catch(z){return!1}},M=function(D){if(!m(D))return!1;switch(y(D)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F||!!O(R,A(D))}catch(z){return!0}};M.sham=!0,S.exports=!I||p(function(){var $;return L(L.call)||!L(Object)||!L(function(){$=!0})||$})?M:L}),(function(S,P,i){"use strict";var g=i(6),p=i(44),m=i(11);S.exports=function(y,T,A){g?p.f(y,T,m(0,A)):y[T]=A}}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(38),y=i(68),T=i(34),A=i(92),C=T("string-to-symbol-registry"),I=T("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!A},{for:function(R){var O=y(R);if(m(C,O))return C[O];var F=p("Symbol")(O);return C[O]=F,I[F]=O,F}})}),(function(S,P,i){"use strict";var g=i(26);S.exports=g&&!!Symbol.for&&!!Symbol.keyFor}),(function(S,P,i){"use strict";var g=i(3),p=i(38),m=i(22),y=i(31),T=i(34),A=i(92),C=T("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!A},{keyFor:function(R){if(!m(R))throw new TypeError(y(R)+" is not a symbol");if(p(C,R))return C[R]}})}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(8),y=i(14),T=i(7),A=i(88),C=i(21),I=i(20),R=i(71),O=i(95),F=i(22),L=i(15),M=i(96),$=i(59).includes,D=i(38),z=i(68),H=i(97),X=i(40),U=i(26),j=i(98),W=String,K=TypeError,Q=p("JSON","stringify"),tt=p("BigInt"),J=y("".valueOf),q=y((!0).valueOf),rt=tt&&y(tt.prototype.valueOf),ft=y(/./.exec),ct=y("".charAt),ut=y("".charCodeAt),gt=y("".replace),pt=y("".slice),mt=y([].push),St=y([].pop),Ct=y(1.1.toString),wt=/[\uD800-\uDFFF]/g,jt=/^[\uD800-\uDBFF]$/,Ut=/^[\uDC00-\uDFFF]$/,yt=/^\d+$/,Tt=X(),Ot=X(),Bt=X(),Kt=Tt.length,qt=Ot.length,$t=!U||T(function(){var Ft=p("Symbol")("stringify detection");return Q([Ft])!=="[null]"||Q({a:Ft})!=="{}"||Q(Object(Ft))!=="{}"}),Jt=T(function(){return Q("\uDF06\uD834")!=='"\\udf06\\ud834"'||Q("\uDEAD")!=='"\\udead"'}),te=j?p("JSON","isRawJSON"):O,de=$t?function(Ft,Xt,Qt){return Q(Ft,function(Re,Wt){var Ht=m(Xt,this,Re,Wt);if(!F(Ht))return Ht},Qt)}:Q,ue=function(Ft,Xt,Qt){var Re=ct(Qt,Xt-1),Wt=ct(Qt,Xt+1);return ft(jt,Ft)&&!ft(Ut,Wt)||ft(Ut,Ft)&&!ft(jt,Re)?"\\u"+Ct(ut(Ft,0),16):Ft},he=function(Ft){if(A(Ft)){for(var Xt=Ft.length,Qt=[],Re=R(null),Wt=0;Wt<Xt;Wt++){var Ht=Ft[Wt],ie;if(typeof Ht=="string")ie=Ht;else if(typeof Ht=="number"||L(Ht)==="Number"||L(Ht)==="String")ie=z(Ht);else continue;D(Re,ie)||(Re[ie]=!0,mt(Qt,ie))}return Qt}},Ee=function(Ft,Xt){try{return Ft(Xt),!0}catch(Qt){return!1}},$e=function(Ft){var Xt=L(Ft);return Xt==="Number"&&Ee(M,Ft)||Xt==="String"&&Ee(J,Ft)||Xt==="Boolean"&&Ee(q,Ft)||!!rt&&Xt==="BigInt"&&Ee(rt,Ft)},Ie=function(Ft){if(!I(Ft)||C(Ft)||A(Ft))return!1;try{return!$e(Ft)}catch(Xt){return!0}},oe=function(Ft,Xt){return{toJSON:function(){var Qt=Ft[Xt];if(I(Qt)||typeof Qt=="bigint"){var Re=Qt.toJSON;C(Re)&&(Qt=m(Re,Qt,Xt))}return Qt}}},ye=function(Ft){for(var Xt=0,Qt=Ft.length;Xt<Qt;Xt++)if(ft(yt,Ft[Xt]))return Ot;return""},ke=function(Ft,Xt,Qt){for(var Re=R(null),Wt=0,Ht=Xt.length;Wt<Ht;Wt++){var ie=Xt[Wt];Re[Qt+ie]=oe(Ft,ie)}return Re[Bt]=null,Re};Q&&g({target:"JSON",stat:!0,arity:3,forced:$t||Jt||!j},{stringify:function(Xt,Qt,Re){var Wt=C(Qt)?Qt:void 0,Ht=Wt?void 0:he(Qt),ie=Ht&&ye(Ht),fe=[],me=[],Qe=[],vt,Mt=!1,It=!0,Dt=de(Xt,function(se,Ue){if(se=W(se),Ht){if(se===Bt){St(me),vt=St(Qe);return}if(It)It=!1;else if(this!==vt&&!A(this)&&!$(Ht,se))return}else Wt&&(Ue=m(Wt,this,se,Ue));if(te(Ue))return j?Ue:(Mt=!0,Tt+(mt(fe,Ue.rawJSON)-1));if(Ht&&Ie(Ue)){if($(me,Ue))throw new K("Converting circular structure to JSON");var Ze=ke(Ue,Ht,ie);return mt(me,Ue),mt(Qe,vt),vt=Ze,ie&&(Mt=!0),Ze}return Ue},Re);if(typeof Dt!="string"||(Jt&&(Dt=gt(Dt,wt,ue)),!Mt))return Dt;for(var zt="",Nt=Dt.length,le=0;le<Nt;le++){var Te=ct(Dt,le);if(Te==='"'){var Ce=H(Dt,++le).end-1,Fe=pt(Dt,le,Ce);pt(Fe,0,Kt)===Tt?zt+=fe[pt(Fe,Kt)]:pt(Fe,0,qt)===Ot?zt+='"'+pt(Fe,qt)+'"':zt+='"'+Fe+'"',le=Ce}else zt+=Te}return zt}})}),(function(S,P,i){"use strict";var g=i(20),p=i(51).get;S.exports=function(y){if(!g(y))return!1;var T=p(y);return!!T&&T.type==="RawJSON"}}),(function(S,P,i){"use strict";var g=i(14);S.exports=g(1.1.valueOf)}),(function(S,P,i){"use strict";var g=i(14),p=i(38),m=SyntaxError,y=parseInt,T=String.fromCharCode,A=g("".charAt),C=g("".slice),I=g(/./.exec),R={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
25
|
+
`,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,F=/^[\u0000-\u001F]$/;S.exports=function(L,M){for(var $=!0,D="";M<L.length;){var z=A(L,M);if(z==="\\"){var H=C(L,M,M+2);if(p(R,H))D+=R[H],M+=2;else if(H==="\\u"){M+=2;var X=C(L,M,M+4);if(!I(O,X))throw new m("Bad Unicode escape at: "+M);D+=T(y(X,16)),M+=4}else throw new m('Unknown escape sequence: "'+H+'"')}else if(z==='"'){$=!1,M++;break}else{if(I(F,z))throw new m("Bad control character in string literal at: "+M);D+=z,M++}}if($)throw new m("Unterminated string at: "+M);return{value:D,end:M}}}),(function(S,P,i){"use strict";var g=i(7);S.exports=!g(function(){var p="9007199254740993",m=JSON.rawJSON(p);return!JSON.isRawJSON(m)||JSON.stringify(m)!==p})}),(function(S,P,i){"use strict";var g=i(3),p=i(26),m=i(7),y=i(66),T=i(39),A=!p||m(function(){y.f(1)});g({target:"Object",stat:!0,forced:A},{getOwnPropertySymbols:function(I){var R=y.f;return R?R(T(I)):[]}})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(4),y=i(8),T=i(14),A=i(38),C=i(21),I=i(24),R=i(68),O=i(77),F=i(55),L=m.Symbol,M=L&&L.prototype;if(p&&C(L)&&(!("description"in M)||L().description!==void 0)){var $={},D=function(){var tt=arguments.length<1||arguments[0]===void 0?void 0:R(arguments[0]),J=I(M,this)?new L(tt):tt===void 0?L():L(tt);return tt===""&&($[J]=!0),J};F(D,L);var z=D.for;D.for=function(Q){var tt=R(Q),J=y(z,this,tt);return tt===""&&($[J]=!0),J},D.prototype=M,M.constructor=D;var H=String(L("description detection"))==="Symbol(description detection)",X=T(M.valueOf),U=T(M.toString),j=/^Symbol\((.*)\)[^)]+$/,W=T("".replace),K=T("".slice);O(M,"description",{configurable:!0,get:function(){var tt=X(this);if(A($,tt))return"";var J=U(tt),q=H?K(J,7,-1):W(J,j,"$1");return q===""?void 0:q}}),g({global:!0,constructor:!0,forced:!0},{Symbol:D})}}),(function(S,P,i){"use strict";var g=i(4),p=i(79),m=i(44).f,y=i(5).f,T=g.Symbol;if(p("asyncDispose"),T){var A=y(T,"asyncDispose");A.enumerable&&A.configurable&&A.writable&&m(T,"asyncDispose",{value:A.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(S,P,i){"use strict";var g=i(79);g("asyncIterator")}),(function(S,P,i){"use strict";var g=i(4),p=i(79),m=i(44).f,y=i(5).f,T=g.Symbol;if(p("dispose"),T){var A=y(T,"dispose");A.enumerable&&A.configurable&&A.writable&&m(T,"dispose",{value:A.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(S,P,i){"use strict";var g=i(79);g("hasInstance")}),(function(S,P,i){"use strict";var g=i(79);g("isConcatSpreadable")}),(function(S,P,i){"use strict";var g=i(79);g("iterator")}),(function(S,P,i){"use strict";var g=i(79);g("match")}),(function(S,P,i){"use strict";var g=i(79);g("matchAll")}),(function(S,P,i){"use strict";var g=i(79);g("replace")}),(function(S,P,i){"use strict";var g=i(79);g("search")}),(function(S,P,i){"use strict";var g=i(79);g("species")}),(function(S,P,i){"use strict";var g=i(79);g("split")}),(function(S,P,i){"use strict";var g=i(79),p=i(81);g("toPrimitive"),p()}),(function(S,P,i){"use strict";var g=i(23),p=i(79),m=i(82);p("toStringTag"),m(g("Symbol"),"Symbol")}),(function(S,P,i){"use strict";var g=i(79);g("unscopables")}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(117),y=i(118),T="WebAssembly",A=p[T],C=new Error("e",{cause:7}).cause!==7,I=function(O,F){var L={};L[O]=y(O,F,C),g({global:!0,constructor:!0,arity:1,forced:C},L)},R=function(O,F){if(A&&A[O]){var L={};L[O]=y(T+"."+O,F,C),g({target:T,stat:!0,constructor:!0,arity:1,forced:C},L)}};I("Error",function(O){return function(L){return m(O,this,arguments)}}),I("EvalError",function(O){return function(L){return m(O,this,arguments)}}),I("RangeError",function(O){return function(L){return m(O,this,arguments)}}),I("ReferenceError",function(O){return function(L){return m(O,this,arguments)}}),I("SyntaxError",function(O){return function(L){return m(O,this,arguments)}}),I("TypeError",function(O){return function(L){return m(O,this,arguments)}}),I("URIError",function(O){return function(L){return m(O,this,arguments)}}),R("CompileError",function(O){return function(L){return m(O,this,arguments)}}),R("LinkError",function(O){return function(L){return m(O,this,arguments)}}),R("RuntimeError",function(O){return function(L){return m(O,this,arguments)}})}),(function(S,P,i){"use strict";var g=i(9),p=Function.prototype,m=p.apply,y=p.call;S.exports=typeof Reflect=="object"&&Reflect.apply||(g?y.bind(m):function(){return y.apply(m,arguments)})}),(function(S,P,i){"use strict";var g=i(23),p=i(38),m=i(43),y=i(24),T=i(119),A=i(55),C=i(123),I=i(124),R=i(125),O=i(126),F=i(127),L=i(6),M=i(36);S.exports=function($,D,z,H){var X="stackTraceLimit",U=H?2:1,j=$.split("."),W=j[j.length-1],K=g.apply(null,j);if(K){var Q=K.prototype;if(!M&&p(Q,"cause")&&delete Q.cause,!z)return K;var tt=g("Error"),J=D(function(q,rt){var ft=R(H?rt:q,void 0),ct=H?new K(q):new K;return ft!==void 0&&m(ct,"message",ft),F(ct,J,ct.stack,2),this&&y(Q,this)&&I(ct,this,J),arguments.length>U&&O(ct,arguments[U]),ct});if(J.prototype=Q,W!=="Error"?T?T(J,tt):A(J,tt,{name:!0}):L&&X in K&&(C(J,K,X),C(J,K,"prepareStackTrace")),A(J,K),!M)try{Q.name!==W&&m(Q,"name",W),Q.constructor=J}catch(q){}return J}}}),(function(S,P,i){"use strict";var g=i(120),p=i(20),m=i(16),y=i(121);S.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var T=!1,A={},C;try{C=g(Object.prototype,"__proto__","set"),C(A,[]),T=A instanceof Array}catch(I){}return function(R,O){return m(R),y(O),p(R)&&(T?C(R,O):R.__proto__=O),R}})():void 0)}),(function(S,P,i){"use strict";var g=i(14),p=i(30);S.exports=function(m,y,T){try{return g(p(Object.getOwnPropertyDescriptor(m,y)[T]))}catch(A){}}}),(function(S,P,i){"use strict";var g=i(122),p=String,m=TypeError;S.exports=function(y){if(g(y))return y;throw new m("Can't set "+p(y)+" as a prototype")}}),(function(S,P,i){"use strict";var g=i(20);S.exports=function(p){return g(p)||p===null}}),(function(S,P,i){"use strict";var g=i(44).f;S.exports=function(p,m,y){y in p||g(p,y,{configurable:!0,get:function(){return m[y]},set:function(T){m[y]=T}})}}),(function(S,P,i){"use strict";var g=i(21),p=i(20),m=i(119);S.exports=function(y,T,A){var C,I;return m&&g(C=T.constructor)&&C!==A&&p(I=C.prototype)&&I!==A.prototype&&m(y,I),y}}),(function(S,P,i){"use strict";var g=i(68);S.exports=function(p,m){return p===void 0?arguments.length<2?"":m:g(p)}}),(function(S,P,i){"use strict";var g=i(20),p=i(43);S.exports=function(m,y){g(y)&&"cause"in y&&p(m,"cause",y.cause)}}),(function(S,P,i){"use strict";var g=i(43),p=i(128),m=i(129),y=Error.captureStackTrace;S.exports=function(T,A,C,I){m&&(y?y(T,A):g(T,"stack",p(C,I)))}}),(function(S,P,i){"use strict";var g=i(14),p=Error,m=g("".replace),y=(function(C){return String(new p(C).stack)})("zxcasd"),T=/\n\s*at [^:]*:[^\n]*/,A=T.test(y);S.exports=function(C,I){if(A&&typeof C=="string"&&!p.prepareStackTrace)for(;I--;)C=m(C,T,"");return C}}),(function(S,P,i){"use strict";var g=i(7),p=i(11);S.exports=!g(function(){var m=new Error("a");return"stack"in m?(Object.defineProperty(m,"stack",p(1,7)),m.stack!==7):!0})}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(20),y=i(69),T=i(7),A="Error",C="DOMException",I=Object.setPrototypeOf||{}.__proto__,R=p(C),O=Error,F=O.isError,L=!F||!I||T(function(){return R&&!F(new R(C))||!F(new O(A,{cause:function(){}}))||F(p("Object","create")(O.prototype))});g({target:"Error",stat:!0,sham:!0,forced:L},{isError:function($){if(!m($))return!1;var D=y($);return D===A||D===C}})}),(function(S,P,i){"use strict";var g=i(47),p=i(132),m=Error.prototype;m.toString!==p&&g(m,"toString",p)}),(function(S,P,i){"use strict";var g=i(6),p=i(7),m=i(46),y=i(125),T=Error.prototype.toString,A=p(function(){if(g){var C=Object.create(Object.defineProperty({},"name",{get:function(){return this===C}}));if(T.call(C)!=="true")return!0}return T.call({message:1,name:2})!=="2: 1"||T.call({})!=="Error"});S.exports=A?function(){var I=m(this),R=y(I.name,"Error"),O=y(I.message);return R?O?R+": "+O:R:O}:T}),(function(S,P,i){"use strict";i(134)}),(function(S,P,i){"use strict";var g=i(3),p=i(24),m=i(135),y=i(119),T=i(55),A=i(71),C=i(43),I=i(11),R=i(126),O=i(127),F=i(137),L=i(125),M=i(33),$=M("toStringTag"),D=Error,z=[].push,H=function(j,W){var K=p(X,this),Q;y?Q=y(new D,K?m(this):X):(Q=K?this:A(X),C(Q,$,"Error")),W!==void 0&&C(Q,"message",L(W)),O(Q,H,Q.stack,1),arguments.length>2&&R(Q,arguments[2]);var tt=[];return F(j,z,{that:tt}),C(Q,"errors",tt),Q};y?y(H,D):T(H,D,{name:!0});var X=H.prototype=A(D.prototype,{constructor:I(1,H),message:I(1,""),name:I(1,"AggregateError")});g({global:!0,constructor:!0,arity:2},{AggregateError:H})}),(function(S,P,i){"use strict";var g=i(38),p=i(21),m=i(39),y=i(53),T=i(136),A=y("IE_PROTO"),C=Object,I=C.prototype;S.exports=T?C.getPrototypeOf:function(R){var O=m(R);if(g(O,A))return O[A];var F=O.constructor;return p(F)&&O instanceof F?F.prototype:O instanceof C?I:null}}),(function(S,P,i){"use strict";var g=i(7);S.exports=!g(function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype})}),(function(S,P,i){"use strict";var g=i(84),p=i(8),m=i(46),y=i(31),T=i(138),A=i(63),C=i(24),I=i(140),R=i(141),O=i(142),F=TypeError,L=function($,D){this.stopped=$,this.result=D},M=L.prototype;S.exports=function($,D,z){var H=z&&z.that,X=!!(z&&z.AS_ENTRIES),U=!!(z&&z.IS_RECORD),j=!!(z&&z.IS_ITERATOR),W=!!(z&&z.INTERRUPTED),K=g(D,H),Q,tt,J,q,rt,ft,ct,ut=function(mt){var St=Q;return Q=void 0,St&&O(St,"normal"),new L(!0,mt)},gt=function(mt){return X?(m(mt),W?K(mt[0],mt[1],ut):K(mt[0],mt[1])):W?K(mt,ut):K(mt)};if(U)Q=$.iterator;else if(j)Q=$;else{if(tt=R($),!tt)throw new F(y($)+" is not iterable");if(T(tt)){for(J=0,q=A($);q>J;J++)if(rt=gt($[J]),rt&&C(M,rt))return rt;return new L(!1)}Q=I($,tt)}for(ft=U?$.next:Q.next;!(ct=p(ft,Q)).done;){var pt=ct.value;try{rt=gt(pt)}catch(mt){if(Q)O(Q,"throw",mt);else throw mt}if(typeof rt=="object"&&rt&&C(M,rt))return rt}return new L(!1)}}),(function(S,P,i){"use strict";var g=i(33),p=i(139),m=g("iterator"),y=Array.prototype;S.exports=function(T){return T!==void 0&&(p.Array===T||y[m]===T)}}),(function(S){"use strict";S.exports=Object.create?Object.create(null):{}}),(function(S,P,i){"use strict";var g=i(8),p=i(21),m=i(46),y=i(31),T=i(141),A=TypeError;S.exports=function(C,I){var R=arguments.length<2?T(C):I;if(p(R))return m(g(R,C));throw new A(y(C)+" is not iterable")}}),(function(S,P,i){"use strict";var g=i(15),p=i(17),m=i(29),y=i(33),T=y("iterator"),A=Array.prototype;S.exports=function(C){if(!p(C))return m(C,T)||m(C,"@@iterator")||(g(C)==="Arguments"?A[T]:void 0)}}),(function(S,P,i){"use strict";var g=i(8),p=i(46),m=i(29);S.exports=function(y,T,A){var C,I;p(y);try{if(C=m(y,"return"),!C){if(T==="throw")throw A;return A}C=g(C,y)}catch(R){I=!0,C=R}if(T==="throw")throw A;if(I)throw C;return p(C),A}}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(117),y=i(7),T=i(118),A="AggregateError",C=p(A),I=!y(function(){return C([1]).errors[0]!==1})&&y(function(){return C([1],A,{cause:7}).cause!==7});g({global:!0,constructor:!0,arity:2,forced:I},{AggregateError:T(A,function(R){return function(F,L){return m(R,this,arguments)}},I,!0)})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(24),y=i(135),T=i(119),A=i(55),C=i(71),I=i(43),R=i(11),O=i(127),F=i(125),L=i(33),M=i(7),$=i(36),D=p.SuppressedError,z=L("toStringTag"),H=Error,X=!!D&&D.length!==3,U=!!D&&M(function(){return new D(1,2,3,{cause:4}).cause===4}),j=X||U,W=function(tt,J,q){var rt=m(K,this),ft;return T?ft=j&&(!rt||y(this)===K)?new D:T(new H,rt?y(this):K):(ft=rt?this:C(K),I(ft,z,"Error")),q!==void 0&&I(ft,"message",F(q)),O(ft,W,ft.stack,1),I(ft,"error",tt),I(ft,"suppressed",J),ft};T?T(W,H):A(W,H,{name:!0});var K=W.prototype=j?D.prototype:C(H.prototype,{constructor:R(1,W),message:R(1,""),name:R(1,"SuppressedError")});j&&!$&&(K.constructor=W),g({global:!0,constructor:!0,arity:3,forced:j},{SuppressedError:W})}),(function(S,P,i){"use strict";var g=i(3),p=i(39),m=i(63),y=i(61),T=i(146);g({target:"Array",proto:!0},{at:function(C){var I=p(this),R=m(I),O=y(C),F=O>=0?O:R+O;return F<0||F>=R?void 0:I[F]}}),T("at")}),(function(S,P,i){"use strict";var g=i(33),p=i(71),m=i(44).f,y=g("unscopables"),T=Array.prototype;T[y]===void 0&&m(T,y,{configurable:!0,value:p(null)}),S.exports=function(A){T[y][A]=!0}}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(88),y=i(20),T=i(39),A=i(63),C=i(148),I=i(90),R=i(149),O=i(86),F=i(150),L=i(33),M=i(27),$=L("isConcatSpreadable"),D=M>=51||!p(function(){var X=[];return X[$]=!1,X.concat()[0]!==X}),z=function(X){if(!y(X))return!1;var U=X[$];return U!==void 0?!!U:m(X)},H=!D||!F("concat");g({target:"Array",proto:!0,arity:1,forced:H},{concat:function(U){var j=T(this),W=O(j,0),K=0,Q,tt,J,q,rt;for(Q=-1,J=arguments.length;Q<J;Q++)if(rt=Q===-1?j:arguments[Q],z(rt))for(q=A(rt),C(K+q),tt=0;tt<q;tt++,K++)tt in rt&&I(W,K,rt[tt]);else C(K+1),I(W,K++,rt);return R(W,K),W}})}),(function(S){"use strict";var P=TypeError,i=9007199254740991;S.exports=function(g){if(g>i)throw new P("Maximum allowed index exceeded");return g}}),(function(S,P,i){"use strict";var g=i(6),p=i(88),m=TypeError,y=Object.getOwnPropertyDescriptor,T=g&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(A){return A instanceof TypeError}})();S.exports=T?function(A,C){if(p(A)&&!y(A,"length").writable)throw new m("Cannot set read only .length");return A.length=C}:function(A,C){return A.length=C}}),(function(S,P,i){"use strict";var g=i(7),p=i(33),m=i(27),y=p("species");S.exports=function(T){return m>=51||!g(function(){var A=[],C=A.constructor={};return C[y]=function(){return{foo:1}},A[T](Boolean).foo!==1})}}),(function(S,P,i){"use strict";var g=i(3),p=i(152),m=i(146);g({target:"Array",proto:!0},{copyWithin:p}),m("copyWithin")}),(function(S,P,i){"use strict";var g=i(39),p=i(60),m=i(63),y=i(153),T=Math.min;S.exports=[].copyWithin||function(C,I){var R=g(this),O=m(R),F=p(C,O),L=p(I,O),M=arguments.length>2?arguments[2]:void 0,$=T((M===void 0?O:p(M,O))-L,O-F),D=1;for(L<F&&F<L+$&&(D=-1,L+=$-1,F+=$-1);$-- >0;)L in R?R[F]=R[L]:y(R,F),F+=D,L+=D;return R}}),(function(S,P,i){"use strict";var g=i(31),p=TypeError;S.exports=function(m,y){if(!delete m[y])throw new p("Cannot delete property "+g(y)+" of "+g(m))}}),(function(S,P,i){"use strict";var g=i(3),p=i(83).every,m=i(155),y=m("every");g({target:"Array",proto:!0,forced:!y},{every:function(A){return p(this,A,arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(7);S.exports=function(p,m){var y=[][p];return!!y&&g(function(){y.call(null,m||function(){return 1},1)})}}),(function(S,P,i){"use strict";var g=i(3),p=i(157),m=i(146);g({target:"Array",proto:!0},{fill:p}),m("fill")}),(function(S,P,i){"use strict";var g=i(39),p=i(60),m=i(63);S.exports=[].fill||function(T){for(var A=g(this),C=m(A),I=arguments.length,R=p(I>1?arguments[1]:void 0,C),O=I>2?arguments[2]:void 0,F=O===void 0?C:p(O,C);F>R;)A[R++]=T;return A}}),(function(S,P,i){"use strict";var g=i(3),p=i(83).filter,m=i(150),y=m("filter");g({target:"Array",proto:!0,forced:!y},{filter:function(A){return p(this,A,arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(83).find,m=i(146),y="find",T=!0;y in[]&&Array(1)[y](function(){T=!1}),g({target:"Array",proto:!0,forced:T},{find:function(C){return p(this,C,arguments.length>1?arguments[1]:void 0)}}),m(y)}),(function(S,P,i){"use strict";var g=i(3),p=i(83).findIndex,m=i(146),y="findIndex",T=!0;y in[]&&Array(1)[y](function(){T=!1}),g({target:"Array",proto:!0,forced:T},{findIndex:function(C){return p(this,C,arguments.length>1?arguments[1]:void 0)}}),m(y)}),(function(S,P,i){"use strict";var g=i(3),p=i(162).findLast,m=i(146);g({target:"Array",proto:!0},{findLast:function(T){return p(this,T,arguments.length>1?arguments[1]:void 0)}}),m("findLast")}),(function(S,P,i){"use strict";var g=i(84),p=i(13),m=i(39),y=i(63),T=function(A){var C=A===1;return function(I,R,O){for(var F=m(I),L=p(F),M=y(L),$=g(R,O),D,z;M-- >0;)if(D=L[M],z=$(D,M,F),z)switch(A){case 0:return D;case 1:return M}return C?-1:void 0}};S.exports={findLast:T(0),findLastIndex:T(1)}}),(function(S,P,i){"use strict";var g=i(3),p=i(162).findLastIndex,m=i(146);g({target:"Array",proto:!0},{findLastIndex:function(T){return p(this,T,arguments.length>1?arguments[1]:void 0)}}),m("findLastIndex")}),(function(S,P,i){"use strict";var g=i(3),p=i(165),m=i(39),y=i(63),T=i(61),A=i(86);g({target:"Array",proto:!0},{flat:function(){var I=arguments.length?arguments[0]:void 0,R=m(this),O=y(R),F=I===void 0?1:T(I),L=A(R,0);return p(L,R,R,O,0,F),L}})}),(function(S,P,i){"use strict";var g=i(88),p=i(63),m=i(148),y=i(84),T=i(90),A=function(C,I,R,O,F,L,M,$){for(var D=F,z=0,H=M?y(M,$):!1,X,U;z<O;)z in R&&(X=H?H(R[z],z,I):R[z],L>0&&g(X)?(U=p(X),D=A(C,I,X,U,D,L-1)-1):(m(D+1),T(C,D,X)),D++),z++;return D};S.exports=A}),(function(S,P,i){"use strict";var g=i(3),p=i(165),m=i(30),y=i(39),T=i(63),A=i(86);g({target:"Array",proto:!0},{flatMap:function(I){var R=y(this),O=T(R),F;return m(I),F=A(R,0),p(F,R,R,O,0,1,I,arguments.length>1?arguments[1]:void 0),F}})}),(function(S,P,i){"use strict";var g=i(3),p=i(168);g({target:"Array",proto:!0,forced:[].forEach!==p},{forEach:p})}),(function(S,P,i){"use strict";var g=i(83).forEach,p=i(155),m=p("forEach");S.exports=m?[].forEach:function(T){return g(this,T,arguments.length>1?arguments[1]:void 0)}}),(function(S,P,i){"use strict";var g=i(3),p=i(170),m=i(172),y=!m(function(T){Array.from(T)});g({target:"Array",stat:!0,forced:y},{from:p})}),(function(S,P,i){"use strict";var g=i(84),p=i(8),m=i(39),y=i(171),T=i(138),A=i(89),C=i(63),I=i(90),R=i(149),O=i(140),F=i(141),L=i(142),M=i(148),$=Array;S.exports=function(z){var H=A(this),X=arguments.length,U=X>1?arguments[1]:void 0,j=U!==void 0;j&&(U=g(U,X>2?arguments[2]:void 0));var W=m(z),K=F(W),Q=0,tt,J,q,rt,ft,ct;if(K&&!(this===$&&T(K)))for(J=H?new this:[],rt=O(W,K),ft=rt.next;!(q=p(ft,rt)).done;Q++){try{M(Q)}catch(ut){L(rt,"throw",ut)}ct=j?y(rt,U,[q.value,Q],!0):q.value;try{I(J,Q,ct)}catch(ut){L(rt,"throw",ut)}}else for(tt=C(W),J=H?new this(tt):$(tt);tt>Q;Q++)ct=j?U(W[Q],Q):W[Q],I(J,Q,ct);return R(J,Q),J}}),(function(S,P,i){"use strict";var g=i(46),p=i(142);S.exports=function(m,y,T,A){try{return A?y(g(T)[0],T[1]):y(T)}catch(C){p(m,"throw",C)}}}),(function(S,P,i){"use strict";var g=i(33),p=g("iterator"),m=!1;try{var y=0,T={next:function(){return{done:!!y++}},return:function(){m=!0}};T[p]=function(){return this},Array.from(T,function(){throw 2})}catch(A){}S.exports=function(A,C){try{if(!C&&!m)return!1}catch(O){return!1}var I=!1;try{var R={};R[p]=function(){return{next:function(){return{done:I=!0}}}},A(R)}catch(O){}return I}}),(function(S,P,i){"use strict";var g=i(3),p=i(59).includes,m=i(7),y=i(146),T=m(function(){return!Array(1).includes()}),A=m(function(){return[,1].includes(void 0,1)});g({target:"Array",proto:!0,forced:T||A},{includes:function(I){return p(this,I,arguments.length>1?arguments[1]:void 0)}}),y("includes")}),(function(S,P,i){"use strict";var g=i(3),p=i(85),m=i(59).indexOf,y=i(155),T=p([].indexOf),A=!!T&&1/T([1],1,-0)<0,C=A||!y("indexOf");g({target:"Array",proto:!0,forced:C},{indexOf:function(R){var O=arguments.length>1?arguments[1]:void 0;return A?T(this,R,O)||0:m(this,R,O)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(88);g({target:"Array",stat:!0},{isArray:p})}),(function(S,P,i){"use strict";var g=i(12),p=i(146),m=i(139),y=i(51),T=i(44).f,A=i(177),C=i(180),I=i(36),R=i(6),O="Array Iterator",F=y.set,L=y.getterFor(O);S.exports=A(Array,"Array",function($,D){F(this,{type:O,target:g($),index:0,kind:D})},function(){var $=L(this),D=$.target,z=$.index++;if(!D||z>=D.length)return $.target=null,C(void 0,!0);switch($.kind){case"keys":return C(z,!1);case"values":return C(D[z],!1)}return C([z,D[z]],!1)},"values");var M=m.Arguments=m.Array;if(p("keys"),p("values"),p("entries"),!I&&R&&M.name!=="values")try{T(M,"name",{value:"values"})}catch($){}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(36),y=i(49),T=i(21),A=i(178),C=i(135),I=i(119),R=i(82),O=i(43),F=i(47),L=i(33),M=i(139),$=i(179),D=y.PROPER,z=y.CONFIGURABLE,H=$.IteratorPrototype,X=$.BUGGY_SAFARI_ITERATORS,U=L("iterator"),j="keys",W="values",K="entries",Q=function(){return this};S.exports=function(tt,J,q,rt,ft,ct,ut){A(q,J,rt);var gt=function(Ot){if(Ot===ft&&wt)return wt;if(!X&&Ot&&Ot in St)return St[Ot];switch(Ot){case j:return function(){return new q(this,Ot)};case W:return function(){return new q(this,Ot)};case K:return function(){return new q(this,Ot)}}return function(){return new q(this)}},pt=J+" Iterator",mt=!1,St=tt.prototype,Ct=St[U]||St["@@iterator"]||ft&&St[ft],wt=!X&&Ct||gt(ft),jt=J==="Array"&&St.entries||Ct,Ut,yt,Tt;if(jt&&(Ut=C(jt.call(new tt)),Ut!==Object.prototype&&Ut.next&&(!m&&C(Ut)!==H&&(I?I(Ut,H):T(Ut[U])||F(Ut,U,Q)),R(Ut,pt,!0,!0),m&&(M[pt]=Q))),D&&ft===W&&Ct&&Ct.name!==W&&(!m&&z?O(St,"name",W):(mt=!0,wt=function(){return p(Ct,this)})),ft)if(yt={values:gt(W),keys:ct?wt:gt(j),entries:gt(K)},ut)for(Tt in yt)(X||mt||!(Tt in St))&&F(St,Tt,yt[Tt]);else g({target:J,proto:!0,forced:X||mt},yt);return(!m||ut)&&St[U]!==wt&&F(St,U,wt,{name:ft}),M[J]=wt,yt}}),(function(S,P,i){"use strict";var g=i(179).IteratorPrototype,p=i(71),m=i(11),y=i(82),T=i(139),A=function(){return this};S.exports=function(C,I,R,O){var F=I+" Iterator";return C.prototype=p(g,{next:m(+!O,R)}),y(C,F,!1,!0),T[F]=A,C}}),(function(S,P,i){"use strict";var g=i(7),p=i(21),m=i(20),y=i(71),T=i(135),A=i(47),C=i(33),I=i(36),R=C("iterator"),O=!1,F,L,M;[].keys&&(M=[].keys(),"next"in M?(L=T(T(M)),L!==Object.prototype&&(F=L)):O=!0);var $=!m(F)||g(function(){var D={};return F[R].call(D)!==D});$?F={}:I&&(F=y(F)),p(F[R])||A(F,R,function(){return this}),S.exports={IteratorPrototype:F,BUGGY_SAFARI_ITERATORS:O}}),(function(S){"use strict";S.exports=function(P,i){return{value:P,done:i}}}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(13),y=i(12),T=i(155),A=p([].join),C=m!==Object,I=C||!T("join",",");g({target:"Array",proto:!0,forced:I},{join:function(O){return A(y(this),O===void 0?",":O)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(183);g({target:"Array",proto:!0,forced:p!==[].lastIndexOf},{lastIndexOf:p})}),(function(S,P,i){"use strict";var g=i(117),p=i(12),m=i(61),y=i(63),T=i(155),A=Math.min,C=[].lastIndexOf,I=!!C&&1/[1].lastIndexOf(1,-0)<0,R=T("lastIndexOf"),O=I||!R;S.exports=O?function(L){if(I)return g(C,this,arguments)||0;var M=p(this),$=y(M);if($===0)return-1;var D=$-1;for(arguments.length>1&&(D=A(D,m(arguments[1]))),D<0&&(D=$+D);D>=0;D--)if(D in M&&M[D]===L)return D||0;return-1}:C}),(function(S,P,i){"use strict";var g=i(3),p=i(83).map,m=i(150),y=m("map");g({target:"Array",proto:!0,forced:!y},{map:function(A){return p(this,A,arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(89),y=i(90),T=i(149),A=Array,C=p(function(){function I(){}return!(A.of.call(I)instanceof I)});g({target:"Array",stat:!0,forced:C},{of:function(){for(var R=0,O=arguments.length,F=new(m(this)?this:A)(O);O>R;)y(F,R,arguments[R++]);return T(F,O),F}})}),(function(S,P,i){"use strict";var g=i(3),p=i(39),m=i(63),y=i(149),T=i(148),A=i(7),C=A(function(){return[].push.call({length:4294967296},1)!==4294967297}),I=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(O){return O instanceof TypeError}},R=C||!I();g({target:"Array",proto:!0,arity:1,forced:R},{push:function(F){var L=p(this),M=m(L),$=arguments.length;T(M+$);for(var D=0;D<$;D++)L[M]=arguments[D],M++;return y(L,M),M}})}),(function(S,P,i){"use strict";var g=i(3),p=i(188).left,m=i(155),y=i(27),T=i(189),A=!T&&y>79&&y<83,C=A||!m("reduce");g({target:"Array",proto:!0,forced:C},{reduce:function(R){var O=arguments.length;return p(this,R,O,O>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(30),p=i(39),m=i(13),y=i(63),T=TypeError,A="Reduce of empty array with no initial value",C=function(I){return function(R,O,F,L){var M=p(R),$=m(M),D=y(M);if(g(O),D===0&&F<2)throw new T(A);var z=I?D-1:0,H=I?-1:1;if(F<2)for(;;){if(z in $){L=$[z],z+=H;break}if(z+=H,I?z<0:D<=z)throw new T(A)}for(;I?z>=0:D>z;z+=H)z in $&&(L=O(L,$[z],z,M));return L}};S.exports={left:C(!1),right:C(!0)}}),(function(S,P,i){"use strict";var g=i(190);S.exports=g==="NODE"}),(function(S,P,i){"use strict";var g=i(4),p=i(28),m=i(15),y=function(T){return p.slice(0,T.length)===T};S.exports=(function(){return y("Bun/")?"BUN":y("Cloudflare-Workers")?"CLOUDFLARE":y("Deno/")?"DENO":y("Node.js/")?"NODE":g.Bun&&typeof Bun.version=="string"?"BUN":g.Deno&&typeof Deno.version=="object"?"DENO":m(g.process)==="process"?"NODE":g.window&&g.document?"BROWSER":"REST"})()}),(function(S,P,i){"use strict";var g=i(3),p=i(188).right,m=i(155),y=i(27),T=i(189),A=!T&&y>79&&y<83,C=A||!m("reduceRight");g({target:"Array",proto:!0,forced:C},{reduceRight:function(R){return p(this,R,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(88),y=p([].reverse),T=[1,2];g({target:"Array",proto:!0,forced:String(T)===String(T.reverse())},{reverse:function(){return m(this)&&(this.length=this.length),y(this)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(88),m=i(89),y=i(20),T=i(60),A=i(63),C=i(12),I=i(90),R=i(149),O=i(33),F=i(150),L=i(76),M=F("slice"),$=O("species"),D=Array,z=Math.max;g({target:"Array",proto:!0,forced:!M},{slice:function(X,U){var j=C(this),W=A(j),K=T(X,W),Q=T(U===void 0?W:U,W),tt,J,q;if(p(j)&&(tt=j.constructor,m(tt)&&(tt===D||p(tt.prototype))?tt=void 0:y(tt)&&(tt=tt[$],tt===null&&(tt=void 0)),tt===D||tt===void 0))return L(j,K,Q);for(J=new(tt===void 0?D:tt)(z(Q-K,0)),q=0;K<Q;K++,q++)K in j&&I(J,q,j[K]);return R(J,q),J}})}),(function(S,P,i){"use strict";var g=i(3),p=i(83).some,m=i(155),y=m("some");g({target:"Array",proto:!0,forced:!y},{some:function(A){return p(this,A,arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(30),y=i(39),T=i(63),A=i(153),C=i(68),I=i(7),R=i(196),O=i(155),F=i(197),L=i(198),M=i(27),$=i(199),D=[],z=p(D.sort),H=p(D.push),X=I(function(){D.sort(void 0)}),U=I(function(){D.sort(null)}),j=O("sort"),W=!I(function(){if(M)return M<70;if(!(F&&F>3)){if(L)return!0;if($)return $<603;var tt="",J,q,rt,ft;for(J=65;J<76;J++){switch(q=String.fromCharCode(J),J){case 66:case 69:case 70:case 72:rt=3;break;case 68:case 71:rt=4;break;default:rt=2}for(ft=0;ft<47;ft++)D.push({k:q+ft,v:rt})}for(D.sort(function(ct,ut){return ut.v-ct.v}),ft=0;ft<D.length;ft++)q=D[ft].k.charAt(0),tt.charAt(tt.length-1)!==q&&(tt+=q);return tt!=="DGBEFHACIJK"}}),K=X||!U||!j||!W,Q=function(tt){return function(J,q){if(q===void 0)return-1;if(J===void 0)return 1;if(tt!==void 0)return+tt(J,q)||0;var rt=C(J),ft=C(q);return rt===ft?0:rt>ft?1:-1}};g({target:"Array",proto:!0,forced:K},{sort:function(J){J!==void 0&&m(J);var q=y(this);if(W)return J===void 0?z(q):z(q,J);var rt=[],ft=T(q),ct,ut;for(ut=0;ut<ft;ut++)ut in q&&H(rt,q[ut]);for(R(rt,Q(J)),ct=T(rt),ut=0;ut<ct;)q[ut]=rt[ut++];for(;ut<ft;)A(q,ut++);return q}})}),(function(S,P,i){"use strict";var g=i(76),p=Math.floor,m=function(y,T){var A=y.length;if(A<8)for(var C=1,I,R;C<A;){for(R=C,I=y[C];R&&T(y[R-1],I)>0;)y[R]=y[--R];R!==C++&&(y[R]=I)}else for(var O=p(A/2),F=m(g(y,0,O),T),L=m(g(y,O),T),M=F.length,$=L.length,D=0,z=0;D<M||z<$;)y[D+z]=D<M&&z<$?T(F[D],L[z])<=0?F[D++]:L[z++]:D<M?F[D++]:L[z++];return y};S.exports=m}),(function(S,P,i){"use strict";var g=i(28),p=g.match(/firefox\/(\d+)/i);S.exports=!!p&&+p[1]}),(function(S,P,i){"use strict";var g=i(28);S.exports=/MSIE|Trident/.test(g)}),(function(S,P,i){"use strict";var g=i(28),p=g.match(/AppleWebKit\/(\d+)\./);S.exports=!!p&&+p[1]}),(function(S,P,i){"use strict";var g=i(201);g("Array")}),(function(S,P,i){"use strict";var g=i(23),p=i(77),m=i(33),y=i(6),T=m("species");S.exports=function(A){var C=g(A);y&&C&&!C[T]&&p(C,T,{configurable:!0,get:function(){return this}})}}),(function(S,P,i){"use strict";var g=i(3),p=i(39),m=i(60),y=i(61),T=i(63),A=i(149),C=i(148),I=i(86),R=i(90),O=i(153),F=i(150),L=F("splice"),M=Math.max,$=Math.min;g({target:"Array",proto:!0,forced:!L},{splice:function(z,H){var X=p(this),U=T(X),j=m(z,U),W=arguments.length,K,Q,tt,J,q,rt;for(W===0?K=Q=0:W===1?(K=0,Q=U-j):(K=W-2,Q=$(M(y(H),0),U-j)),C(U+K-Q),tt=I(X,Q),J=0;J<Q;J++)q=j+J,q in X&&R(tt,J,X[q]);if(A(tt,Q),K<Q){for(J=j;J<U-Q;J++)q=J+Q,rt=J+K,q in X?X[rt]=X[q]:O(X,rt);for(J=U;J>U-Q+K;J--)O(X,J-1)}else if(K>Q)for(J=U-Q;J>j;J--)q=J+Q-1,rt=J+K-1,q in X?X[rt]=X[q]:O(X,rt);for(J=0;J<K;J++)X[J+j]=arguments[J+2];return A(X,U-Q+K),tt}})}),(function(S,P,i){"use strict";var g=i(3),p=i(63),m=i(12),y=i(90),T=i(146),A=Array;g({target:"Array",proto:!0},{toReversed:function(){for(var I=m(this),R=p(I),O=new A(R),F=0;F<R;F++)y(O,F,I[R-F-1]);return O}}),T("toReversed")}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(30),y=i(12),T=i(205),A=i(206),C=i(146),I=Array,R=p(A("Array","sort"));g({target:"Array",proto:!0},{toSorted:function(F){F!==void 0&&m(F);var L=y(this),M=T(I,L);return R(M,F)}}),C("toSorted")}),(function(S,P,i){"use strict";var g=i(63);S.exports=function(p,m,y){for(var T=0,A=arguments.length>2?y:g(m),C=new p(A);A>T;)C[T]=m[T++];return C}}),(function(S,P,i){"use strict";var g=i(4);S.exports=function(p,m){var y=g[p],T=y&&y.prototype;return T&&T[m]}}),(function(S,P,i){"use strict";var g=i(3),p=i(146),m=i(148),y=i(63),T=i(60),A=i(12),C=i(61),I=i(90),R=Array,O=Math.max,F=Math.min;g({target:"Array",proto:!0},{toSpliced:function(M,$){var D=A(this),z=y(D),H=T(M,z),X=arguments.length,U=0,j,W,K,Q;for(X===0?j=W=0:X===1?(j=0,W=z-H):(j=X-2,W=F(O(C($),0),z-H)),K=m(z+j-W),Q=R(K);U<H;U++)I(Q,U,D[U]);for(;U<H+j;U++)I(Q,U,arguments[U-H+2]);for(;U<K;U++)I(Q,U,D[U+W-j]);return Q}}),p("toSpliced")}),(function(S,P,i){"use strict";var g=i(146);g("flat")}),(function(S,P,i){"use strict";var g=i(146);g("flatMap")}),(function(S,P,i){"use strict";var g=i(3),p=i(39),m=i(63),y=i(149),T=i(153),A=i(148),C=[].unshift(0)!==1,I=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(O){return O instanceof TypeError}},R=C||!I();g({target:"Array",proto:!0,arity:1,forced:R},{unshift:function(F){var L=p(this),M=m(L),$=arguments.length;if($){A(M+$);for(var D=M;D--;){var z=D+$;D in L?L[z]=L[D]:T(L,z)}for(var H=0;H<$;H++)L[H]=arguments[H]}return y(L,M+$)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(63),m=i(61),y=i(12),T=i(90),A=Array,C=RangeError,I=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(R){return R!==4}})();g({target:"Array",proto:!0,forced:I},{with:function(R,O){var F=y(this),L=p(F),M=m(R),$=M<0?L+M:M;if($>=L||$<0)throw new C("Incorrect index");for(var D=new A(L),z=0;z<L;z++)T(D,z,z===$?O:F[z]);return D}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(213),y=i(201),T="ArrayBuffer",A=m[T],C=p[T];g({global:!0,constructor:!0,forced:C!==A},{ArrayBuffer:A}),y(T)}),(function(S,P,i){"use strict";var g=i(4),p=i(14),m=i(6),y=i(214),T=i(49),A=i(43),C=i(77),I=i(215),R=i(7),O=i(216),F=i(61),L=i(217),M=i(218),$=i(222),D=i(135),z=i(119),H=i(157),X=i(76),U=i(124),j=i(55),W=i(82),K=i(51),Q=T.PROPER,tt=T.CONFIGURABLE,J="ArrayBuffer",q="DataView",rt="prototype",ft="Wrong length",ct="Wrong index",ut=K.getterFor(J),gt=K.getterFor(q),pt=K.set,mt=g[J],St=mt,Ct=St&&St[rt],wt=g[q],jt=wt&&wt[rt],Ut=Object.prototype,yt=g.Array,Tt=g.RangeError,Ot=p(H),Bt=p([].reverse),Kt=$.pack,qt=$.unpack,$t=function(Ft){return[Ft&255]},Jt=function(Ft){return[Ft&255,Ft>>8&255]},te=function(Ft){return[Ft&255,Ft>>8&255,Ft>>16&255,Ft>>24&255]},de=function(Ft){return Ft[3]<<24|Ft[2]<<16|Ft[1]<<8|Ft[0]},ue=function(Ft){return Kt(M(Ft),23,4)},he=function(Ft){return Kt(Ft,52,8)},Ee=function(Ft,Xt,Qt){C(Ft[rt],Xt,{configurable:!0,get:function(){return Qt(this)[Xt]}})},$e=function(Ft,Xt,Qt,Re){var Wt=gt(Ft),Ht=L(Qt),ie=!!Re;if(Ht+Xt>Wt.byteLength)throw new Tt(ct);var fe=Wt.bytes,me=Ht+Wt.byteOffset,Qe=X(fe,me,me+Xt);return ie?Qe:Bt(Qe)},Ie=function(Ft,Xt,Qt,Re,Wt,Ht){var ie=gt(Ft),fe=L(Qt),me=Re(+Wt),Qe=!!Ht;if(fe+Xt>ie.byteLength)throw new Tt(ct);for(var vt=ie.bytes,Mt=fe+ie.byteOffset,It=0;It<Xt;It++)vt[Mt+It]=me[Qe?It:Xt-It-1]};if(!y)St=function(Xt){O(this,Ct);var Qt=L(Xt);pt(this,{type:J,bytes:Ot(yt(Qt),0),byteLength:Qt}),m||(this.byteLength=Qt,this.detached=!1)},Ct=St[rt],wt=function(Xt,Qt,Re){O(this,jt),O(Xt,Ct);var Wt=ut(Xt),Ht=Wt.byteLength,ie=F(Qt);if(ie<0||ie>Ht)throw new Tt("Wrong offset");if(Re=Re===void 0?Ht-ie:L(Re),ie+Re>Ht)throw new Tt(ft);pt(this,{type:q,buffer:Xt,byteLength:Re,byteOffset:ie,bytes:Wt.bytes}),m||(this.buffer=Xt,this.byteLength=Re,this.byteOffset=ie)},jt=wt[rt],m&&(Ee(St,"byteLength",ut),Ee(wt,"buffer",gt),Ee(wt,"byteLength",gt),Ee(wt,"byteOffset",gt)),I(jt,{getInt8:function(Xt){return $e(this,1,Xt)[0]<<24>>24},getUint8:function(Xt){return $e(this,1,Xt)[0]},getInt16:function(Xt){var Qt=$e(this,2,Xt,arguments.length>1?arguments[1]:!1);return(Qt[1]<<8|Qt[0])<<16>>16},getUint16:function(Xt){var Qt=$e(this,2,Xt,arguments.length>1?arguments[1]:!1);return Qt[1]<<8|Qt[0]},getInt32:function(Xt){return de($e(this,4,Xt,arguments.length>1?arguments[1]:!1))},getUint32:function(Xt){return de($e(this,4,Xt,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(Xt){return qt($e(this,4,Xt,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(Xt){return qt($e(this,8,Xt,arguments.length>1?arguments[1]:!1),52)},setInt8:function(Xt,Qt){Ie(this,1,Xt,$t,Qt)},setUint8:function(Xt,Qt){Ie(this,1,Xt,$t,Qt)},setInt16:function(Xt,Qt){Ie(this,2,Xt,Jt,Qt,arguments.length>2?arguments[2]:!1)},setUint16:function(Xt,Qt){Ie(this,2,Xt,Jt,Qt,arguments.length>2?arguments[2]:!1)},setInt32:function(Xt,Qt){Ie(this,4,Xt,te,Qt,arguments.length>2?arguments[2]:!1)},setUint32:function(Xt,Qt){Ie(this,4,Xt,te,Qt,arguments.length>2?arguments[2]:!1)},setFloat32:function(Xt,Qt){Ie(this,4,Xt,ue,Qt,arguments.length>2?arguments[2]:!1)},setFloat64:function(Xt,Qt){Ie(this,8,Xt,he,Qt,arguments.length>2?arguments[2]:!1)}});else{var oe=Q&&mt.name!==J;!R(function(){mt(1)})||!R(function(){new mt(-1)})||R(function(){return new mt,new mt(1.5),new mt(NaN),mt.length!==1||oe&&!tt})?(St=function(Xt){return O(this,Ct),U(new mt(L(Xt)),this,St)},St[rt]=Ct,Ct.constructor=St,j(St,mt)):oe&&tt&&A(mt,"name",J),z&&D(jt)!==Ut&&z(jt,Ut);var ye=new wt(new St(2)),ke=p(jt.setInt8);ye.setInt8(0,2147483648),ye.setInt8(1,2147483649),(ye.getInt8(0)||!ye.getInt8(1))&&I(jt,{setInt8:function(Xt,Qt){ke(this,Xt,Qt<<24>>24)},setUint8:function(Xt,Qt){ke(this,Xt,Qt<<24>>24)}},{unsafe:!0})}W(St,J),W(wt,q),S.exports={ArrayBuffer:St,DataView:wt}}),(function(S){"use strict";S.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(S,P,i){"use strict";var g=i(47);S.exports=function(p,m,y){for(var T in m)g(p,T,m[T],y);return p}}),(function(S,P,i){"use strict";var g=i(24),p=TypeError;S.exports=function(m,y){if(g(y,m))return m;throw new p("Incorrect invocation")}}),(function(S,P,i){"use strict";var g=i(61),p=i(64),m=RangeError;S.exports=function(y){if(y===void 0)return 0;var T=g(y),A=p(T);if(T!==A)throw new m("Wrong length or index");return A}}),(function(S,P,i){"use strict";var g=i(219),p=11920928955078125e-23,m=34028234663852886e22,y=11754943508222875e-54;S.exports=Math.fround||function(A){return g(A,p,m,y)}}),(function(S,P,i){"use strict";var g=i(220),p=i(221),m=Math.abs,y=2220446049250313e-31;S.exports=function(T,A,C,I){var R=+T,O=m(R),F=g(R);if(O<I)return F*p(O/I/A)*I*A;var L=(1+A/y)*O,M=L-(L-O);return M>C||M!==M?F*(1/0):F*M}}),(function(S){"use strict";S.exports=Math.sign||function(i){var g=+i;return g===0||g!==g?g:g<0?-1:1}}),(function(S){"use strict";var P=2220446049250313e-31,i=1/P;S.exports=function(g){return g+i-i}}),(function(S){"use strict";var P=Array,i=Math.abs,g=Math.pow,p=Math.floor,m=Math.log,y=Math.LN2,T=function(C,I,R){var O=P(R),F=R*8-I-1,L=(1<<F)-1,M=L>>1,$=I===23?g(2,-24)-g(2,-77):0,D=C<0||C===0&&1/C<0?1:0,z=0,H,X,U;for(C=i(C),C!==C||C===1/0?(X=C!==C?1:0,H=L):(H=p(m(C)/y),U=g(2,-H),C*U<1&&(H--,U*=2),H+M>=1?C+=$/U:C+=$*g(2,1-M),C*U>=2&&(H++,U/=2),H+M>=L?(X=0,H=L):H+M>=1?(X=(C*U-1)*g(2,I),H+=M):(X=C*g(2,M-1)*g(2,I),H=0));I>=8;)O[z++]=X&255,X/=256,I-=8;for(H=H<<I|X,F+=I;F>0;)O[z++]=H&255,H/=256,F-=8;return O[z-1]|=D*128,O},A=function(C,I){var R=C.length,O=R*8-I-1,F=(1<<O)-1,L=F>>1,M=O-7,$=R-1,D=C[$--],z=D&127,H;for(D>>=7;M>0;)z=z*256+C[$--],M-=8;for(H=z&(1<<-M)-1,z>>=-M,M+=I;M>0;)H=H*256+C[$--],M-=8;if(z===0)z=1-L;else{if(z===F)return H?NaN:D?-1/0:1/0;H+=g(2,I),z-=L}return(D?-1:1)*H*g(2,z-I)};S.exports={pack:T,unpack:A}}),(function(S,P,i){"use strict";var g=i(3),p=i(224),m=p.NATIVE_ARRAY_BUFFER_VIEWS;g({target:"ArrayBuffer",stat:!0,forced:!m},{isView:p.isView})}),(function(S,P,i){"use strict";var g=i(214),p=i(6),m=i(4),y=i(21),T=i(20),A=i(38),C=i(69),I=i(31),R=i(43),O=i(47),F=i(77),L=i(24),M=i(135),$=i(119),D=i(33),z=i(40),H=i(51),X=H.enforce,U=H.get,j=m.Int8Array,W=j&&j.prototype,K=m.Uint8ClampedArray,Q=K&&K.prototype,tt=j&&M(j),J=W&&M(W),q=Object.prototype,rt=m.TypeError,ft=D("toStringTag"),ct=z("TYPED_ARRAY_TAG"),ut="TypedArrayConstructor",gt=g&&!!$&&C(m.opera)!=="Opera",pt=!1,mt,St,Ct,wt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},jt={BigInt64Array:8,BigUint64Array:8},Ut=function(Jt){if(!T(Jt))return!1;var te=C(Jt);return te==="DataView"||A(wt,te)||A(jt,te)},yt=function($t){var Jt=M($t);if(T(Jt)){var te=U(Jt);return te&&A(te,ut)?te[ut]:yt(Jt)}},Tt=function($t){if(!T($t))return!1;var Jt=C($t);return A(wt,Jt)||A(jt,Jt)},Ot=function($t){if(Tt($t))return $t;throw new rt("Target is not a typed array")},Bt=function($t){if(y($t)&&(!$||L(tt,$t)))return $t;throw new rt(I($t)+" is not a typed array constructor")},Kt=function($t,Jt,te,de){if(p){if(te)for(var ue in wt){var he=m[ue];if(he&&A(he.prototype,$t))try{delete he.prototype[$t]}catch(Ee){try{he.prototype[$t]=Jt}catch($e){}}}(!J[$t]||te)&&O(J,$t,te?Jt:gt&&W[$t]||Jt,de)}},qt=function($t,Jt,te){var de,ue;if(p){if($){if(te){for(de in wt)if(ue=m[de],ue&&A(ue,$t))try{delete ue[$t]}catch(he){}}if(!tt[$t]||te)try{return O(tt,$t,te?Jt:gt&&tt[$t]||Jt)}catch(he){}else return}for(de in wt)ue=m[de],ue&&(!ue[$t]||te)&&O(ue,$t,Jt)}};for(mt in wt)St=m[mt],Ct=St&&St.prototype,Ct?X(Ct)[ut]=St:gt=!1;for(mt in jt)St=m[mt],Ct=St&&St.prototype,Ct&&(X(Ct)[ut]=St);if((!gt||!y(tt)||tt===Function.prototype)&&(tt=function(){throw new rt("Incorrect invocation")},gt))for(mt in wt)m[mt]&&$(m[mt],tt);if((!gt||!J||J===q)&&(J=tt.prototype,gt))for(mt in wt)m[mt]&&$(m[mt].prototype,J);if(gt&&M(Q)!==J&&$(Q,J),p&&!A(J,ft)){pt=!0,F(J,ft,{configurable:!0,get:function(){return T(this)?this[ct]:void 0}});for(mt in wt)m[mt]&&R(m[mt].prototype,ct,mt)}S.exports={NATIVE_ARRAY_BUFFER_VIEWS:gt,TYPED_ARRAY_TAG:pt&&ct,aTypedArray:Ot,aTypedArrayConstructor:Bt,exportTypedArrayMethod:Kt,exportTypedArrayStaticMethod:qt,getTypedArrayConstructor:yt,isView:Ut,isTypedArray:Tt,TypedArray:tt,TypedArrayPrototype:J}}),(function(S,P,i){"use strict";var g=i(3),p=i(85),m=i(7),y=i(213),T=i(46),A=i(60),C=i(64),I=y.ArrayBuffer,R=y.DataView,O=R.prototype,F=p(I.prototype.slice),L=p(O.getUint8),M=p(O.setUint8),$=m(function(){return!new I(2).slice(1,void 0).byteLength});g({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:$},{slice:function(z,H){if(F&&H===void 0)return F(T(this),z);for(var X=T(this).byteLength,U=A(z,X),j=A(H===void 0?X:H,X),W=new I(C(j-U)),K=new R(this),Q=new R(W),tt=0;U<j;)M(Q,tt++,L(K,U++));return W}})}),(function(S,P,i){"use strict";i(227)}),(function(S,P,i){"use strict";var g=i(3),p=i(213),m=i(214);g({global:!0,constructor:!0,forced:!m},{DataView:p.DataView})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=Math.pow,y=31,T=1023,A=m(2,-24),C=.0009765625,I=function(O){var F=O>>>15,L=O>>>10&y,M=O&T;return L===y?M===0?F===0?1/0:-1/0:NaN:L===0?M*(F===0?A:-A):m(2,L-15)*(F===0?1+M*C:-1-M*C)},R=p(DataView.prototype.getUint16);g({target:"DataView",proto:!0},{getFloat16:function(F){return I(R(this,F,arguments.length>1?arguments[1]:!1))}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(230),y=i(217),T=i(231),A=i(221),C=Math.floor,I=Math.pow,R=65520,O=61005353927612305e-21,F=16777216,L=1024,M=function(D){if(D!==D)return 32256;if(D===0)return(1/D===-1/0)<<15;var z=D<0;if(z&&(D=-D),D>=R)return z<<15|31744;if(D<O)return z<<15|A(D*F);var H=C(T(D));if(H===-15)return z<<15|L;var X=A((D*I(2,-H)-1)*L);return X===L?z<<15|H+16<<10:z<<15|H+15<<10|X},$=p(DataView.prototype.setUint16);g({target:"DataView",proto:!0},{setFloat16:function(z,H){$(m(this),y(z),M(+H),arguments.length>2?arguments[2]:!1)}})}),(function(S,P,i){"use strict";var g=i(69),p=TypeError;S.exports=function(m){if(g(m)==="DataView")return m;throw new p("Argument is not a DataView")}}),(function(S){"use strict";var P=Math.log,i=Math.LN2;S.exports=Math.log2||function(p){return P(p)/i}}),(function(S,P,i){"use strict";var g=i(6),p=i(77),m=i(233),y=ArrayBuffer.prototype;g&&!("detached"in y)&&p(y,"detached",{configurable:!0,get:function(){return m(this)}})}),(function(S,P,i){"use strict";var g=i(4),p=i(214),m=i(234),y=g.DataView;S.exports=function(T){if(!p||m(T)!==0)return!1;try{return new y(T),!1}catch(A){return!0}}}),(function(S,P,i){"use strict";var g=i(4),p=i(120),m=i(15),y=g.ArrayBuffer,T=g.TypeError;S.exports=y&&p(y.prototype,"byteLength","get")||function(A){if(m(A)!=="ArrayBuffer")throw new T("ArrayBuffer expected");return A.byteLength}}),(function(S,P,i){"use strict";var g=i(3),p=i(236);p&&g({target:"ArrayBuffer",proto:!0},{transfer:function(){return p(this,arguments.length?arguments[0]:void 0,!0)}})}),(function(S,P,i){"use strict";var g=i(4),p=i(14),m=i(120),y=i(217),T=i(237),A=i(234),C=i(238),I=i(240),R=g.structuredClone,O=g.ArrayBuffer,F=g.DataView,L=Math.max,M=Math.min,$=O.prototype,D=F.prototype,z=p($.slice),H=m($,"resizable","get"),X=m($,"maxByteLength","get"),U=p(D.getInt8),j=p(D.setInt8);S.exports=(I||C)&&function(W,K,Q){var tt=A(W),J=K===void 0?tt:y(K),q=!H||!H(W),rt;if(T(W),I&&(W=R(W,{transfer:[W]}),tt===J&&(Q||q)))return W;if(tt>=J&&(!Q||q))rt=z(W,0,J);else{var ft=Q&&!q&&X?{maxByteLength:L(J,X(W))}:void 0;rt=new O(J,ft);for(var ct=new F(W),ut=new F(rt),gt=M(J,tt),pt=0;pt<gt;pt++)j(ut,pt,U(ct,pt))}return I||C(W),rt}}),(function(S,P,i){"use strict";var g=i(233),p=TypeError;S.exports=function(m){if(g(m))throw new p("ArrayBuffer is detached");return m}}),(function(S,P,i){"use strict";var g=i(4),p=i(239),m=i(240),y=g.structuredClone,T=g.ArrayBuffer,A=g.MessageChannel,C=!1,I,R,O,F;if(m)C=function(L){y(L,{transfer:[L]})};else if(T)try{A||(I=p("worker_threads"),I&&(A=I.MessageChannel)),A&&(R=new A,O=new T(2),F=function(L){R.port1.postMessage(null,[L])},O.byteLength===2&&(F(O),O.byteLength===0&&(C=F)))}catch(L){}S.exports=C}),(function(S,P,i){"use strict";var g=i(4),p=i(189);S.exports=function(m){if(p){try{return g.process.getBuiltinModule(m)}catch(y){}try{return Function('return require("'+m+'")')()}catch(y){}}}}),(function(S,P,i){"use strict";var g=i(4),p=i(7),m=i(27),y=i(190),T=g.structuredClone;S.exports=!!T&&!p(function(){if(y==="DENO"&&m>92||y==="NODE"&&m>94||y==="BROWSER"&&m>97)return!1;var A=new ArrayBuffer(8),C=T(A,{transfer:[A]});return A.byteLength!==0||C.byteLength!==8})}),(function(S,P,i){"use strict";var g=i(3),p=i(236);p&&g({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return p(this,arguments.length?arguments[0]:void 0,!1)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(7),y=m(function(){return new Date(16e11).getYear()!==120}),T=p(Date.prototype.getFullYear);g({target:"Date",proto:!0,forced:y},{getYear:function(){return T(this)-1900}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=Date,y=p(m.prototype.getTime);g({target:"Date",stat:!0},{now:function(){return y(new m)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(61),y=Date.prototype,T=p(y.getTime),A=p(y.setFullYear);g({target:"Date",proto:!0},{setYear:function(I){T(this);var R=+I;if(R!==R)return A(this,R);var O=m(R),F=O>=0&&O<=99?O+1900:O;return A(this,F)}})}),(function(S,P,i){"use strict";var g=i(3);g({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(S,P,i){"use strict";var g=i(3),p=i(247);g({target:"Date",proto:!0,forced:Date.prototype.toISOString!==p},{toISOString:p})}),(function(S,P,i){"use strict";var g=i(14),p=i(7),m=i(248).start,y=RangeError,T=isFinite,A=Math.abs,C=Date.prototype,I=C.toISOString,R=g(C.getTime),O=g(C.getUTCDate),F=g(C.getUTCFullYear),L=g(C.getUTCHours),M=g(C.getUTCMilliseconds),$=g(C.getUTCMinutes),D=g(C.getUTCMonth),z=g(C.getUTCSeconds);S.exports=p(function(){return I.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!p(function(){I.call(new Date(NaN))})?function(){if(!T(R(this)))throw new y("Invalid time value");var X=this,U=F(X),j=M(X),W=U<0?"-":U>9999?"+":"";return W+m(A(U),W?6:4,0)+"-"+m(D(X)+1,2,0)+"-"+m(O(X),2,0)+"T"+m(L(X),2,0)+":"+m($(X),2,0)+":"+m(z(X),2,0)+"."+m(j,3,0)+"Z"}:I}),(function(S,P,i){"use strict";var g=i(14),p=i(64),m=i(68),y=i(249),T=i(16),A=g(y),C=g("".slice),I=Math.ceil,R=function(O){return function(F,L,M){var $=m(T(F)),D=p(L),z=$.length;if(D<=z)return $;var H=M===void 0?" ":m(M),X,U;return H===""?$:(X=D-z,U=A(H,I(X/H.length)),U.length>X&&(U=C(U,0,X)),O?$+U:U+$)}};S.exports={start:R(!1),end:R(!0)}}),(function(S,P,i){"use strict";var g=i(61),p=i(68),m=i(16),y=RangeError,T=Math.floor;S.exports=function(C){var I=p(m(this)),R="",O=g(C);if(O<0||O===1/0)throw new y("Wrong number of repetitions");for(;O>0;(O=T(O/2))&&(I+=I))O%2&&(R+=I);return R}}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(39),y=i(19),T=p(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});g({target:"Date",proto:!0,forced:T},{toJSON:function(C){var I=m(this),R=y(I,"number");return typeof R=="number"&&!isFinite(R)?null:I.toISOString()}})}),(function(S,P,i){"use strict";var g=i(38),p=i(47),m=i(252),y=i(33),T=y("toPrimitive"),A=Date.prototype;g(A,T)||p(A,T,m)}),(function(S,P,i){"use strict";var g=i(46),p=i(32),m=TypeError;S.exports=function(y){if(g(this),y==="string"||y==="default")y="string";else if(y!=="number")throw new m("Incorrect hint");return p(this,y)}}),(function(S,P,i){"use strict";var g=i(14),p=i(47),m=Date.prototype,y="Invalid Date",T="toString",A=g(m[T]),C=g(m.getTime);String(new Date(NaN))!==y&&p(m,T,function(){var R=C(this);return R===R?A(this):y})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(23),y=i(30),T=i(216),A=i(47),C=i(215),I=i(77),R=i(33),O=i(51),F=i(255),L=m("SuppressedError"),M=ReferenceError,$=R("dispose"),D=R("toStringTag"),z="DisposableStack",H=O.set,X=O.getterFor(z),U="sync-dispose",j="disposed",W="pending",K=function(J){var q=X(J);if(q.state===j)throw new M(z+" already disposed");return q},Q=function(){H(T(this,tt),{type:z,state:W,stack:[]}),p||(this.disposed=!1)},tt=Q.prototype;C(tt,{dispose:function(){var q=X(this);if(q.state!==j){q.state=j,p||(this.disposed=!0);for(var rt=q.stack,ft=rt.length,ct=!1,ut;ft;){var gt=rt[--ft];rt[ft]=null;try{gt()}catch(pt){ct?ut=new L(pt,ut):(ct=!0,ut=pt)}}if(q.stack=null,ct)throw ut}},use:function(q){return F(K(this),q,U),q},adopt:function(q,rt){var ft=K(this);return y(rt),F(ft,void 0,U,function(){rt(q)}),q},defer:function(q){var rt=K(this);y(q),F(rt,void 0,U,q)},move:function(){var q=K(this),rt=new Q;return X(rt).stack=q.stack,q.stack=[],q.state=j,p||(this.disposed=!0),rt}}),p&&I(tt,"disposed",{configurable:!0,get:function(){return X(this).state===j}}),A(tt,$,tt.dispose,{name:"dispose"}),A(tt,D,z,{nonWritable:!0}),g({global:!0,constructor:!0},{DisposableStack:Q})}),(function(S,P,i){"use strict";var g=i(23),p=i(8),m=i(14),y=i(84),T=i(46),A=i(30),C=i(17),I=i(29),R=i(33),O=R("asyncDispose"),F=R("dispose"),L=m([].push),M=function(D,z){if(z==="async-dispose"){var H=I(D,O);return H!==void 0||(H=I(D,F),H===void 0)?H:function(){var X=this,U=g("Promise");return new U(function(j){p(H,X),j(void 0)})}}return I(D,F)},$=function(D,z,H){return arguments.length<3&&!C(D)&&(H=A(M(T(D),z))),H===void 0?function(){}:y(H,D)};S.exports=function(D,z,H,X){var U;if(arguments.length<4){if(C(z)&&H==="sync-dispose")return;U=$(z,H)}else U=$(void 0,H,X);L(D.stack,U)}}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(68),y=p("".charAt),T=p("".charCodeAt),A=p(/./.exec),C=p(1.1.toString),I=p("".toUpperCase),R=p([].join),O=Array,F=/[\w*+\-./@]/,L=function(M,$){for(var D=C(M,16);D.length<$;)D="0"+D;return D};g({global:!0},{escape:function($){var D=m($),z=D.length,H=O(z),X,U,j;for(X=0;X<z;X++)U=y(D,X),A(F,U)?H[X]=U:(j=T(U,0),j<256?H[X]="%"+I(L(j,2)):H[X]="%u"+I(L(j,4)));return R(H,"")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(258);g({target:"Function",proto:!0,forced:Function.bind!==p},{bind:p})}),(function(S,P,i){"use strict";var g=i(14),p=i(30),m=i(20),y=i(38),T=i(76),A=i(9),C=Function,I=g([].concat),R=g([].join),O={},F=function(L,M,$){if(!y(O,M)){for(var D=[],z=0;z<M;z++)D[z]="a["+z+"]";O[M]=C("C,a","return new C("+R(D,",")+")")}return O[M](L,$)};S.exports=A?C.bind:function(M){var $=p(this),D=$.prototype,z=T(arguments,1),H=function(){var U=I(z,T(arguments));return this instanceof H?F($,U.length,U):$.apply(M,U)};return m(D)&&(H.prototype=D),H}}),(function(S,P,i){"use strict";var g=i(21),p=i(20),m=i(44),y=i(24),T=i(33),A=i(48),C=T("hasInstance"),I=Function.prototype;C in I||m.f(I,C,{value:A(function(R){if(!g(this)||!p(R))return!1;var O=this.prototype;return p(O)?y(O,R):R instanceof this},C)})}),(function(S,P,i){"use strict";var g=i(6),p=i(49).EXISTS,m=i(14),y=i(77),T=Function.prototype,A=m(T.toString),C=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,I=m(C.exec),R="name";g&&!p&&y(T,R,{configurable:!0,get:function(){try{return I(C,A(this))[1]}catch(O){return""}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4);g({global:!0,forced:p.globalThis!==p},{globalThis:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(216),y=i(46),T=i(21),A=i(135),C=i(77),I=i(90),R=i(7),O=i(38),F=i(33),L=i(179).IteratorPrototype,M=i(6),$=i(36),D="constructor",z="Iterator",H=F("toStringTag"),X=TypeError,U=p[z],j=$||!T(U)||U.prototype!==L||!R(function(){U({})}),W=function(){if(m(this,L),A(this)===L)throw new X("Abstract class Iterator not directly constructable")},K=function(Q,tt){M?C(L,Q,{configurable:!0,get:function(){return tt},set:function(J){if(y(this),this===L)throw new X("You can't redefine this property");O(this,Q)?this[Q]=J:I(this,Q,J)}}):L[Q]=tt};O(L,H)||K(H,z),(j||!O(L,D)||L[D]===Object)&&K(D,W),W.prototype=L,g({global:!0,constructor:!0,forced:j},{Iterator:W})}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(8),y=i(264),T=i(267),A=i(268),C=i(14),I=i(36),R=C([].push),O=y(function(){for(var F=this.iterator,L=this.next,M=this.chunkSize,$=[],D,z;;){if(D=p(m(L,F)),z=!!D.done,z){if($.length)return $;this.done=!0;return}if(R($,D.value),$.length===M)return $}});g({target:"Iterator",proto:!0,real:!0,forced:I},{chunks:function(L){return p(this),A(L,this),new O(T(this),{chunkSize:L})}})}),(function(S,P,i){"use strict";var g=i(8),p=i(71),m=i(43),y=i(215),T=i(33),A=i(51),C=i(29),I=i(179).IteratorPrototype,R=i(180),O=i(142),F=i(265),L=i(266),M=T("toStringTag"),$="IteratorHelper",D="WrapForValidIterator",z="normal",H="throw",X=A.set,U=function(K){var Q=A.getterFor(K?D:$);return y(p(I),{next:function(){var J=Q(this);if(K)return J.nextHandler();if(J.done)return R(void 0,!0);try{var q=J.nextHandler();return J.done&&L(J),J.returnHandlerResult?q:R(q,J.done)}catch(rt){throw J.done=!0,L(J),rt}},return:function(){var tt=Q(this),J=tt.iterator,q=tt.inner,rt=tt.openIters,ft=tt.done;if(tt.done=!0,K){var ct=C(J,"return");return ct?g(ct,J):R(void 0,!0)}if(L(tt),ft)return R(void 0,!0);if(q)try{O(q.iterator,z)}catch(ut){return O(J,H,ut)}if(rt)try{F(rt,z)}catch(ut){if(J)return O(J,H,ut);throw ut}return J&&O(J,z),R(void 0,!0)}})},j=U(!0),W=U(!1);m(W,M,"Iterator Helper"),S.exports=function(K,Q,tt){var J=function(rt,ft){ft?(ft.iterator=rt.iterator,ft.next=rt.next):ft=rt,ft.type=Q?D:$,ft.returnHandlerResult=!!tt,ft.nextHandler=K,ft.counter=0,ft.done=!1,X(this,ft)};return J.prototype=Q?j:W,J}}),(function(S,P,i){"use strict";var g=i(142);S.exports=function(p,m,y){for(var T=p.length-1;T>=0;T--)if(p[T]!==void 0)try{y=g(p[T].iterator,m,y)}catch(A){m="throw",y=A}if(m==="throw")throw y;return y}}),(function(S){"use strict";S.exports=function(P){P.iterator=P.next=P.nextHandler=P.mapper=P.predicate=P.inner=P.iterables=P.iters=P.openIters=P.padding=P.finishResults=P.buffer=null}}),(function(S){"use strict";S.exports=function(P){return{iterator:P,next:P.next,done:!1}}}),(function(S,P,i){"use strict";var g=i(269),p=i(142),m=RangeError,y=TypeError,T="Chunk size must be an integer in [1, 2^32-1]";S.exports=function(A,C){if(typeof A!="number"||!g(A))return p(C,"throw",new y(T));if(A===0||A>>>0!==A)return p(C,"throw",new m(T))}}),(function(S,P,i){"use strict";var g=i(20),p=Math.floor;S.exports=Number.isInteger||function(y){return!g(y)&&isFinite(y)&&p(y)===y}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(46),T=i(141),A=i(264),C=i(36),I=Array,R=A(function(){for(;;){var O=this.iterator;if(!O){var F=this.nextIterableIndex++,L=this.iterables;if(F>=L.length){this.done=!0;return}var M=L[F];this.iterables[F]=null,O=this.iterator=y(p(M.method,M.iterable)),this.next=O.next}var $=y(p(this.next,O));if($.done){this.iterator=null,this.next=null;continue}return $.value}});g({target:"Iterator",stat:!0,forced:C},{concat:function(){for(var F=arguments.length,L=I(F),M=0;M<F;M++){var $=y(arguments[M]);L[M]={iterable:$,method:m(T($))}}return new R({iterables:L,nextIterableIndex:0,iterator:null,next:null})}})}),(function(S,P,i){"use strict";var g=i(8),p=i(47),m=i(29),y=i(38),T=i(33),A=i(179).IteratorPrototype,C=T("dispose");y(A,C)||p(A,C,function(){var I=m(this,"return");I&&g(I,this)})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(46),y=i(267),T=i(273),A=i(274),C=i(142),I=i(264),R=i(275),O=i(276),F=i(36),L=RangeError,M=1/0,$=!F&&!R("drop",0),D=!F&&!$&&O("drop",RangeError),z=F||$||D||!(function(){try{Iterator.prototype.drop.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),H=I(function(){for(var X=this.iterator,U=this.next,j,W;this.remaining;)if(this.remaining--,j=m(p(U,X)),W=this.done=!!j.done,W)return;if(j=m(p(U,X)),W=this.done=!!j.done,!W)return j.value});g({target:"Iterator",proto:!0,real:!0,forced:z},{drop:function(U){m(this);var j;try{if(j=A(T(+U)),j>9007199254740991&&j!==M)throw new L("The argument should be a safe integer")}catch(W){C(this,"throw",W)}return D?p(D,this,j):new H(y(this),{remaining:j})}})}),(function(S){"use strict";var P=RangeError;S.exports=function(i){if(i===i)return i;throw new P("NaN is not allowed")}}),(function(S,P,i){"use strict";var g=i(61),p=RangeError;S.exports=function(m){var y=g(m);if(y<0)throw new p("The argument can't be less than 0");return y}}),(function(S){"use strict";S.exports=function(P,i){var g=typeof Iterator=="function"&&Iterator.prototype[P];if(g)try{g.call({next:null},i).next()}catch(p){return!0}}}),(function(S,P,i){"use strict";var g=i(4);S.exports=function(p,m){var y=g.Iterator,T=y&&y.prototype,A=T&&T[p],C=!1;if(A)try{A.call({next:function(){return{done:!0}},return:function(){C=!0}},-1)}catch(I){I instanceof m||(C=!1)}if(!C)return A}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(137),y=i(30),T=i(46),A=i(267),C=i(142),I=i(276),R=I("every",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{every:function(F){T(this);try{y(F)}catch($){C(this,"throw",$)}if(R)return p(R,this,F);var L=A(this),M=0;return!m(L,function($,D){if(!F($,M++))return D()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(46),T=i(267),A=i(264),C=i(171),I=i(36),R=i(142),O=i(275),F=i(276),L=!I&&!O("filter",function(){}),M=!I&&!L&&F("filter",TypeError),$=I||L||M,D=A(function(){for(var z=this.iterator,H=this.predicate,X=this.next,U,j,W;;){if(U=y(p(X,z)),j=this.done=!!U.done,j)return;if(W=U.value,C(z,H,[W,this.counter++],!0))return W}});g({target:"Iterator",proto:!0,real:!0,forced:$},{filter:function(H){y(this);try{m(H)}catch(X){R(this,"throw",X)}return M?p(M,this,H):new D(T(this),{predicate:H})}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(137),y=i(30),T=i(46),A=i(267),C=i(142),I=i(276),R=I("find",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{find:function(F){T(this);try{y(F)}catch($){C(this,"throw",$)}if(R)return p(R,this,F);var L=A(this),M=0;return m(L,function($,D){if(F($,M++))return D($)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(46),T=i(267),A=i(281),C=i(264),I=i(142),R=i(7),O=i(36),F=i(275),L=i(276),M=!O&&R(function(){return[1].values().flatMap(function(){return[1]}).find(function(){return!0})!==1}),$=!O&&!M&&!F("flatMap",function(){}),D=!O&&!M&&!$&&L("flatMap",TypeError),z=O||M||$||D,H=C(function(){for(var X=this.iterator,U=this.mapper,j,W;;){if(W=this.inner)try{if(j=y(p(W.next,W.iterator)),!j.done)return j.value;this.inner=null}catch(K){I(X,"throw",K)}if(j=y(p(this.next,X)),this.done=!!j.done)return;try{this.inner=A(U(j.value,this.counter++),!1)}catch(K){I(X,"throw",K)}}});g({target:"Iterator",proto:!0,real:!0,forced:z},{flatMap:function(U){y(this);try{m(U)}catch(j){I(this,"throw",j)}return D?p(D,this,U):new H(T(this),{mapper:U,inner:null})}})}),(function(S,P,i){"use strict";var g=i(8),p=i(46),m=i(267),y=i(141);S.exports=function(T,A){(!A||typeof T!="string")&&p(T);var C=y(T);return m(p(C!==void 0?g(C,T):T))}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(137),y=i(30),T=i(46),A=i(267),C=i(142),I=i(276),R=I("forEach",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{forEach:function(F){T(this);try{y(F)}catch($){C(this,"throw",$)}if(R)return p(R,this,F);var L=A(this),M=0;m(L,function($){F($,M++)},{IS_RECORD:!0})}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(39),y=i(24),T=i(179).IteratorPrototype,A=i(264),C=i(281),I=i(36),R=I||(function(){try{Iterator.from({return:null}).return()}catch(F){return!0}})(),O=A(function(){return p(this.next,this.iterator)},!0);g({target:"Iterator",stat:!0,forced:R},{from:function(L){var M=C(typeof L=="string"?m(L):L,!0);return y(T,M.iterator)?M.iterator:new O(M)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(269),y=i(137),T=i(142),A=i(285),C=i(36),I=RangeError,R=TypeError,O=1/0,F="skippedElements should be a positive safe integer";g({target:"Iterator",proto:!0,real:!0,forced:C},{includes:function(M){p(this);var $=arguments.length>1?arguments[1]:void 0,D=0,z;try{if($===void 0)z=0;else if($===O||$===-O||m($))z=$;else throw new R(F);if(z<0||z!==O&&z>9007199254740991)throw new I(F)}catch(H){T(this,"throw",H)}return y(this,function(H,X){if(D<z)D++;else if(A(H,M))return X()},{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})}),(function(S){"use strict";S.exports=function(P,i){return P===i||P!==P&&i!==i}}),(function(S,P,i){"use strict";var g=i(3),p=i(68),m=i(46),y=i(17),T=i(137),A=i(142),C=i(14),I=i(36),R=C([].join),O=C([].push);g({target:"Iterator",proto:!0,real:!0,forced:I},{join:function(L){m(this);var M;try{M=L===void 0?",":p(L)}catch(D){A(this,"throw",D)}var $=[];return T(this,function(D){O($,y(D)?"":p(D))},{IS_ITERATOR:!0}),R($,M)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(46),T=i(267),A=i(264),C=i(171),I=i(142),R=i(275),O=i(276),F=i(36),L=!F&&!R("map",function(){}),M=!F&&!L&&O("map",TypeError),$=F||L||M,D=A(function(){var z=this.iterator,H=y(p(this.next,z)),X=this.done=!!H.done;if(!X)return C(z,this.mapper,[H.value,this.counter++],!0)});g({target:"Iterator",proto:!0,real:!0,forced:$},{map:function(H){y(this);try{m(H)}catch(X){I(this,"throw",X)}return M?p(M,this,H):new D(T(this),{mapper:H})}})}),(function(S,P,i){"use strict";var g=i(3),p=i(137),m=i(30),y=i(46),T=i(267),A=i(142),C=i(276),I=i(117),R=i(7),O=TypeError,F=R(function(){[].keys().reduce(function(){},void 0)}),L=!F&&C("reduce",O);g({target:"Iterator",proto:!0,real:!0,forced:F||L},{reduce:function($){y(this);try{m($)}catch(U){A(this,"throw",U)}var D=arguments.length<2,z=D?void 0:arguments[1];if(L)return I(L,this,D?[$]:[$,z]);var H=T(this),X=0;if(p(H,function(U){D?(D=!1,z=U):z=$(z,U,X),X++},{IS_RECORD:!0}),D)throw new O("Reduce of empty iterator with no initial value");return z}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(137),y=i(30),T=i(46),A=i(267),C=i(142),I=i(276),R=I("some",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{some:function(F){T(this);try{y(F)}catch($){C(this,"throw",$)}if(R)return p(R,this,F);var L=A(this),M=0;return m(L,function($,D){if(F($,M++))return D()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(46),y=i(267),T=i(273),A=i(274),C=i(264),I=i(142),R=i(275),O=i(276),F=i(36),L=RangeError,M=1/0,$=!F&&!R("take",1),D=!F&&!$&&O("take",RangeError),z=F||$||D||!(function(){try{Iterator.prototype.take.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),H=C(function(){var X=this.iterator;if(!this.remaining--)return this.done=!0,I(X,"normal",void 0);var U=m(p(this.next,X)),j=this.done=!!U.done;if(!j)return U.value});g({target:"Iterator",proto:!0,real:!0,forced:z},{take:function(U){m(this);var j;try{if(j=A(T(+U)),j>9007199254740991&&j!==M)throw new L("The argument should be a safe integer")}catch(W){I(this,"throw",W)}return D?p(D,this,j):new H(y(this),{remaining:j})}})}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(90),y=i(137),T=i(267);g({target:"Iterator",proto:!0,real:!0},{toArray:function(){var C=[],I=0;return y(T(p(this)),function(R){m(C,I++,R)},{IS_RECORD:!0}),C}})}),(function(S,P,i){"use strict";var g=i(3),p=i(293),m=i(36);g({target:"Iterator",proto:!0,real:!0,forced:m},{windows:function(T){return p(this,T,arguments.length<2?void 0:arguments[1])}})}),(function(S,P,i){"use strict";var g=i(46),p=i(8),m=i(264),y=i(180),T=i(267),A=i(142),C=i(268),I=i(14),R=TypeError,O=I([].push),F=I([].slice),L="allow-partial",M=m(function(){for(var $=this.iterator,D=this.next,z=this.buffer,H=this.windowSize,X=this.allowPartial,U,j;;){if(U=g(p(D,$)),j=this.done=!!U.done,X&&j&&z.length&&z.length<H)return y(F(z,0),!1);if(j)return y(void 0,!0);if(z.length===H&&(this.buffer=z=F(z,1)),O(z,U.value),z.length===H)return y(F(z,0),!1)}},!1,!0);S.exports=function($,D,z){return g($),C(D,$),z!==void 0&&z!=="only-full"&&z!==L?A($,"throw",new R("Incorrect `undersized` argument")):new M(T($),{windowSize:D,buffer:[],allowPartial:z===L})}}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(295),y=i(8),T=i(14),A=i(296),C=i(281),I=i(297),R=i(142),O=i(265),F=i(298),L=i(36),M=T([].concat),$=T([].push),D="throw";g({target:"Iterator",stat:!0,forced:L},{zip:function(H){p(H);for(var X=arguments.length>1?m(arguments[1]):void 0,U=I(X),j=U==="longest"?m(X&&X.padding):void 0,W=[],K=[],Q=A(H),tt,J,q;!J;){try{q=p(y(Q.next,Q.iterator)),J=q.done}catch(pt){return O(W,D,pt)}if(!J){try{tt=C(q.value,!1)}catch(pt){return O(M([Q],W),D,pt)}$(W,tt)}}var rt=W.length,ft,ct,ut;if(U==="longest")if(j===void 0)for(ft=0;ft<rt;ft++)$(K,void 0);else{try{ut=A(j)}catch(pt){return O(W,D,pt)}var gt=!0;for(ft=0;ft<rt;ft++)if(gt){try{q=p(y(ut.next,ut.iterator)),ct=q.done,q=q.value}catch(pt){return O(W,D,pt)}ct?gt=!1:$(K,q)}else $(K,void 0);if(gt)try{R(ut.iterator,"normal")}catch(pt){return O(W,D,pt)}}return F(W,U,K)}})}),(function(S,P,i){"use strict";var g=i(20),p=String,m=TypeError;S.exports=function(y){if(y===void 0||g(y))return y;throw new m(p(y)+" is not an object or undefined")}}),(function(S,P,i){"use strict";var g=i(140),p=i(267);S.exports=function(m){return p(g(m))}}),(function(S){"use strict";var P=TypeError;S.exports=function(i){var g=i&&i.mode;if(g===void 0||g==="shortest"||g==="longest"||g==="strict")return g||"shortest";throw new P("Incorrect `mode` option")}}),(function(S,P,i){"use strict";var g=i(8),p=i(14),m=i(46),y=i(264),T=i(265),A=TypeError,C=p([].slice),I=p([].push),R="Iterator is exhausted",O="throw",F=y(function(){var L=this.iterCount;if(!L){this.done=!0;return}for(var M=this.openIters,$=this.iters,D=this.padding,z=this.mode,H=this.finishResults,X=[],U,j,W=0;W<L;W++){var K=$[W];if(K===null)U=D[W];else{try{U=m(g(K.next,K.iterator)),j=U.done,U=U.value}catch(q){return M[W]=void 0,T(M,O,q)}if(j){if(M[W]=void 0,this.openItersCount--,z==="shortest")return this.done=!0,T(M,"normal",void 0);if(z==="strict"){if(W)return T(M,O,new A(R));for(var Q,tt,J=1;J<L;J++){try{Q=m(g($[J].next,$[J].iterator)),tt=Q.done,Q=Q.value}catch(q){return M[J]=void 0,T(M,O,q)}if(tt)M[J]=void 0,this.openItersCount--;else return T(M,O,new A(R))}this.done=!0;return}if(!this.openItersCount){this.done=!0;return}$[W]=null,U=D[W]}}I(X,U)}return H?H(X):X});S.exports=function(L,M,$,D){var z=L.length;return new F({iters:L,iterCount:z,openIters:C(L,0),openItersCount:z,mode:M,padding:$,finishResults:D})}}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(295),y=i(90),T=i(8),A=i(14),C=i(23),I=i(10),R=i(281),O=i(297),F=i(265),L=i(298),M=i(36),$=A([].push),D="throw";g({target:"Iterator",stat:!0,forced:M},{zipKeyed:function(H){p(H);var X=arguments.length>1?m(arguments[1]):void 0,U=O(X),j=U==="longest"?m(X&&X.padding):void 0,W=[],K=[],Q=C("Reflect","ownKeys")(H),tt=[],J=I.f,q,rt,ft;for(q=0;q<Q.length;q++)try{if(rt=Q[q],!T(J,H,rt))continue;ft=H[rt],ft!==void 0&&($(tt,rt),$(W,R(ft,!1)))}catch(ut){return F(W,D,ut)}var ct=W.length;if(U==="longest")if(j===void 0)for(q=0;q<ct;q++)$(K,void 0);else for(q=0;q<tt.length;q++){try{ft=j[tt[q]]}catch(ut){return F(W,D,ut)}$(K,ft)}return L(W,U,K,function(ut){for(var gt=C("Object","create")(null),pt=0;pt<ct;pt++)y(gt,tt[pt],ut[pt]);return gt})}})}),(function(S,P,i){"use strict";var g=i(3),p=i(98),m=i(95);g({target:"JSON",stat:!0,forced:!p},{isRawJSON:m})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(4),y=i(23),T=i(14),A=i(8),C=i(21),I=i(20),R=i(88),O=i(38),F=i(68),L=i(63),M=i(90),$=i(7),D=i(97),z=i(26),H=m.JSON,X=m.Number,U=m.SyntaxError,j=H&&H.parse,W=y("Object","keys"),K=Object.getOwnPropertyDescriptor,Q=T("".charAt),tt=T("".slice),J=T(/./.exec),q=T([].push),rt=/^\d$/,ft=/^[1-9]$/,ct=/^[\d-]$/,ut=/^[\t\n\r ]$/,gt=0,pt=1,mt=function(Tt,Ot){Tt=F(Tt);var Bt=new jt(Tt,0),Kt=Bt.parse(),qt=Kt.value,$t=Bt.skip(ut,Kt.end);if($t<Tt.length)throw new U('Unexpected extra character: "'+Q(Tt,$t)+'" after the parsed data at: '+$t);return C(Ot)?St({"":qt},"",Ot,Kt):qt},St=function(Tt,Ot,Bt,Kt){var qt=Tt[Ot],$t=Kt&&qt===Kt.value,Jt=$t&&typeof Kt.source=="string"?{source:Kt.source}:{},te,de,ue,he,Ee;if(I(qt)){var $e=R(qt),Ie=$t?Kt.nodes:$e?[]:{};if($e)for(te=Ie.length,ue=L(qt),he=0;he<ue;he++)Ct(qt,he,St(qt,""+he,Bt,he<te?Ie[he]:void 0));else for(de=W(qt),ue=L(de),he=0;he<ue;he++)Ee=de[he],Ct(qt,Ee,St(qt,Ee,Bt,O(Ie,Ee)?Ie[Ee]:void 0))}return A(Bt,Tt,Ot,qt,Jt)},Ct=function(Tt,Ot,Bt){if(p){var Kt=K(Tt,Ot);if(Kt&&!Kt.configurable)return}Bt===void 0?delete Tt[Ot]:M(Tt,Ot,Bt)},wt=function(Tt,Ot,Bt,Kt){this.value=Tt,this.end=Ot,this.source=Bt,this.nodes=Kt},jt=function(Tt,Ot){this.source=Tt,this.index=Ot};jt.prototype={fork:function(Tt){return new jt(this.source,Tt)},parse:function(){var Tt=this.source,Ot=this.skip(ut,this.index),Bt=this.fork(Ot),Kt=Q(Tt,Ot);if(J(ct,Kt))return Bt.number();switch(Kt){case"{":return Bt.object();case"[":return Bt.array();case'"':return Bt.string();case"t":return Bt.keyword(!0);case"f":return Bt.keyword(!1);case"n":return Bt.keyword(null)}throw new U('Unexpected character: "'+Kt+'" at: '+Ot)},node:function(Tt,Ot,Bt,Kt,qt){return new wt(Ot,Kt,Tt?null:tt(this.source,Bt,Kt),qt)},object:function(){for(var Tt=this.source,Ot=this.index+1,Bt=!1,Kt={},qt={},$t=!1;Ot<Tt.length;){if(Ot=this.until(['"',"}"],Ot),Q(Tt,Ot)==="}"&&!Bt){Ot++,$t=!0;break}var Jt=this.fork(Ot).string(),te=Jt.value;Ot=Jt.end,Ot=this.until([":"],Ot)+1,Ot=this.skip(ut,Ot),Jt=this.fork(Ot).parse(),M(qt,te,Jt),M(Kt,te,Jt.value),Ot=this.until([",","}"],Jt.end);var de=Q(Tt,Ot);if(de===",")Bt=!0,Ot++;else if(de==="}"){Ot++,$t=!0;break}}if(!$t)throw new U("Unterminated object at: "+Ot);return this.node(pt,Kt,this.index,Ot,qt)},array:function(){for(var Tt=this.source,Ot=this.index+1,Bt=!1,Kt=[],qt=[],$t=!1;Ot<Tt.length;){if(Ot=this.skip(ut,Ot),Q(Tt,Ot)==="]"&&!Bt){Ot++,$t=!0;break}var Jt=this.fork(Ot).parse();if(q(qt,Jt),q(Kt,Jt.value),Ot=this.until([",","]"],Jt.end),Q(Tt,Ot)===",")Bt=!0,Ot++;else if(Q(Tt,Ot)==="]"){Ot++,$t=!0;break}}if(!$t)throw new U("Unterminated array at: "+Ot);return this.node(pt,Kt,this.index,Ot,qt)},string:function(){var Tt=this.index,Ot=D(this.source,this.index+1);return this.node(gt,Ot.value,Tt,Ot.end)},number:function(){var Tt=this.source,Ot=this.index,Bt=Ot;if(Q(Tt,Bt)==="-"&&Bt++,Q(Tt,Bt)==="0")Bt++;else if(J(ft,Q(Tt,Bt)))Bt=this.skip(rt,Bt+1);else throw new U("Failed to parse number at: "+Bt);if(Q(Tt,Bt)==="."){var Kt=Bt+1;if(Bt=this.skip(rt,Kt),Kt===Bt)throw new U("Failed to parse number's fraction at: "+Bt)}if(Q(Tt,Bt)==="e"||Q(Tt,Bt)==="E"){Bt++,(Q(Tt,Bt)==="+"||Q(Tt,Bt)==="-")&&Bt++;var qt=Bt;if(Bt=this.skip(rt,Bt),qt===Bt)throw new U("Failed to parse number's exponent value at: "+Bt)}return this.node(gt,X(tt(Tt,Ot,Bt)),Ot,Bt)},keyword:function(Tt){var Ot=""+Tt,Bt=this.index,Kt=Bt+Ot.length;if(tt(this.source,Bt,Kt)!==Ot)throw new U("Failed to parse value at: "+Bt);return this.node(gt,Tt,Bt,Kt)},skip:function(Tt,Ot){for(var Bt=this.source;Ot<Bt.length&&J(Tt,Q(Bt,Ot));Ot++);return Ot},until:function(Tt,Ot){Ot=this.skip(ut,Ot);for(var Bt=Q(this.source,Ot),Kt=0;Kt<Tt.length;Kt++)if(Tt[Kt]===Bt)return Ot;throw new U('Unexpected character: "'+Bt+'" at: '+Ot)}};var Ut=$(function(){var Tt="9007199254740993",Ot;return j(Tt,function(Bt,Kt,qt){Ot=qt.source}),Ot!==Tt}),yt=z&&!$(function(){return 1/j("-0 ")!==-1/0});g({target:"JSON",stat:!0,forced:Ut},{parse:function(Ot,Bt){return yt&&!C(Bt)?j(Ot):mt(Ot,Bt)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(303),m=i(98),y=i(23),T=i(14),A=i(68),C=i(90),I=i(51).set,R=SyntaxError,O=y("JSON","parse"),F=y("Object","create"),L=y("Object","freeze"),M=T("".charAt),$="Unacceptable as raw JSON",D=function(z){return z===" "||z===" "||z===`
|
|
26
|
+
`||z==="\r"};g({target:"JSON",stat:!0,forced:!m},{rawJSON:function(H){var X=A(H);if(X===""||D(M(X,0))||D(M(X,X.length-1)))throw new R($);var U=O(X);if(typeof U=="object"&&U!==null)throw new R($);var j=F(null);return I(j,{type:"RawJSON"}),C(j,"rawJSON",X),p?L(j):j}})}),(function(S,P,i){"use strict";var g=i(7);S.exports=!g(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(S,P,i){"use strict";var g=i(4),p=i(82);p(g.JSON,"JSON",!0)}),(function(S,P,i){"use strict";i(306)}),(function(S,P,i){"use strict";var g=i(307),p=i(311);g("Map",function(m){return function(){return m(this,arguments.length?arguments[0]:void 0)}},p)}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(14),y=i(67),T=i(47),A=i(308),C=i(137),I=i(216),R=i(21),O=i(17),F=i(20),L=i(7),M=i(172),$=i(82),D=i(124);S.exports=function(z,H,X){var U=z.indexOf("Map")!==-1,j=z.indexOf("Weak")!==-1,W=U?"set":"add",K=p[z],Q=K&&K.prototype,tt=K,J={},q=function(mt){var St=m(Q[mt]);T(Q,mt,mt==="add"?function(wt){return St(this,wt===0?0:wt),this}:mt==="delete"?function(Ct){return j&&!F(Ct)?!1:St(this,Ct===0?0:Ct)}:mt==="get"?function(wt){return j&&!F(wt)?void 0:St(this,wt===0?0:wt)}:mt==="has"?function(wt){return j&&!F(wt)?!1:St(this,wt===0?0:wt)}:function(wt,jt){return St(this,wt===0?0:wt,jt),this})},rt=y(z,!R(K)||!(j||Q.forEach&&!L(function(){new K().entries().next()})));if(rt)tt=X.getConstructor(H,z,U,W),A.enable();else if(y(z,!0)){var ft=new tt,ct=ft[W](j?{}:-0,1)!==ft,ut=L(function(){ft.has(1)}),gt=M(function(mt){new K(mt)}),pt=!j&&L(function(){for(var mt=new K,St=5;St--;)mt[W](St,St);return!mt.has(-0)});gt||(tt=H(function(mt,St){I(mt,Q);var Ct=D(new K,mt,tt);return O(St)||C(St,Ct[W],{that:Ct,AS_ENTRIES:U}),Ct}),tt.prototype=Q,Q.constructor=tt),(ut||pt)&&(q("delete"),q("has"),U&&q("get")),(pt||ct)&&q(W),j&&Q.clear&&delete Q.clear}return J[z]=tt,g({global:!0,constructor:!0,forced:tt!==K},J),$(tt,z),j||X.setStrong(tt,z,U),tt}}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(54),y=i(20),T=i(38),A=i(44).f,C=i(57),I=i(75),R=i(309),O=i(40),F=i(303),L=!1,M=O("meta"),$=0,D=function(W){A(W,M,{value:{objectID:"O"+$++,weakData:{}}})},z=function(W,K){if(!y(W))return typeof W=="symbol"?W:(typeof W=="string"?"S":"P")+W;if(!T(W,M)){if(!R(W))return"F";if(!K)return"E";D(W)}return W[M].objectID},H=function(W,K){if(!T(W,M)){if(!R(W))return!0;if(!K)return!1;D(W)}return W[M].weakData},X=function(W){return F&&L&&R(W)&&!T(W,M)&&D(W),W},U=function(){j.enable=function(){},L=!0;var W=C.f,K=p([].splice),Q={};Q[M]=1,W(Q).length&&(C.f=function(tt){for(var J=W(tt),q=0,rt=J.length;q<rt;q++)if(J[q]===M){K(J,q,1);break}return J},g({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:I.f}))},j=S.exports={enable:U,fastKey:z,getWeakData:H,onFreeze:X};m[M]=!0}),(function(S,P,i){"use strict";var g=i(7),p=i(20),m=i(15),y=i(310),T=Object.isExtensible,A=g(function(){T(1)});S.exports=A||y?function(I){return!p(I)||y&&m(I)==="ArrayBuffer"?!1:T?T(I):!0}:T}),(function(S,P,i){"use strict";var g=i(7);S.exports=g(function(){if(typeof ArrayBuffer=="function"){var p=new ArrayBuffer(8);Object.isExtensible(p)&&Object.defineProperty(p,"a",{value:8})}})}),(function(S,P,i){"use strict";var g=i(71),p=i(77),m=i(215),y=i(84),T=i(216),A=i(17),C=i(137),I=i(177),R=i(180),O=i(201),F=i(6),L=i(308).fastKey,M=i(51),$=M.set,D=M.getterFor;S.exports={getConstructor:function(z,H,X,U){var j=z(function(J,q){T(J,W),$(J,{type:H,index:g(null),first:null,last:null,size:0}),F||(J.size=0),A(q)||C(q,J[U],{that:J,AS_ENTRIES:X})}),W=j.prototype,K=D(H),Q=function(J,q,rt){var ft=K(J),ct=tt(J,q),ut,gt;return ct?ct.value=rt:(ft.last=ct={index:gt=L(q,!0),key:q,value:rt,previous:ut=ft.last,next:null,removed:!1},ft.first||(ft.first=ct),ut&&(ut.next=ct),F?ft.size++:J.size++,gt!=="F"&&(ft.index[gt]=ct)),J},tt=function(J,q){var rt=K(J),ft=L(q),ct;if(ft!=="F")return rt.index[ft];for(ct=rt.first;ct;ct=ct.next)if(ct.key===q)return ct};return m(W,{clear:function(){for(var q=this,rt=K(q),ft=rt.first;ft;)ft.removed=!0,ft.previous&&(ft.previous=ft.previous.next=null),ft=ft.next;rt.first=rt.last=null,rt.index=g(null),F?rt.size=0:q.size=0},delete:function(J){var q=this,rt=K(q),ft=tt(q,J);if(ft){var ct=ft.next,ut=ft.previous;delete rt.index[ft.index],ft.removed=!0,ut&&(ut.next=ct),ct&&(ct.previous=ut),rt.first===ft&&(rt.first=ct),rt.last===ft&&(rt.last=ut),F?rt.size--:q.size--}return!!ft},forEach:function(q){for(var rt=K(this),ft=y(q,arguments.length>1?arguments[1]:void 0),ct;ct=ct?ct.next:rt.first;)for(ft(ct.value,ct.key,this);ct&&ct.removed;)ct=ct.previous},has:function(q){return!!tt(this,q)}}),m(W,X?{get:function(q){var rt=tt(this,q);return rt&&rt.value},set:function(q,rt){return Q(this,q===0?0:q,rt)}}:{add:function(q){return Q(this,q=q===0?0:q,q)}}),F&&p(W,"size",{configurable:!0,get:function(){return K(this).size}}),j},setStrong:function(z,H,X){var U=H+" Iterator",j=D(H),W=D(U);I(z,H,function(K,Q){$(this,{type:U,target:K,state:j(K),kind:Q,last:null})},function(){for(var K=W(this),Q=K.kind,tt=K.last;tt&&tt.removed;)tt=tt.previous;return!K.target||!(K.last=tt=tt?tt.next:K.state.first)?(K.target=null,R(void 0,!0)):R(Q==="keys"?tt.key:Q==="values"?tt.value:[tt.key,tt.value],!1)},X?"entries":"values",!X,!0),O(H)}}}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(30),y=i(16),T=i(137),A=i(148),C=i(313),I=i(36),R=i(7),O=C.Map,F=C.has,L=C.get,M=C.set,$=p([].push),D=I||R(function(){return O.groupBy("ab",function(z){return z}).get("a").length!==1});g({target:"Map",stat:!0,forced:I||D},{groupBy:function(H,X){y(H),m(X);var U=new O,j=0;return T(H,function(W){A(j);var K=X(W,j++);F(U,K)?$(L(U,K),W):M(U,K,[W])}),U}})}),(function(S,P,i){"use strict";var g=i(14),p=Map.prototype;S.exports={Map,set:g(p.set),get:g(p.get),has:g(p.has),remove:g(p.delete),proto:p}}),(function(S,P,i){"use strict";var g=i(3),p=i(313),m=i(36),y=p.get,T=p.has,A=p.set;g({target:"Map",proto:!0,real:!0,forced:m},{getOrInsert:function(I,R){return T(this,I)?y(this,I):(A(this,I,R),R)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(30),m=i(313),y=i(36),T=m.get,A=m.has,C=m.set;g({target:"Map",proto:!0,real:!0,forced:y},{getOrInsertComputed:function(R,O){var F=A(this,R);if(p(O),F)return T(this,R);R===0&&1/R===-1/0&&(R=0);var L=O(R);return C(this,R,L),L}})}),(function(S,P,i){"use strict";var g=i(3),p=i(317),m=Math.acosh,y=Math.log,T=Math.sqrt,A=Math.LN2,C=!m||Math.floor(m(Number.MAX_VALUE))!==710||m(1/0)!==1/0;g({target:"Math",stat:!0,forced:C},{acosh:function(R){var O=+R;return O<1?NaN:O>9490626562425156e-8?y(O)+A:p(O-1+T(O-1)*T(O+1))}})}),(function(S){"use strict";var P=Math.log;S.exports=Math.log1p||function(g){var p=+g;if(p>-1e-8&&p<1e-8)return p-p*p/2;var m=1+p;return m===1?p:p===m-1?P(m):p*P(m)/(m-1)}}),(function(S,P,i){"use strict";var g=i(3),p=i(317),m=Math.asinh,y=Math.abs,T=Math.log,A=Math.sqrt,C=Math.LN2,I=9490626562425156e-8;function R(F){var L=+F;return!isFinite(L)||L===0?L:L<0?-R(-L):L>I?T(L)+C:L<1e-8?L:p(L+L*L/(1+A(L*L+1)))}var O=!(m&&1/m(0)>0&&y(m(1e-8)-1e-8)<1e-16);g({target:"Math",stat:!0,forced:O},{asinh:R})}),(function(S,P,i){"use strict";var g=i(3),p=i(317),m=Math.atanh,y=!(m&&1/m(-0)<0);g({target:"Math",stat:!0,forced:y},{atanh:function(A){var C=+A;return C===0?C:p(2*C/(1-C))/2}})}),(function(S,P,i){"use strict";var g=i(3),p=i(220),m=Math.cbrt,y=Math.abs,T=Math.pow,A=!m||m(27)!==3||m(64)!==4;g({target:"Math",stat:!0,forced:A},{cbrt:function(I){var R=+I,O=p(R)*T(y(R),1/3);return R!==0&&isFinite(R)?(2*O+R/(O*O))/3:O}})}),(function(S,P,i){"use strict";var g=i(3),p=Math.floor,m=Math.log,y=Math.LOG2E;g({target:"Math",stat:!0},{clz32:function(A){var C=A>>>0;return C?31-p(m(C+.5)*y):32}})}),(function(S,P,i){"use strict";var g=i(3),p=i(323),m=Math.cosh,y=Math.abs,T=Math.E,A=!m||m(710)===1/0;g({target:"Math",stat:!0,forced:A},{cosh:function(I){var R=p(y(I)-1)+1;return(R+1/(R*T*T))*(T/2)}})}),(function(S){"use strict";var P=Math.expm1,i=Math.exp;S.exports=!P||P(10)>22025.465794806718||P(10)<22025.465794806718||P(-2e-17)!==-2e-17?function(p){var m=+p;return m===0?m:m>-1e-6&&m<1e-6?m+m*m/2:i(m)-1}:P}),(function(S,P,i){"use strict";var g=i(3),p=i(323);g({target:"Math",stat:!0,forced:p!==Math.expm1},{expm1:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(218);g({target:"Math",stat:!0},{fround:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(219),m=.0009765625,y=65504,T=6103515625e-14;g({target:"Math",stat:!0},{f16round:function(C){return p(C,m,y,T)}})}),(function(S,P,i){"use strict";var g=i(3),p=Math.hypot,m=Math.abs,y=Math.sqrt,T=!!p&&p(1/0,NaN)!==1/0;g({target:"Math",stat:!0,arity:2,forced:T},{hypot:function(C,I){for(var R=0,O=0,F=arguments.length,L=0,M,$;O<F;)M=m(arguments[O++]),L<M?($=L/M,R=R*$*$+1,L=M):M>0?($=M/L,R+=$*$):R+=M;return L===1/0?1/0:L*y(R)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=Math.imul,y=p(function(){return m(4294967295,5)!==-5||m.length!==2});g({target:"Math",stat:!0,forced:y},{imul:function(A,C){var I=65535,R=+A,O=+C,F=I&R,L=I&O;return 0|F*L+((I&R>>>16)*L+F*(I&O>>>16)<<16>>>0)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(330);g({target:"Math",stat:!0},{log10:p})}),(function(S){"use strict";var P=Math.log,i=Math.LOG10E;S.exports=Math.log10||function(p){return P(p)*i}}),(function(S,P,i){"use strict";var g=i(3),p=i(317);g({target:"Math",stat:!0},{log1p:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(231);g({target:"Math",stat:!0},{log2:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(220);g({target:"Math",stat:!0},{sign:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(323),y=Math.abs,T=Math.exp,A=Math.E,C=p(function(){return Math.sinh(-2e-17)!==-2e-17});g({target:"Math",stat:!0,forced:C},{sinh:function(R){var O=+R;return y(O)<1?(m(O)-m(-O))/2:(T(O-1)-T(-O-1))*(A/2)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(137),y=i(7),T=i(140),A=i(119),C=i(33),I=RangeError,R=TypeError,O=1/0,F=NaN,L=Math.sumPrecise,M=Math.abs,$=Math.pow,D=p([].push),z=C("iterator"),H=$(2,1023),X=$(2,53)-1,U=Number.MAX_VALUE,j=$(2,971),W={},K={},Q={},tt={},J={},q=y(function(){if(L([-1])!==-1||L([-U])!==-U)return!0;if(!A)return!1;try{return L(A([1],{})),!0}catch(ct){}try{var ft={};return ft[z]=function(){return this},L(A(T([1]),ft)),!0}catch(ct){}}),rt=function(ft,ct){var ut=ft+ct,gt=ct-(ut-ft);return{hi:ut,lo:gt}};g({target:"Math",stat:!0,forced:q},{sumPrecise:function(ct){var ut=[],gt=0,pt=tt;switch(m(ct,function(te){if(++gt>X)throw new I("Maximum allowed index exceeded");if(typeof te!="number")throw new R("Value is not a number");pt!==W&&(te!==te?pt=W:te===O?pt=pt===K?W:Q:te===-O?pt=pt===Q?W:K:(te!==0||1/te===O)&&(pt===tt||pt===J)&&(pt=J,D(ut,te)))}),pt){case W:return F;case K:return-O;case Q:return O;case tt:return-0}for(var mt=[],St=0,Ct,wt,jt,Ut,yt,Tt,Ot=0;Ot<ut.length;Ot++){Ct=ut[Ot];for(var Bt=0,Kt=0;Kt<mt.length;Kt++){if(wt=mt[Kt],M(Ct)<M(wt)&&(Tt=Ct,Ct=wt,wt=Tt),jt=rt(Ct,wt),Ut=jt.hi,yt=jt.lo,M(Ut)===O){var qt=Ut===O?1:-1;St+=qt,Ct=Ct-qt*H-qt*H,M(Ct)<M(wt)&&(Tt=Ct,Ct=wt,wt=Tt),jt=rt(Ct,wt),Ut=jt.hi,yt=jt.lo}yt!==0&&(mt[Bt++]=yt),Ct=Ut}mt.length=Bt,Ct!==0&&D(mt,Ct)}var $t=mt.length-1;if(Ut=0,yt=0,St!==0){var Jt=$t>=0?mt[$t]:0;if($t--,M(St)>1||St>0&&Jt>0||St<0&&Jt<0)return St>0?O:-O;if(jt=rt(St*H,Jt/2),Ut=jt.hi,yt=jt.lo,yt*=2,M(2*Ut)===O)return Ut>0?Ut===H&&yt===-(j/2)&&$t>=0&&mt[$t]<0?U:O:Ut===-H&&yt===j/2&&$t>=0&&mt[$t]>0?-U:-O;yt!==0&&(mt[++$t]=yt,yt=0),Ut*=2}for(;$t>=0&&(jt=rt(Ut,mt[$t--]),Ut=jt.hi,yt=jt.lo,yt===0););return $t>=0&&(yt<0&&mt[$t]<0||yt>0&&mt[$t]>0)&&(wt=yt*2,Ct=Ut+wt,wt===Ct-Ut&&(Ut=Ct)),Ut}})}),(function(S,P,i){"use strict";var g=i(3),p=i(323),m=Math.exp;g({target:"Math",stat:!0},{tanh:function(T){var A=+T,C=p(A),I=p(-A);return C===1/0?1:I===1/0?-1:(C-I)/(m(A)+m(-A))}})}),(function(S,P,i){"use strict";var g=i(82);g(Math,"Math",!0)}),(function(S,P,i){"use strict";var g=i(3),p=i(62);g({target:"Math",stat:!0},{trunc:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(36),m=i(6),y=i(4),T=i(80),A=i(14),C=i(67),I=i(38),R=i(124),O=i(24),F=i(22),L=i(19),M=i(7),$=i(57).f,D=i(5).f,z=i(44).f,H=i(96),X=i(340).trim,U="Number",j=y[U],W=T[U],K=j.prototype,Q=y.TypeError,tt=A("".slice),J=A("".charCodeAt),q=function(pt){var mt=L(pt,"number");return typeof mt=="bigint"?mt:rt(mt)},rt=function(pt){var mt=L(pt,"number"),St,Ct,wt,jt,Ut,yt,Tt,Ot;if(F(mt))throw new Q("Cannot convert a Symbol value to a number");if(typeof mt=="string"&&mt.length>2){if(mt=X(mt),St=J(mt,0),St===43||St===45){if(Ct=J(mt,2),Ct===88||Ct===120)return NaN}else if(St===48){switch(J(mt,1)){case 66:case 98:wt=2,jt=49;break;case 79:case 111:wt=8,jt=55;break;default:return+mt}for(Ut=tt(mt,2),yt=Ut.length,Tt=0;Tt<yt;Tt++)if(Ot=J(Ut,Tt),Ot<48||Ot>jt)return NaN;return parseInt(Ut,wt)}}return+mt},ft=C(U,!j(" 0o1")||!j("0b1")||j("+0x1")),ct=function(pt){return O(K,pt)&&M(function(){H(pt)})},ut=function(mt){var St=arguments.length<1?0:j(q(mt));return ct(this)?R(Object(St),this,ut):St};ut.prototype=K,ft&&!p&&(K.constructor=ut),g({global:!0,constructor:!0,wrap:!0,forced:ft},{Number:ut});var gt=function(pt,mt){for(var St=m?$(mt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ct=0,wt;St.length>Ct;Ct++)I(mt,wt=St[Ct])&&!I(pt,wt)&&z(pt,wt,D(mt,wt))};p&&W&>(T[U],W),(ft||p)&>(T[U],j)}),(function(S,P,i){"use strict";var g=i(14),p=i(16),m=i(68),y=i(341),T=g("".replace),A=RegExp("^["+y+"]+"),C=RegExp("(^|[^"+y+"])["+y+"]+$"),I=function(R){return function(O){var F=m(p(O));return R&1&&(F=T(F,A,"")),R&2&&(F=T(F,C,"$1")),F}};S.exports={start:I(1),end:I(2),trim:I(3)}}),(function(S){"use strict";S.exports=`
|
|
27
|
+
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`}),(function(S,P,i){"use strict";var g=i(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(S,P,i){"use strict";var g=i(3),p=i(344);g({target:"Number",stat:!0},{isFinite:p})}),(function(S,P,i){"use strict";var g=i(4),p=g.isFinite;S.exports=Number.isFinite||function(y){return typeof y=="number"&&p(y)}}),(function(S,P,i){"use strict";var g=i(3),p=i(269);g({target:"Number",stat:!0},{isInteger:p})}),(function(S,P,i){"use strict";var g=i(3);g({target:"Number",stat:!0},{isNaN:function(m){return m!==m}})}),(function(S,P,i){"use strict";var g=i(3),p=i(269),m=Math.abs;g({target:"Number",stat:!0},{isSafeInteger:function(T){return p(T)&&m(T)<=9007199254740991}})}),(function(S,P,i){"use strict";var g=i(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(S,P,i){"use strict";var g=i(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(S,P,i){"use strict";var g=i(3),p=i(351);g({target:"Number",stat:!0,forced:Number.parseFloat!==p},{parseFloat:p})}),(function(S,P,i){"use strict";var g=i(4),p=i(7),m=i(14),y=i(68),T=i(340).trim,A=i(341),C=m("".charAt),I=g.parseFloat,R=g.Symbol,O=R&&R.iterator,F=1/I(A+"-0")!==-1/0||O&&!p(function(){I(Object(O))});S.exports=F?function(M){var $=T(y(M)),D=I($);return D===0&&C($,0)==="-"?-0:D}:I}),(function(S,P,i){"use strict";var g=i(3),p=i(353);g({target:"Number",stat:!0,forced:Number.parseInt!==p},{parseInt:p})}),(function(S,P,i){"use strict";var g=i(4),p=i(7),m=i(14),y=i(68),T=i(340).trim,A=i(341),C=g.parseInt,I=g.Symbol,R=I&&I.iterator,O=/^[+-]?0x/i,F=m(O.exec),L=C(A+"08")!==8||C(A+"0x16")!==22||R&&!p(function(){C(Object(R))});S.exports=L?function($,D){var z=T(y($));return C(z,D>>>0||(F(O,z)?16:10))}:C}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(61),y=i(96),T=i(249),A=i(330),C=i(7),I=RangeError,R=String,O=isFinite,F=Math.abs,L=Math.floor,M=Math.pow,$=Math.round,D=p(1.1.toExponential),z=p(T),H=p("".slice),X=M(10,308),U=D(-69e-12,4)==="-6.9000e-11"&&D(1.255,2)==="1.25e+0"&&D(12345,3)==="1.235e+4"&&D(25,0)==="3e+1",j=function(){return C(function(){D(1,1/0)})&&C(function(){D(1,-1/0)})},W=function(){return!C(function(){D(1/0,1/0),D(NaN,1/0)})},K=!U||!j()||!W();g({target:"Number",proto:!0,forced:K},{toExponential:function(tt){var J=y(this);if(tt===void 0)return D(J);var q=m(tt);if(!O(J))return String(J);if(q<0||q>20)throw new I("Incorrect fraction digits");if(U)return D(J,q);var rt="",ft,ct,ut,gt,pt,mt,St;return J<0&&(rt="-",J=-J),J===0?(ct=0,ft=z("0",q+1)):(pt=A(J),ct=L(pt),q-ct>=308?St=J*X*M(10,q-ct-308):St=J/M(10,ct-q),mt=$(St),St-mt>=.5&&(mt+=1),mt>=M(10,q+1)&&(mt/=10,ct+=1),ft=R(mt)),q!==0&&(ft=H(ft,0,1)+"."+H(ft,1)),ct===0?(ut="+",gt="0"):(ut=ct>0?"+":"-",gt=R(F(ct))),ft+="e"+ut+gt,rt+ft}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(61),y=i(96),T=i(249),A=i(7),C=RangeError,I=String,R=Math.floor,O=p(T),F=p("".slice),L=p(1.1.toFixed),M=function(U,j,W){return j===0?W:j%2===1?M(U,j-1,W*U):M(U*U,j/2,W)},$=function(U){for(var j=0,W=U;W>=4096;)j+=12,W/=4096;for(;W>=2;)j+=1,W/=2;return j},D=function(U,j,W){for(var K=-1,Q=W;++K<6;)Q+=j*U[K],U[K]=Q%1e7,Q=R(Q/1e7)},z=function(U,j){for(var W=6,K=0;--W>=0;)K+=U[W],U[W]=R(K/j),K=K%j*1e7},H=function(U){for(var j=6,W="";--j>=0;)if(W!==""||j===0||U[j]!==0){var K=I(U[j]);W=W===""?K:W+O("0",7-K.length)+K}return W},X=A(function(){return L(8e-5,3)!=="0.000"||L(.9,0)!=="1"||L(1.255,2)!=="1.25"||L(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!A(function(){L({})});g({target:"Number",proto:!0,forced:X},{toFixed:function(j){var W=y(this),K=m(j),Q=[0,0,0,0,0,0],tt="",J="0",q,rt,ft,ct;if(K<0||K>20)throw new C("Incorrect fraction digits");if(W!==W)return"NaN";if(W<=-1e21||W>=1e21)return I(W);if(W<0&&(tt="-",W=-W),W>1e-21)if(q=$(W*M(2,69,1))-69,rt=q<0?W*M(2,-q,1):W/M(2,q,1),rt*=4503599627370496,q=52-q,q>0){for(D(Q,0,rt),ft=K;ft>=7;)D(Q,1e7,0),ft-=7;for(D(Q,M(10,ft,1),0),ft=q-1;ft>=23;)z(Q,8388608),ft-=23;z(Q,1<<ft),D(Q,1,1),z(Q,2),J=H(Q)}else D(Q,0,rt),D(Q,1<<-q,0),J=H(Q)+O("0",K);return K>0?(ct=J.length,J=tt+(ct<=K?"0."+O("0",K-ct)+J:F(J,0,ct-K)+"."+F(J,ct-K))):J=tt+J,J}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(7),y=i(96),T=p(1.1.toPrecision),A=m(function(){return T(1,void 0)!=="1"})||!m(function(){T({})});g({target:"Number",proto:!0,forced:A},{toPrecision:function(I){return I===void 0?T(y(this)):T(y(this),I)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(358);g({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})}),(function(S,P,i){"use strict";var g=i(6),p=i(14),m=i(8),y=i(7),T=i(73),A=i(66),C=i(10),I=i(39),R=i(13),O=Object.assign,F=Object.defineProperty,L=p([].concat);S.exports=!O||y(function(){if(g&&O({b:1},O(F({},"a",{enumerable:!0,get:function(){F(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},$={},D=Symbol("assign detection"),z="abcdefghijklmnopqrst";return M[D]=7,z.split("").forEach(function(H){$[H]=H}),O({},M)[D]!==7||T(O({},$)).join("")!==z})?function($,D){for(var z=I($),H=arguments.length,X=1,U=A.f,j=C.f;H>X;)for(var W=R(arguments[X++]),K=U?L(T(W),U(W)):T(W),Q=K.length,tt=0,J;Q>tt;)J=K[tt++],(!g||m(j,W,J))&&(z[J]=W[J]);return z}:O}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(71);g({target:"Object",stat:!0,sham:!p},{create:m})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(361),y=i(30),T=i(39),A=i(44);p&&g({target:"Object",proto:!0,forced:m},{__defineGetter__:function(I,R){A.f(T(this),I,{get:y(R),enumerable:!0,configurable:!0})}})}),(function(S,P,i){"use strict";var g=i(36),p=i(4),m=i(7),y=i(199);S.exports=g||!m(function(){if(!(y&&y<535)){var T=Math.random();__defineSetter__.call(null,T,function(){}),delete p[T]}})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(72).f;g({target:"Object",stat:!0,forced:Object.defineProperties!==m,sham:!p},{defineProperties:m})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(44).f;g({target:"Object",stat:!0,forced:Object.defineProperty!==m,sham:!p},{defineProperty:m})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(361),y=i(30),T=i(39),A=i(44);p&&g({target:"Object",proto:!0,forced:m},{__defineSetter__:function(I,R){A.f(T(this),I,{set:y(R),enumerable:!0,configurable:!0})}})}),(function(S,P,i){"use strict";var g=i(3),p=i(366).entries;g({target:"Object",stat:!0},{entries:function(y){return p(y)}})}),(function(S,P,i){"use strict";var g=i(6),p=i(7),m=i(14),y=i(135),T=i(73),A=i(12),C=i(10).f,I=m(C),R=m([].push),O=g&&p(function(){var L=Object.create(null);return L[2]=2,!I(L,2)}),F=function(L){return function(M){for(var $=A(M),D=T($),z=O&&y($)===null,H=D.length,X=0,U=[],j;H>X;)j=D[X++],(!g||(z?j in $:I($,j)))&&R(U,L?[j,$[j]]:$[j]);return U}};S.exports={entries:F(!0),values:F(!1)}}),(function(S,P,i){"use strict";var g=i(3),p=i(303),m=i(7),y=i(20),T=i(308).onFreeze,A=Object.freeze,C=m(function(){A(1)});g({target:"Object",stat:!0,forced:C,sham:!p},{freeze:function(R){return A&&y(R)?A(T(R)):R}})}),(function(S,P,i){"use strict";var g=i(3),p=i(137),m=i(90);g({target:"Object",stat:!0},{fromEntries:function(T){var A={};return p(T,function(C,I){m(A,C,I)},{AS_ENTRIES:!0}),A}})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(12),y=i(5).f,T=i(6),A=!T||p(function(){y(1)});g({target:"Object",stat:!0,forced:A,sham:!T},{getOwnPropertyDescriptor:function(I,R){return y(m(I),R)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(56),y=i(12),T=i(5),A=i(90);g({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(I){for(var R=y(I),O=T.f,F=m(R),L={},M=0,$,D;F.length>M;)D=O(R,$=F[M++]),D!==void 0&&A(L,$,D);return L}})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(75).f,y=p(function(){return!Object.getOwnPropertyNames(1)});g({target:"Object",stat:!0,forced:y},{getOwnPropertyNames:m})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(39),y=i(135),T=i(136),A=p(function(){y(1)});g({target:"Object",stat:!0,forced:A,sham:!T},{getPrototypeOf:function(I){return y(m(I))}})}),(function(S,P,i){"use strict";var g=i(3),p=i(90),m=i(23),y=i(14),T=i(30),A=i(16),C=i(18),I=i(137),R=i(148),O=i(7),F=Object.groupBy,L=m("Object","create"),M=y([].push),$=!F||O(function(){return F("ab",function(D){return D}).a.length!==1});g({target:"Object",stat:!0,forced:$},{groupBy:function(z,H){A(z),T(H);var X=L(null),U=0;return I(z,function(j){R(U);var W=C(H(j,U++));W in X?M(X[W],j):p(X,W,[j])}),X}})}),(function(S,P,i){"use strict";var g=i(3),p=i(38);g({target:"Object",stat:!0},{hasOwn:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(376);g({target:"Object",stat:!0},{is:p})}),(function(S){"use strict";S.exports=Object.is||function(i,g){return i===g?i!==0||1/i===1/g:i!==i&&g!==g}}),(function(S,P,i){"use strict";var g=i(3),p=i(309);g({target:"Object",stat:!0,forced:Object.isExtensible!==p},{isExtensible:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(20),y=i(15),T=i(310),A=Object.isFrozen,C=T||p(function(){A(1)});g({target:"Object",stat:!0,forced:C},{isFrozen:function(R){return!m(R)||T&&y(R)==="ArrayBuffer"?!0:A?A(R):!1}})}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(20),y=i(15),T=i(310),A=Object.isSealed,C=T||p(function(){A(1)});g({target:"Object",stat:!0,forced:C},{isSealed:function(R){return!m(R)||T&&y(R)==="ArrayBuffer"?!0:A?A(R):!1}})}),(function(S,P,i){"use strict";var g=i(3),p=i(39),m=i(73),y=i(7),T=y(function(){m(1)});g({target:"Object",stat:!0,forced:T},{keys:function(C){return m(p(C))}})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(361),y=i(39),T=i(18),A=i(135),C=i(5).f;p&&g({target:"Object",proto:!0,forced:m},{__lookupGetter__:function(R){var O=y(this),F=T(R),L;do if(L=C(O,F))return L.get;while(O=A(O))}})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(361),y=i(39),T=i(18),A=i(135),C=i(5).f;p&&g({target:"Object",proto:!0,forced:m},{__lookupSetter__:function(R){var O=y(this),F=T(R),L;do if(L=C(O,F))return L.set;while(O=A(O))}})}),(function(S,P,i){"use strict";var g=i(3),p=i(20),m=i(308).onFreeze,y=i(303),T=i(7),A=Object.preventExtensions,C=T(function(){A(1)});g({target:"Object",stat:!0,forced:C,sham:!y},{preventExtensions:function(R){return A&&p(R)?A(m(R)):R}})}),(function(S,P,i){"use strict";var g=i(6),p=i(77),m=i(20),y=i(122),T=i(39),A=i(16),C=Object.getPrototypeOf,I=Object.setPrototypeOf,R=Object.prototype,O="__proto__";if(g&&C&&I&&{}[O]!==R)try{p(R,O,{configurable:!0,get:function(){return C(T(this))},set:function(L){var M=A(this);y(L)&&m(M)&&I(M,L)}})}catch(F){}}),(function(S,P,i){"use strict";var g=i(3),p=i(20),m=i(308).onFreeze,y=i(303),T=i(7),A=Object.seal,C=T(function(){A(1)});g({target:"Object",stat:!0,forced:C,sham:!y},{seal:function(R){return A&&p(R)?A(m(R)):R}})}),(function(S,P,i){"use strict";var g=i(3),p=i(119);g({target:"Object",stat:!0},{setPrototypeOf:p})}),(function(S,P,i){"use strict";var g=i(70),p=i(47),m=i(388);g||p(Object.prototype,"toString",m,{unsafe:!0})}),(function(S,P,i){"use strict";var g=i(70),p=i(69);S.exports=g?{}.toString:function(){return"[object "+p(this)+"]"}}),(function(S,P,i){"use strict";var g=i(3),p=i(366).values;g({target:"Object",stat:!0},{values:function(y){return p(y)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(351);g({global:!0,forced:parseFloat!==p},{parseFloat:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(353);g({global:!0,forced:parseInt!==p},{parseInt:p})}),(function(S,P,i){"use strict";i(393),i(409),i(411),i(412),i(413),i(414)}),(function(S,P,i){"use strict";var g=i(3),p=i(36),m=i(189),y=i(4),T=i(80),A=i(8),C=i(47),I=i(119),R=i(82),O=i(201),F=i(30),L=i(21),M=i(20),$=i(216),D=i(394),z=i(396).set,H=i(399),X=i(404),U=i(405),j=i(401),W=i(51),K=i(406),Q=i(407),tt=i(408),J="Promise",q=Q.CONSTRUCTOR,rt=Q.REJECTION_EVENT,ft=Q.SUBCLASSING,ct=W.getterFor(J),ut=W.set,gt=K&&K.prototype,pt=K,mt=gt,St=y.TypeError,Ct=y.document,wt=y.process,jt=tt.f,Ut=jt,yt=!!(Ct&&Ct.createEvent&&y.dispatchEvent),Tt="unhandledrejection",Ot="rejectionhandled",Bt=0,Kt=1,qt=2,$t=1,Jt=2,te,de,ue,he,Ee=function(Wt){var Ht;return M(Wt)&&L(Ht=Wt.then)?Ht:!1},$e=function(Wt,Ht){var ie=Ht.value,fe=Ht.state===Kt,me=fe?Wt.ok:Wt.fail,Qe=Wt.resolve,vt=Wt.reject,Mt=Wt.domain,It,Dt,zt;try{me?(fe||(Ht.rejection===Jt&&Ft(Ht),Ht.rejection=$t),me===!0?It=ie:(Mt&&Mt.enter(),It=me(ie),Mt&&(Mt.exit(),zt=!0)),It===Wt.promise?vt(new St("Promise-chain cycle")):(Dt=Ee(It))?A(Dt,It,Qe,vt):Qe(It)):vt(ie)}catch(Nt){Mt&&!zt&&Mt.exit(),vt(Nt)}},Ie=function(Wt,Ht){Wt.notified||(Wt.notified=!0,H(function(){for(var ie=Wt.reactions,fe;fe=ie.get();)$e(fe,Wt);Wt.notified=!1,Ht&&!Wt.rejection&&ye(Wt)}))},oe=function(Wt,Ht,ie){var fe,me;yt?(fe=Ct.createEvent("Event"),fe.promise=Ht,fe.reason=ie,fe.initEvent(Wt,!1,!0),y.dispatchEvent(fe)):fe={promise:Ht,reason:ie},!rt&&(me=y["on"+Wt])?me(fe):Wt===Tt&&X("Unhandled promise rejection",ie)},ye=function(Wt){A(z,y,function(){var Ht=Wt.facade,ie=Wt.value,fe=ke(Wt),me;if(fe&&(me=U(function(){m?wt.emit("unhandledRejection",ie,Ht):oe(Tt,Ht,ie)}),Wt.rejection=m||ke(Wt)?Jt:$t,me.error))throw me.value})},ke=function(Wt){return Wt.rejection!==$t&&!Wt.parent},Ft=function(Wt){A(z,y,function(){var Ht=Wt.facade;m?wt.emit("rejectionHandled",Ht):oe(Ot,Ht,Wt.value)})},Xt=function(Wt,Ht,ie){return function(fe){Wt(Ht,fe,ie)}},Qt=function(Wt,Ht,ie){Wt.done||(Wt.done=!0,ie&&(Wt=ie),Wt.value=Ht,Wt.state=qt,Ie(Wt,!0))},Re=function(Wt,Ht,ie){if(!Wt.done){Wt.done=!0,ie&&(Wt=ie);try{if(Wt.facade===Ht)throw new St("Promise can't be resolved itself");var fe=Ee(Ht);fe?H(function(){var me={done:!1};try{A(fe,Ht,Xt(Re,me,Wt),Xt(Qt,me,Wt))}catch(Qe){Qt(me,Qe,Wt)}}):(Wt.value=Ht,Wt.state=Kt,Ie(Wt,!1))}catch(me){Qt({done:!1},me,Wt)}}};if(q&&(pt=function(Ht){$(this,mt),F(Ht),A(te,this);var ie=ct(this);try{Ht(Xt(Re,ie),Xt(Qt,ie))}catch(fe){Qt(ie,fe)}},mt=pt.prototype,te=function(Ht){ut(this,{type:J,done:!1,notified:!1,parent:!1,reactions:new j,rejection:!1,state:Bt,value:null})},te.prototype=C(mt,"then",function(Ht,ie){var fe=ct(this),me=jt(D(this,pt));return fe.parent=!0,me.ok=L(Ht)?Ht:!0,me.fail=L(ie)&&ie,me.domain=m?wt.domain:void 0,fe.state===Bt?fe.reactions.add(me):H(function(){$e(me,fe)}),me.promise}),de=function(){var Wt=new te,Ht=ct(Wt);this.promise=Wt,this.resolve=Xt(Re,Ht),this.reject=Xt(Qt,Ht)},tt.f=jt=function(Wt){return Wt===pt||Wt===ue?new de(Wt):Ut(Wt)},!p&&L(K)&>!==Object.prototype)){he=gt.then,ft||C(gt,"then",function(Ht,ie){var fe=this;return new pt(function(me,Qe){A(he,fe,me,Qe)}).then(Ht,ie)},{unsafe:!0});try{delete gt.constructor}catch(Wt){}I&&I(gt,mt)}g({global:!0,constructor:!0,wrap:!0,forced:q},{Promise:pt}),ue=T.Promise,R(pt,J,!1,!0),O(J)}),(function(S,P,i){"use strict";var g=i(46),p=i(395),m=i(17),y=i(33),T=y("species");S.exports=function(A,C){var I=g(A).constructor,R;return I===void 0||m(R=g(I)[T])?C:p(R)}}),(function(S,P,i){"use strict";var g=i(89),p=i(31),m=TypeError;S.exports=function(y){if(g(y))return y;throw new m(p(y)+" is not a constructor")}}),(function(S,P,i){"use strict";var g=i(4),p=i(117),m=i(84),y=i(21),T=i(38),A=i(7),C=i(74),I=i(76),R=i(42),O=i(397),F=i(398),L=i(189),M=g.setImmediate,$=g.clearImmediate,D=g.process,z=g.Dispatch,H=g.Function,X=g.MessageChannel,U=g.String,j=0,W={},K="onreadystatechange",Q,tt,J,q;A(function(){Q=g.location});var rt=function(gt){if(T(W,gt)){var pt=W[gt];delete W[gt],pt()}},ft=function(gt){return function(){rt(gt)}},ct=function(gt){rt(gt.data)},ut=function(gt){g.postMessage(U(gt),Q.protocol+"//"+Q.host)};(!M||!$)&&(M=function(pt){O(arguments.length,1);var mt=y(pt)?pt:H(pt),St=I(arguments,1);return W[++j]=function(){p(mt,void 0,St)},tt(j),j},$=function(pt){delete W[pt]},L?tt=function(gt){D.nextTick(ft(gt))}:z&&z.now?tt=function(gt){z.now(ft(gt))}:X&&!F?(J=new X,q=J.port2,J.port1.onmessage=ct,tt=m(q.postMessage,q)):g.addEventListener&&y(g.postMessage)&&!g.importScripts&&Q&&Q.protocol!=="file:"&&!A(ut)?(tt=ut,g.addEventListener("message",ct,!1)):K in R("script")?tt=function(gt){C.appendChild(R("script"))[K]=function(){C.removeChild(this),rt(gt)}}:tt=function(gt){setTimeout(ft(gt),0)}),S.exports={set:M,clear:$}}),(function(S){"use strict";var P=TypeError;S.exports=function(i,g){if(i<g)throw new P("Not enough arguments");return i}}),(function(S,P,i){"use strict";var g=i(28);S.exports=/ipad|iphone|ipod/i.test(g)&&/applewebkit/i.test(g)}),(function(S,P,i){"use strict";var g=i(4),p=i(400),m=i(84),y=i(396).set,T=i(401),A=i(398),C=i(402),I=i(403),R=i(189),O=g.MutationObserver||g.WebKitMutationObserver,F=g.document,L=g.process,M=g.Promise,$=p("queueMicrotask"),D,z,H,X,U;if(!$){var j=new T,W=function(){var K,Q;for(R&&(K=L.domain)&&K.exit();Q=j.get();)try{Q()}catch(tt){throw j.head&&D(),tt}K&&K.enter()};!A&&!R&&!I&&O&&F?(z=!0,H=F.createTextNode(""),new O(W).observe(H,{characterData:!0}),D=function(){H.data=z=!z}):!C&&M&&M.resolve?(X=M.resolve(void 0),X.constructor=M,U=m(X.then,X),D=function(){U(W)}):R?D=function(){L.nextTick(W)}:(y=m(y,g),D=function(){y(W)}),$=function(K){j.head||D(),j.add(K)}}S.exports=$}),(function(S,P,i){"use strict";var g=i(4),p=i(6),m=Object.getOwnPropertyDescriptor;S.exports=function(y){if(!p)return g[y];var T=m(g,y);return T&&T.value}}),(function(S){"use strict";var P=function(){this.head=null,this.tail=null};P.prototype={add:function(i){var g={item:i,next:null},p=this.tail;p?p.next=g:this.head=g,this.tail=g},get:function(){var i=this.head;if(i){var g=this.head=i.next;return g===null&&(this.tail=null),i.item}}},S.exports=P}),(function(S,P,i){"use strict";var g=i(28);S.exports=/ipad|iphone|ipod/i.test(g)&&typeof Pebble!="undefined"}),(function(S,P,i){"use strict";var g=i(28);S.exports=/web0s(?!.*chrome)/i.test(g)}),(function(S){"use strict";S.exports=function(P,i){try{arguments.length===1?console.error(P):console.error(P,i)}catch(g){}}}),(function(S){"use strict";S.exports=function(P){try{return{error:!1,value:P()}}catch(i){return{error:!0,value:i}}}}),(function(S,P,i){"use strict";var g=i(4);S.exports=g.Promise}),(function(S,P,i){"use strict";var g=i(4),p=i(406),m=i(21),y=i(67),T=i(50),A=i(33),C=i(190),I=i(36),R=i(27),O=p&&p.prototype,F=A("species"),L=!1,M=m(g.PromiseRejectionEvent),$=y("Promise",function(){var D=T(p),z=D!==String(p);if(!z&&R===66||I&&!(O.catch&&O.finally))return!0;if(!R||R<51||!/native code/.test(D)){var H=new p(function(j){j(1)}),X=function(j){j(function(){},function(){})},U=H.constructor={};if(U[F]=X,L=H.then(function(){})instanceof X,!L)return!0}return!z&&(C==="BROWSER"||C==="DENO")&&!M});S.exports={CONSTRUCTOR:$,REJECTION_EVENT:M,SUBCLASSING:L}}),(function(S,P,i){"use strict";var g=i(30),p=TypeError,m=function(y){var T,A;this.promise=new y(function(C,I){if(T!==void 0||A!==void 0)throw new p("Bad Promise constructor");T=C,A=I}),this.resolve=g(T),this.reject=g(A)};S.exports.f=function(y){return new m(y)}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(408),T=i(405),A=i(137),C=i(410);g({target:"Promise",stat:!0,forced:C},{all:function(R){var O=this,F=y.f(O),L=F.resolve,M=F.reject,$=T(function(){var D=m(O.resolve),z=[],H=0,X=1;A(R,function(U){var j=H++,W=!1;X++,p(D,O,U).then(function(K){W||(W=!0,z[j]=K,--X||L(z))},M)}),--X||L(z)});return $.error&&M($.value),F.promise}})}),(function(S,P,i){"use strict";var g=i(406),p=i(172),m=i(407).CONSTRUCTOR;S.exports=m||!p(function(y){g.all(y).then(void 0,function(){})})}),(function(S,P,i){"use strict";var g=i(3),p=i(36),m=i(407).CONSTRUCTOR,y=i(406),T=i(23),A=i(21),C=i(47),I=y&&y.prototype;if(g({target:"Promise",proto:!0,forced:m,real:!0},{catch:function(O){return this.then(void 0,O)}}),!p&&A(y)){var R=T("Promise").prototype.catch;I.catch!==R&&C(I,"catch",R,{unsafe:!0})}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(408),T=i(405),A=i(137),C=i(410);g({target:"Promise",stat:!0,forced:C},{race:function(R){var O=this,F=y.f(O),L=F.reject,M=T(function(){var $=m(O.resolve);A(R,function(D){p($,O,D).then(F.resolve,L)})});return M.error&&L(M.value),F.promise}})}),(function(S,P,i){"use strict";var g=i(3),p=i(408),m=i(407).CONSTRUCTOR;g({target:"Promise",stat:!0,forced:m},{reject:function(T){var A=p.f(this),C=A.reject;return C(T),A.promise}})}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(36),y=i(406),T=i(407).CONSTRUCTOR,A=i(415),C=p("Promise"),I=m&&!T;g({target:"Promise",stat:!0,forced:m||T},{resolve:function(O){return A(I&&this===C?y:this,O)}})}),(function(S,P,i){"use strict";var g=i(46),p=i(20),m=i(408);S.exports=function(y,T){if(g(y),p(T)&&T.constructor===y)return T;var A=m.f(y),C=A.resolve;return C(T),A.promise}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(408),T=i(405),A=i(137),C=i(410);g({target:"Promise",stat:!0,forced:C},{allSettled:function(R){var O=this,F=y.f(O),L=F.resolve,M=F.reject,$=T(function(){var D=m(O.resolve),z=[],H=0,X=1;A(R,function(U){var j=H++,W=!1;X++,p(D,O,U).then(function(K){W||(W=!0,z[j]={status:"fulfilled",value:K},--X||L(z))},function(K){W||(W=!0,z[j]={status:"rejected",reason:K},--X||L(z))})}),--X||L(z)});return $.error&&M($.value),F.promise}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(30),y=i(23),T=i(408),A=i(405),C=i(137),I=i(410),R="No one promise resolved";g({target:"Promise",stat:!0,forced:I},{any:function(F){var L=this,M=y("AggregateError"),$=T.f(L),D=$.resolve,z=$.reject,H=A(function(){var X=m(L.resolve),U=[],j=0,W=1,K=!1;C(F,function(Q){var tt=j++,J=!1;W++,p(X,L,Q).then(function(q){J||K||(K=!0,D(q))},function(q){J||K||(J=!0,U[tt]=q,--W||z(new M(U,R)))})}),--W||z(new M(U,R))});return H.error&&z(H.value),$.promise}})}),(function(S,P,i){"use strict";var g=i(3),p=i(36),m=i(406),y=i(7),T=i(23),A=i(21),C=i(394),I=i(415),R=i(47),O=m&&m.prototype,F=!!m&&y(function(){O.finally.call({then:function(){}},function(){})});if(g({target:"Promise",proto:!0,real:!0,forced:F},{finally:function(M){var $=C(this,T("Promise")),D=A(M);return this.then(D?function(z){return I($,M()).then(function(){return z})}:M,D?function(z){return I($,M()).then(function(){throw z})}:M)}}),!p&&A(m)){var L=T("Promise").prototype.finally;O.finally!==L&&R(O,"finally",L,{unsafe:!0})}}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(117),y=i(76),T=i(415),A=i(408),C=i(30),I=i(405),R=i(7),O=p.Promise,F=!1,L=!O||!O.try||R(function(){var M=O.resolve();return O.try(function($){return F=$===8,M},8)!==M})||!F;g({target:"Promise",stat:!0,forced:L},{try:function(M){var $=arguments.length>1?y(arguments,1):[],D=I(function(){return m(C(M),void 0,$)});if(!D.error)return T(this,D.value);var z=A.f(this),H=z.reject;return H(D.value),z.promise}})}),(function(S,P,i){"use strict";var g=i(3),p=i(408);g({target:"Promise",stat:!0},{withResolvers:function(){var y=p.f(this);return{promise:y.promise,resolve:y.resolve,reject:y.reject}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(422),m=i(7),y=Array.fromAsync,T=!y||m(function(){var A=0;return y.call(function(){return A++,[]},{length:0}),A!==1});g({target:"Array",stat:!0,forced:T},{fromAsync:p})}),(function(S,P,i){"use strict";var g=i(84),p=i(14),m=i(89),y=i(423),T=i(140),A=i(267),C=i(141),I=i(29),R=i(23),O=i(206),F=i(33),L=i(424),M=i(426).toArray,$=F("asyncIterator"),D=p(O("Array","values")),z=p(D([]).next),H=function(){return new X(this)},X=function(U){this.iterator=D(U)};X.prototype.next=function(){return z(this.iterator)},S.exports=function(j){var W=this,K=arguments.length,Q=K>1?arguments[1]:void 0,tt=K>2?arguments[2]:void 0;return new(R("Promise"))(function(J){Q!==void 0&&(Q=g(Q,tt));var q=I(j,$),rt=q?void 0:C(j)||H,ft=m(W)?new W:[],ct=q?y(j,q):new L(A(T(j,rt)));J(M(ct,Q,ft))})}}),(function(S,P,i){"use strict";var g=i(8),p=i(424),m=i(46),y=i(140),T=i(267),A=i(29),C=i(33),I=C("asyncIterator");S.exports=function(R,O){var F=arguments.length<2?A(R,I):O;return F?m(g(F,R)):new p(T(y(R)))}}),(function(S,P,i){"use strict";var g=i(8),p=i(46),m=i(71),y=i(29),T=i(215),A=i(51),C=i(142),I=i(23),R=i(425),O=i(180),F=I("Promise"),L="AsyncFromSyncIterator",M=A.set,$=A.getterFor(L),D=function(H,X,U,j,W){var K=H.done;F.resolve(H.value).then(function(Q){X(O(Q,K))},function(Q){if(!K&&W)try{C(j,"throw",Q)}catch(tt){Q=tt}U(Q)})},z=function(X){X.type=L,M(this,X)};z.prototype=T(m(R),{next:function(){var X=$(this),U=arguments.length>0,j=U?arguments[0]:void 0;return new F(function(W,K){var Q=p(U?g(X.next,X.iterator,j):g(X.next,X.iterator));D(Q,W,K,X.iterator,!0)})},return:function(){var H=$(this),X=H.iterator,U=arguments.length>0,j=U?arguments[0]:void 0;return new F(function(W,K){var Q=y(X,"return");if(Q===void 0)return W(O(j,!0));var tt=p(U?g(Q,X,j):g(Q,X));D(tt,W,K,X)})},throw:function(){var H=$(this),X=H.iterator,U=arguments.length>0,j=U?arguments[0]:void 0;return new F(function(W,K){var Q=y(X,"throw");if(Q===void 0){try{C(X,"normal")}catch(J){return K(J)}return K(new TypeError("The iterator does not provide a throw method"))}var tt=p(U?g(Q,X,j):g(Q,X));D(tt,W,K,X,!0)})}}),S.exports=z}),(function(S,P,i){"use strict";var g=i(4),p=i(35),m=i(21),y=i(71),T=i(135),A=i(47),C=i(33),I=i(36),R="USE_FUNCTION_CONSTRUCTOR",O=C("asyncIterator"),F=g.AsyncIterator,L=p.AsyncIteratorPrototype,M,$;if(L)M=L;else if(m(F))M=F.prototype;else if(p[R]||g[R])try{$=T(T(T(Function("return async function*(){}()")()))),T($)===Object.prototype&&(M=$)}catch(D){}M?I&&(M=y(M)):M={},m(M[O])||A(M,O,function(){return this}),S.exports=M}),(function(S,P,i){"use strict";var g=i(8),p=i(30),m=i(46),y=i(20),T=i(148),A=i(23),C=i(90),I=i(149),R=i(267),O=i(427),F=function(L){var M=L===0,$=L===1,D=L===2,z=L===3;return function(H,X,U){m(H);var j=X!==void 0;(j||!M)&&p(X);var W=R(H),K=A("Promise"),Q=W.iterator,tt=W.next,J=0;return new K(function(q,rt){var ft=function(ut){O(Q,rt,ut,rt)},ct=function(){try{try{T(J)}catch(ut){return ft(ut)}K.resolve(m(g(tt,Q))).then(function(ut){try{if(m(ut).done)M?(I(U,J),q(U)):q(z?!1:D||void 0);else{var gt=ut.value;try{if(j){var pt=J++,mt=X(gt,pt),St=function(Ct){if($)ct();else if(D)Ct?ct():O(Q,q,!1,rt);else if(M)try{C(U,pt,Ct),ct()}catch(wt){ft(wt)}else Ct?O(Q,q,z||gt,rt):ct()};y(mt)?K.resolve(mt).then(St,ft):St(mt)}else C(U,J++,gt),ct()}catch(Ct){ft(Ct)}}}catch(Ct){rt(Ct)}},rt)}catch(ut){rt(ut)}};ct()})}};S.exports={toArray:F(0),forEach:F(1),every:F(2),some:F(3),find:F(4)}}),(function(S,P,i){"use strict";var g=i(8),p=i(46),m=i(23),y=i(29);S.exports=function(T,A,C,I){try{var R=y(T,"return");if(R)return m("Promise").resolve(g(R,T)).then(function(O){try{A!==I&&p(O)}catch(F){I(F);return}A(C)},function(O){A===I?A(C):I(O)})}catch(O){return I(A===I?C:O)}A(C)}}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(23),y=i(30),T=i(216),A=i(47),C=i(215),I=i(77),R=i(33),O=i(51),F=i(255),L=i(27),M=m("Promise"),$=m("SuppressedError"),D=ReferenceError,z=R("asyncDispose"),H=R("toStringTag"),X="AsyncDisposableStack",U=O.set,j=O.getterFor(X),W="async-dispose",K="disposed",Q="pending",tt=function(ft){var ct=j(ft);if(ct.state===K)throw new D(X+" already disposed");return ct},J=function(){U(T(this,q),{type:X,state:Q,stack:[]}),p||(this.disposed=!1)},q=J.prototype;C(q,{disposeAsync:function(){var ct=this;return new M(function(ut,gt){var pt=j(ct);if(pt.state===K)return ut(void 0);pt.state=K,p||(ct.disposed=!0);var mt=pt.stack,St=mt.length,Ct=!1,wt,jt=function(yt){Ct?wt=new $(yt,wt):(Ct=!0,wt=yt),Ut()},Ut=function(){if(St){var yt=mt[--St];mt[St]=null;try{M.resolve(yt()).then(Ut,jt)}catch(Tt){jt(Tt)}}else pt.stack=null,Ct?gt(wt):ut(void 0)};Ut()})},use:function(ct){return F(tt(this),ct,W),ct},adopt:function(ct,ut){var gt=tt(this);return y(ut),F(gt,void 0,W,function(){return ut(ct)}),ct},defer:function(ct){var ut=tt(this);y(ct),F(ut,void 0,W,ct)},move:function(){var ct=tt(this),ut=new J;return j(ut).stack=ct.stack,ct.stack=[],ct.state=K,p||(this.disposed=!0),ut}}),p&&I(q,"disposed",{configurable:!0,get:function(){return j(this).state===K}}),A(q,z,q.disposeAsync,{name:"disposeAsync"}),A(q,H,X,{nonWritable:!0});var rt=L&&L<136;g({global:!0,constructor:!0,forced:rt},{AsyncDisposableStack:J})}),(function(S,P,i){"use strict";var g=i(8),p=i(47),m=i(23),y=i(29),T=i(38),A=i(33),C=i(425),I=A("asyncDispose"),R=m("Promise");T(C,I)||p(C,I,function(){var O=this;return new R(function(F,L){var M=y(O,"return");M?R.resolve(g(M,O)).then(function(){F(void 0)},L):F(void 0)})})}),(function(S,P,i){"use strict";var g=i(3),p=i(117),m=i(30),y=i(46),T=i(7),A=!T(function(){Reflect.apply(function(){})});g({target:"Reflect",stat:!0,forced:A},{apply:function(I,R,O){return p(m(I),R,y(O))}})}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(117),y=i(258),T=i(395),A=i(46),C=i(20),I=i(71),R=i(7),O=p("Reflect","construct"),F=Object.prototype,L=[].push,M=R(function(){function z(){}return!(O(function(){},[],z)instanceof z)}),$=!R(function(){O(function(){})}),D=M||$;g({target:"Reflect",stat:!0,forced:D,sham:D},{construct:function(H,X){T(H);var U=arguments.length<3?H:T(arguments[2]);if(A(X),$&&!M)return O(H,X,U);if(H===U){switch(X.length){case 0:return new H;case 1:return new H(X[0]);case 2:return new H(X[0],X[1]);case 3:return new H(X[0],X[1],X[2]);case 4:return new H(X[0],X[1],X[2],X[3])}var j=[null];return m(L,j,X),new(m(y,H,j))}var W=U.prototype,K=I(C(W)?W:F),Q=m(H,K,X);return C(Q)?Q:K}})}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(46),y=i(18),T=i(44),A=i(21),C=i(7),I=TypeError,R=C(function(){Reflect.defineProperty(T.f({},1,{value:1}),1,{value:2})});g({target:"Reflect",stat:!0,forced:R,sham:!p},{defineProperty:function(F,L,M){m(F);var $=y(L),D,z;if(m(M),("get"in M||"set"in M)&&("get"in M&&!A(D=M.get)&&D!==void 0||"set"in M&&!A(z=M.set)&&z!==void 0||"value"in M||"writable"in M))throw new I("Invalid property descriptor");try{return T.f(F,$,M),!0}catch(H){return!1}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(5).f,y=i(18);g({target:"Reflect",stat:!0},{deleteProperty:function(A,C){p(A);var I=y(C),R=m(A,I);return R&&!R.configurable?!1:delete A[I]}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(20),y=i(46),T=i(435),A=i(5),C=i(135),I=i(18),R=function(O,F,L){if(y(O)===L)return O[F];var M=A.f(O,F);if(M)return T(M)?M.value:M.get===void 0?void 0:p(M.get,L);var $=C(O);if(m($))return R($,F,L)};g({target:"Reflect",stat:!0},{get:function(F,L){return R(y(F),I(L),arguments.length<3?F:arguments[2])}})}),(function(S,P,i){"use strict";var g=i(38);S.exports=function(p){return p!==void 0&&(g(p,"value")||g(p,"writable"))}}),(function(S,P,i){"use strict";var g=i(3),p=i(6),m=i(46),y=i(5);g({target:"Reflect",stat:!0,sham:!p},{getOwnPropertyDescriptor:function(A,C){return y.f(m(A),C)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(135),y=i(136);g({target:"Reflect",stat:!0,sham:!y},{getPrototypeOf:function(A){return m(p(A))}})}),(function(S,P,i){"use strict";var g=i(3);g({target:"Reflect",stat:!0},{has:function(m,y){return y in m}})}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(309);g({target:"Reflect",stat:!0},{isExtensible:function(T){return p(T),m(T)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(56);g({target:"Reflect",stat:!0},{ownKeys:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(46),y=i(303);g({target:"Reflect",stat:!0,sham:!y},{preventExtensions:function(A){m(A);try{var C=p("Object","preventExtensions");return C&&C(A),!0}catch(I){return!1}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(46),y=i(20),T=i(435),A=i(7),C=i(44),I=i(5),R=i(135),O=i(11),F=i(18),L=function($,D,z,H){var X=I.f(m($),D),U,j,W;if(!X){if(y(j=R($)))return L(j,D,z,H);X=O(0)}if(T(X)){if(X.writable===!1||!y(H))return!1;if(U=I.f(H,D)){if(!T(U)||U.writable===!1)return!1;C.f(H,D,{value:z})}else try{C.f(H,D,O(0,z))}catch(K){return!1}}else{if(W=X.set,W===void 0)return!1;p(W,H,z)}return!0},M=A(function(){var $=function(){},D=C.f(new $,"a",{configurable:!0});return Reflect.set($.prototype,"a",1,D)!==!1});g({target:"Reflect",stat:!0,forced:M},{set:function(D,z,H){return L(m(D),F(z),H,arguments.length<4?D:arguments[3])}})}),(function(S,P,i){"use strict";var g=i(3),p=i(46),m=i(121),y=i(119);y&&g({target:"Reflect",stat:!0},{setPrototypeOf:function(A,C){p(A),m(C);try{return y(A,C),!0}catch(I){return!1}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(82);g({global:!0},{Reflect:{}}),m(p.Reflect,"Reflect",!0)}),(function(S,P,i){"use strict";var g=i(6),p=i(4),m=i(14),y=i(67),T=i(124),A=i(43),C=i(71),I=i(57).f,R=i(24),O=i(446),F=i(68),L=i(447),M=i(450),$=i(123),D=i(47),z=i(7),H=i(38),X=i(51).enforce,U=i(201),j=i(33),W=i(451),K=i(452),Q=j("match"),tt=p.RegExp,J=tt.prototype,q=p.SyntaxError,rt=m(J.exec),ft=m("".charAt),ct=m("".replace),ut=m("".indexOf),gt=m("".slice),pt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,mt=/a/g,St=/a/g,Ct=new tt(mt)!==mt,wt=M.MISSED_STICKY,jt=M.UNSUPPORTED_Y,Ut=g&&(!Ct||wt||W||K||z(function(){return St[Q]=!1,tt(mt)!==mt||tt(St)===St||String(tt(mt,"i"))!=="/a/i"})),yt=function(qt){for(var $t=qt.length,Jt=0,te="",de=!1,ue;Jt<$t;Jt++){if(ue=ft(qt,Jt),ue==="\\"){te+=ue+ft(qt,++Jt);continue}!de&&ue==="."?te+="[\\s\\S]":(ue==="["?de=!0:ue==="]"&&(de=!1),te+=ue)}return te},Tt=function(qt){for(var $t=qt.length,Jt=0,te="",de=[],ue=C(null),he=!1,Ee=!1,$e=0,Ie="",oe;Jt<$t;Jt++){if(oe=ft(qt,Jt),oe==="\\"){if(oe+=ft(qt,++Jt),!Ee&&ft(oe,1)==="\\"){te+="\\x5c";continue}}else if(oe==="]")he=!1;else if(!he)switch(!0){case oe==="[":he=!0;break;case oe==="(":te+=oe,rt(pt,gt(qt,Jt+1))?(Jt+=2,Ee=!0,$e++):ft(qt,Jt+1)!=="?"&&$e++;continue;case(oe===">"&&Ee):if(Ie===""||H(ue,Ie))throw new q("Invalid capture group name");ue[Ie]=!0,de[de.length]=[Ie,$e],Ee=!1,Ie="";continue}Ee?Ie+=oe:te+=oe}for(var ye=0;ye<de.length;ye++)for(var ke="\\k<"+de[ye][0]+">",Ft="\\"+de[ye][1];ut(te,ke)>-1;)te=ct(te,ke,Ft);return[te,de]};if(y("RegExp",Ut)){for(var Ot=function($t,Jt){var te=R(J,this),de=O($t),ue=Jt===void 0,he=[],Ee=$t,$e,Ie,oe,ye,ke,Ft;if(!te&&de&&ue&&$t.constructor===Ot)return $t;if((de||R(J,$t))&&($t=$t.source,ue&&(Jt=L(Ee))),$t=$t===void 0?"":F($t),Jt=Jt===void 0?"":F(Jt),Ee=$t,W&&"dotAll"in mt&&(Ie=!!Jt&&ut(Jt,"s")>-1,Ie&&(Jt=ct(Jt,/s/g,""))),$e=Jt,wt&&"sticky"in mt&&(oe=!!Jt&&ut(Jt,"y")>-1,oe&&jt&&(Jt=ct(Jt,/y/g,""))),K&&(ye=Tt($t),$t=ye[0],he=ye[1]),ke=T(tt($t,Jt),te?this:J,Ot),(Ie||oe||he.length)&&(Ft=X(ke),Ie&&(Ft.dotAll=!0,Ft.raw=Ot(yt($t),$e)),oe&&(Ft.sticky=!0),he.length&&(Ft.groups=he)),$t!==Ee)try{A(ke,"source",Ee===""?"(?:)":Ee)}catch(Xt){}return ke},Bt=I(tt),Kt=0;Bt.length>Kt;)$(Ot,tt,Bt[Kt++]);J.constructor=Ot,Ot.prototype=J,D(p,"RegExp",Ot,{constructor:!0})}U("RegExp")}),(function(S,P,i){"use strict";var g=i(20),p=i(15),m=i(33),y=m("match");S.exports=function(T){var A;return g(T)&&((A=T[y])!==void 0?!!A:p(T)==="RegExp")}}),(function(S,P,i){"use strict";var g=i(8),p=i(38),m=i(24),y=i(448),T=i(449),A=RegExp.prototype;S.exports=y.correct?function(C){return C.flags}:function(C){return!y.correct&&m(A,C)&&!p(C,"flags")?g(T,C):C.flags}}),(function(S,P,i){"use strict";var g=i(4),p=i(7),m=g.RegExp,y=!p(function(){var T=!0;try{m(".","d")}catch(M){T=!1}var A={},C="",I=T?"dgimsy":"gimsy",R=function(M,$){Object.defineProperty(A,M,{get:function(){return C+=$,!0}})},O={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};T&&(O.hasIndices="d");for(var F in O)R(F,O[F]);var L=Object.getOwnPropertyDescriptor(m.prototype,"flags").get.call(A);return L!==I||C!==I});S.exports={correct:y}}),(function(S,P,i){"use strict";var g=i(46);S.exports=function(){var p=g(this),m="";return p.hasIndices&&(m+="d"),p.global&&(m+="g"),p.ignoreCase&&(m+="i"),p.multiline&&(m+="m"),p.dotAll&&(m+="s"),p.unicode&&(m+="u"),p.unicodeSets&&(m+="v"),p.sticky&&(m+="y"),m}}),(function(S,P,i){"use strict";var g=i(7),p=i(4),m=p.RegExp,y=g(function(){var C=m("a","y");return C.lastIndex=2,C.exec("abcd")!==null}),T=y||g(function(){return!m("a","y").sticky}),A=y||g(function(){var C=m("^r","gy");return C.lastIndex=2,C.exec("str")!==null});S.exports={BROKEN_CARET:A,MISSED_STICKY:T,UNSUPPORTED_Y:y}}),(function(S,P,i){"use strict";var g=i(7),p=i(4),m=p.RegExp;S.exports=g(function(){var y=m(".","s");return!(y.dotAll&&y.test(`
|
|
28
|
+
`)&&y.flags==="s")})}),(function(S,P,i){"use strict";var g=i(7),p=i(4),m=p.RegExp;S.exports=g(function(){var y=m("(?<a>b)","g");return y.exec("b").groups.a!=="b"||"b".replace(y,"$<a>c")!=="bc"})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(454),y=i(38),T=i(248).start,A=i(341),C=Array,I=RegExp.escape,R=p("".charAt),O=p("".charCodeAt),F=p(1.1.toString),L=p([].join),M=/^[0-9a-z]/i,$=/^[$()*+./?[\\\]^{|}]/,D=RegExp("^[!\"#%&',\\-:;<=>@`~"+A+"]"),z=p(M.exec),H={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},X=function(j){var W=F(O(j,0),16);return W.length<3?"\\x"+T(W,2,"0"):"\\u"+T(W,4,"0")},U=!I||I("ab\u{2002A}")!=="\\x61b\u{2002A}";g({target:"RegExp",stat:!0,forced:U},{escape:function(W){m(W);for(var K=W.length,Q=C(K),tt=0;tt<K;tt++){var J=R(W,tt);if(tt===0&&z(M,J))Q[tt]=X(J);else if(y(H,J))Q[tt]="\\"+H[J];else if(z($,J))Q[tt]="\\"+J;else if(z(D,J))Q[tt]=X(J);else{var q=O(J,0);(q&63488)!==55296?Q[tt]=J:q>=56320||tt+1>=K||(O(W,tt+1)&64512)!==56320?Q[tt]=X(J):(Q[tt]=J,Q[++tt]=R(W,tt))}}return L(Q,"")}})}),(function(S){"use strict";var P=TypeError;S.exports=function(i){if(typeof i=="string")return i;throw new P("Argument is not a string")}}),(function(S,P,i){"use strict";var g=i(6),p=i(451),m=i(15),y=i(77),T=i(51).get,A=RegExp.prototype,C=TypeError;g&&p&&y(A,"dotAll",{configurable:!0,get:function(){if(this!==A){if(m(this)==="RegExp")return!!T(this).dotAll;throw new C("Incompatible receiver, RegExp required")}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(457);g({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})}),(function(S,P,i){"use strict";var g=i(8),p=i(14),m=i(68),y=i(449),T=i(450),A=i(34),C=i(71),I=i(51).get,R=i(451),O=i(452),F=A("native-string-replace",String.prototype.replace),L=RegExp.prototype.exec,M=L,$=p("".charAt),D=p("".indexOf),z=p("".replace),H=p("".slice),X=(function(){var Q=/a/,tt=/b*/g;return g(L,Q,"a"),g(L,tt,"a"),Q.lastIndex!==0||tt.lastIndex!==0})(),U=T.BROKEN_CARET,j=/()??/.exec("")[1]!==void 0,W=X||j||U||R||O,K=function(Q,tt){for(var J=Q.groups=C(null),q=0;q<tt.length;q++){var rt=tt[q];J[rt[0]]=Q[rt[1]]}};W&&(M=function(tt){var J=this,q=I(J),rt=m(tt),ft=q.raw,ct,ut,gt;if(ft)return ft.lastIndex=J.lastIndex,ct=g(M,ft,rt),J.lastIndex=ft.lastIndex,ct&&q.groups&&K(ct,q.groups),ct;var pt=q.groups,mt=U&&J.sticky,St=g(y,J),Ct=J.source,wt=0,jt=rt;if(mt){St=z(St,"y",""),D(St,"g")===-1&&(St+="g"),jt=H(rt,J.lastIndex);var Ut=J.lastIndex>0&&$(rt,J.lastIndex-1);J.lastIndex>0&&(!J.multiline||J.multiline&&Ut!==`
|
|
29
|
+
`&&Ut!=="\r"&&Ut!=="\u2028"&&Ut!=="\u2029")&&(Ct="(?: (?:"+Ct+"))",jt=" "+jt,wt++),ut=new RegExp("^(?:"+Ct+")",St)}j&&(ut=new RegExp("^"+Ct+"$(?!\\s)",St)),X&&(gt=J.lastIndex);var yt=g(L,mt?ut:J,jt);return mt?yt?(yt.input=rt,yt[0]=H(yt[0],wt),yt.index=J.lastIndex,J.lastIndex+=yt[0].length):J.lastIndex=0:X&&yt&&(J.lastIndex=J.global?yt.index+yt[0].length:gt),j&&yt&&yt.length>1&&g(F,yt[0],ut,function(){for(var Tt=1;Tt<arguments.length-2;Tt++)arguments[Tt]===void 0&&(yt[Tt]=void 0)}),yt&&pt&&K(yt,pt),yt}),S.exports=M}),(function(S,P,i){"use strict";var g=i(6),p=i(77),m=i(448),y=i(449);g&&!m.correct&&(p(RegExp.prototype,"flags",{configurable:!0,get:y}),m.correct=!0)}),(function(S,P,i){"use strict";var g=i(6),p=i(450).MISSED_STICKY,m=i(15),y=i(77),T=i(51).get,A=RegExp.prototype,C=TypeError;g&&p&&y(A,"sticky",{configurable:!0,get:function(){if(this!==A){if(m(this)==="RegExp")return!!T(this).sticky;throw new C("Incompatible receiver, RegExp required")}}})}),(function(S,P,i){"use strict";i(456);var g=i(3),p=i(8),m=i(21),y=i(46),T=i(68),A=(function(){var I=!1,R=/[ac]/;return R.exec=function(){return I=!0,/./.exec.apply(this,arguments)},R.test("abc")===!0&&I})(),C=/./.test;g({target:"RegExp",proto:!0,forced:!A},{test:function(I){var R=y(this),O=T(I),F=R.exec;if(!m(F))return p(C,R,O);var L=p(F,R,O);return L===null?!1:(y(L),!0)}})}),(function(S,P,i){"use strict";var g=i(49).PROPER,p=i(47),m=i(46),y=i(68),T=i(7),A=i(447),C="toString",I=RegExp.prototype,R=I[C],O=T(function(){return R.call({source:"a",flags:"b"})!=="/a/b"}),F=g&&R.name!==C;(O||F)&&p(I,C,function(){var M=m(this),$=y(M.source),D=y(A(M));return"/"+$+"/"+D},{unsafe:!0})}),(function(S,P,i){"use strict";i(463)}),(function(S,P,i){"use strict";var g=i(307),p=i(311);g("Set",function(m){return function(){return m(this,arguments.length?arguments[0]:void 0)}},p)}),(function(S,P,i){"use strict";var g=i(3),p=i(465),m=i(7),y=i(473),T=!y("difference",function(C){return C.size===0}),A=T||m(function(){var C={size:1,has:function(){return!0},keys:function(){var R=0;return{next:function(){var O=R++>1;return I.has(1)&&I.clear(),{done:O,value:2}}}}},I=new Set([1,2,3,4]);return I.difference(C).size!==3});g({target:"Set",proto:!0,real:!0,forced:A},{difference:p})}),(function(S,P,i){"use strict";var g=i(466),p=i(467),m=i(468),y=i(471),T=i(472),A=i(469),C=i(470),I=p.has,R=p.remove;S.exports=function(F){var L=g(this),M=T(F),$=m(L);return y($)<=M.size?A($,function(D){M.includes(D)&&R($,D)}):C(M.getIterator(),function(D){I($,D)&&R($,D)}),$}}),(function(S,P,i){"use strict";var g=i(467).has;S.exports=function(p){return g(p),p}}),(function(S,P,i){"use strict";var g=i(14),p=Set.prototype;S.exports={Set,add:g(p.add),has:g(p.has),remove:g(p.delete),proto:p}}),(function(S,P,i){"use strict";var g=i(467),p=i(469),m=g.Set,y=g.add;S.exports=function(T){var A=new m;return p(T,function(C){y(A,C)}),A}}),(function(S,P,i){"use strict";var g=i(14),p=i(470),m=i(467),y=m.Set,T=m.proto,A=g(T.forEach),C=g(T.keys),I=C(new y).next;S.exports=function(R,O,F){return F?p({iterator:C(R),next:I},O):A(R,O)}}),(function(S,P,i){"use strict";var g=i(8);S.exports=function(p,m,y){for(var T=y?p:p.iterator,A=p.next,C,I;!(C=g(A,T)).done;)if(I=m(C.value),I!==void 0)return I}}),(function(S,P,i){"use strict";var g=i(120),p=i(467);S.exports=g(p.proto,"size","get")||function(m){return m.size}}),(function(S,P,i){"use strict";var g=i(30),p=i(46),m=i(8),y=i(61),T=i(267),A="Invalid size",C=RangeError,I=TypeError,R=Math.max,O=function(F,L){this.set=F,this.size=R(L,0),this.has=g(F.has),this.keys=g(F.keys)};O.prototype={getIterator:function(){return T(p(m(this.keys,this.set)))},includes:function(F){return m(this.has,this.set,F)}},S.exports=function(F){p(F);var L=+F.size;if(L!==L)throw new I(A);var M=y(L);if(M<0)throw new C(A);return new O(F,M)}}),(function(S,P,i){"use strict";var g=i(23),p=function(y){return{size:y,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},m=function(y){return{size:y,has:function(){return!0},keys:function(){throw new Error("e")}}};S.exports=function(y,T){var A=g("Set");try{new A()[y](p(0));try{return new A()[y](p(-1)),!1}catch(I){if(!T)return!0;try{return new A()[y](m(-1/0)),!1}catch(R){var C=new A([1,2]);return T(C[y](m(1/0)))}}}catch(I){return!1}}}),(function(S,P,i){"use strict";var g=i(3),p=i(7),m=i(475),y=i(473),T=!y("intersection",function(A){return A.size===2&&A.has(1)&&A.has(2)})||p(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});g({target:"Set",proto:!0,real:!0,forced:T},{intersection:m})}),(function(S,P,i){"use strict";var g=i(466),p=i(467),m=i(471),y=i(472),T=i(469),A=i(470),C=p.Set,I=p.add,R=p.has;S.exports=function(F){var L=g(this),M=y(F),$=new C;return m(L)>M.size?A(M.getIterator(),function(D){R(L,D)&&I($,D)}):T(L,function(D){M.includes(D)&&I($,D)}),$}}),(function(S,P,i){"use strict";var g=i(3),p=i(477),m=i(473),y=!m("isDisjointFrom",function(T){return!T});g({target:"Set",proto:!0,real:!0,forced:y},{isDisjointFrom:p})}),(function(S,P,i){"use strict";var g=i(466),p=i(467).has,m=i(471),y=i(472),T=i(469),A=i(470),C=i(142);S.exports=function(R){var O=g(this),F=y(R);if(m(O)<=F.size)return T(O,function(M){if(F.includes(M))return!1},!0)!==!1;var L=F.getIterator();return A(L,function(M){if(p(O,M))return C(L.iterator,"normal",!1)})!==!1}}),(function(S,P,i){"use strict";var g=i(3),p=i(479),m=i(473),y=!m("isSubsetOf",function(T){return T});g({target:"Set",proto:!0,real:!0,forced:y},{isSubsetOf:p})}),(function(S,P,i){"use strict";var g=i(466),p=i(471),m=i(469),y=i(472);S.exports=function(A){var C=g(this),I=y(A);return p(C)>I.size?!1:m(C,function(R){if(!I.includes(R))return!1},!0)!==!1}}),(function(S,P,i){"use strict";var g=i(3),p=i(481),m=i(473),y=!m("isSupersetOf",function(T){return!T});g({target:"Set",proto:!0,real:!0,forced:y},{isSupersetOf:p})}),(function(S,P,i){"use strict";var g=i(466),p=i(467).has,m=i(471),y=i(472),T=i(470),A=i(142);S.exports=function(I){var R=g(this),O=y(I);if(m(R)<O.size)return!1;var F=O.getIterator();return T(F,function(L){if(!p(R,L))return A(F.iterator,"normal",!1)})!==!1}}),(function(S,P,i){"use strict";var g=i(3),p=i(483),m=i(484),y=i(473),T=!y("symmetricDifference")||!m("symmetricDifference");g({target:"Set",proto:!0,real:!0,forced:T},{symmetricDifference:p})}),(function(S,P,i){"use strict";var g=i(466),p=i(467),m=i(468),y=i(472),T=i(470),A=p.add,C=p.has,I=p.remove;S.exports=function(O){var F=g(this),L=y(O).getIterator(),M=m(F);return T(L,function($){C(F,$)?I(M,$):A(M,$)}),M}}),(function(S){"use strict";S.exports=function(P){try{var i=new Set,g={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return i.clear(),i.add(4),function(){return{done:!0}}}})}},p=i[P](g);return p.size===1&&p.values().next().value===4}catch(m){return!1}}}),(function(S,P,i){"use strict";var g=i(3),p=i(486),m=i(484),y=i(473),T=!y("union")||!m("union");g({target:"Set",proto:!0,real:!0,forced:T},{union:p})}),(function(S,P,i){"use strict";var g=i(466),p=i(467).add,m=i(468),y=i(472),T=i(470);S.exports=function(C){var I=g(this),R=y(C).getIterator(),O=m(I);return T(R,function(F){p(O,F)}),O}}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(16),y=i(61),T=i(68),A=i(7),C=p("".charAt),I=A(function(){return"\u{20BB7}".at(-2)!=="\uD842"});g({target:"String",proto:!0,forced:I},{at:function(O){var F=T(m(this)),L=F.length,M=y(O),$=M>=0?M:L+M;return $<0||$>=L?void 0:C(F,$)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(489).codeAt;g({target:"String",proto:!0},{codePointAt:function(y){return p(this,y)}})}),(function(S,P,i){"use strict";var g=i(14),p=i(61),m=i(68),y=i(16),T=g("".charAt),A=g("".charCodeAt),C=g("".slice),I=function(R){return function(O,F){var L=m(y(O)),M=p(F),$=L.length,D,z;return M<0||M>=$?R?"":void 0:(D=A(L,M),D<55296||D>56319||M+1===$||(z=A(L,M+1))<56320||z>57343?R?T(L,M):D:R?C(L,M,M+2):(D-55296<<10)+(z-56320)+65536)}};S.exports={codeAt:I(!1),charAt:I(!0)}}),(function(S,P,i){"use strict";var g=i(3),p=i(85),m=i(5).f,y=i(64),T=i(68),A=i(491),C=i(16),I=i(492),R=i(36),O=p("".slice),F=Math.min,L=I("endsWith"),M=!R&&!L&&!!(function(){var $=m(String.prototype,"endsWith");return $&&!$.writable})();g({target:"String",proto:!0,forced:!M&&!L},{endsWith:function(D){var z=T(C(this));A(D);var H=T(D),X=arguments.length>1?arguments[1]:void 0,U=z.length,j=X===void 0?U:F(y(X),U);return O(z,j-H.length,j)===H}})}),(function(S,P,i){"use strict";var g=i(446),p=TypeError;S.exports=function(m){if(g(m))throw new p("The method doesn't accept regular expressions");return m}}),(function(S,P,i){"use strict";var g=i(33),p=g("match");S.exports=function(m){var y=/./;try{"/./"[m](y)}catch(T){try{return y[p]=!1,"/./"[m](y)}catch(A){}}return!1}}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(60),y=RangeError,T=String.fromCharCode,A=String.fromCodePoint,C=p([].join),I=!!A&&A.length!==1;g({target:"String",stat:!0,arity:1,forced:I},{fromCodePoint:function(O){for(var F=[],L=arguments.length,M=0,$;L>M;){if($=+arguments[M],m($,1114111)!==$)throw new y($+" is not a valid code point");F[M++]=$<65536?T($):T((($-=65536)>>10)+55296,$%1024+56320)}return C(F,"")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(491),y=i(16),T=i(68),A=i(492),C=p("".indexOf);g({target:"String",proto:!0,forced:!A("includes")},{includes:function(R){return!!~C(T(y(this)),T(m(R)),arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(16),y=i(68),T=p("".charCodeAt);g({target:"String",proto:!0},{isWellFormed:function(){for(var C=y(m(this)),I=C.length,R=0;R<I;R++){var O=T(C,R);if((O&63488)===55296&&(O>=56320||++R>=I||(T(C,R)&64512)!==56320))return!1}return!0}})}),(function(S,P,i){"use strict";var g=i(489).charAt,p=i(68),m=i(51),y=i(177),T=i(180),A="String Iterator",C=m.set,I=m.getterFor(A);y(String,"String",function(R){C(this,{type:A,string:p(R),index:0})},function(){var O=I(this),F=O.string,L=O.index,M;return L>=F.length?T(void 0,!0):(M=g(F,L),O.index+=M.length,T(M,!1))})}),(function(S,P,i){"use strict";var g=i(8),p=i(14),m=i(498),y=i(46),T=i(20),A=i(64),C=i(68),I=i(16),R=i(29),O=i(499),F=i(447),L=i(500),M=p("".indexOf);m("match",function($,D,z){return[function(X){var U=I(this),j=T(X)?R(X,$):void 0;if(j)return g(j,X,U);var W=C(U);return new RegExp(X)[$](W)},function(H){var X=y(this),U=C(H),j=z(D,X,U);if(j.done)return j.value;var W=C(F(X));if(!~M(W,"g"))return L(X,U);var K=!!~M(W,"u")||!!~M(W,"v");X.lastIndex=0;for(var Q=[],tt=0,J;(J=L(X,U))!==null;){var q=C(J[0]);Q[tt]=q,q===""&&(X.lastIndex=O(U,A(X.lastIndex),K)),tt++}return tt===0?null:Q}]})}),(function(S,P,i){"use strict";i(456);var g=i(8),p=i(47),m=i(457),y=i(7),T=i(33),A=i(43),C=T("species"),I=RegExp.prototype;S.exports=function(R,O,F,L){var M=T(R),$=!y(function(){var X={};return X[M]=function(){return 7},""[R](X)!==7}),D=$&&!y(function(){var X=!1,U=/a/;if(R==="split"){var j={};j[C]=function(){return U},U={constructor:j,flags:""},U[M]=/./[M]}return U.exec=function(){return X=!0,null},U[M](""),!X});if(!$||!D||F){var z=/./[M],H=O(M,""[R],function(X,U,j,W,K){var Q=U.exec;return Q===m||Q===I.exec?$&&!K?{done:!0,value:g(z,U,j,W)}:{done:!0,value:g(X,j,U,W)}:{done:!1}});p(String.prototype,R,H[0]),p(I,M,H[1])}L&&A(I[M],"sham",!0)}}),(function(S,P,i){"use strict";var g=i(489).charAt;S.exports=function(p,m,y){return m+(y&&g(p,m).length||1)}}),(function(S,P,i){"use strict";var g=i(8),p=i(46),m=i(21),y=i(15),T=i(457),A=TypeError;S.exports=function(C,I){var R=C.exec;if(m(R)){var O=g(R,C,I);return O!==null&&p(O),O}if(y(C)==="RegExp")return g(T,C,I);throw new A("RegExp#exec called on incompatible receiver")}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(85),y=i(178),T=i(180),A=i(16),C=i(64),I=i(68),R=i(46),O=i(20),F=i(15),L=i(446),M=i(447),$=i(29),D=i(47),z=i(7),H=i(33),X=i(394),U=i(499),j=i(500),W=i(51),K=i(36),Q=H("matchAll"),tt="RegExp String",J=tt+" Iterator",q=W.set,rt=W.getterFor(J),ft=RegExp.prototype,ct=TypeError,ut=m("".indexOf),gt=m("".matchAll),pt=!!gt&&!z(function(){gt("a",/./)}),mt=y(function(wt,jt,Ut,yt){q(this,{type:J,regexp:wt,string:jt,global:Ut,unicode:yt,done:!1})},tt,function(){var wt=rt(this);if(wt.done)return T(void 0,!0);var jt=wt.regexp,Ut=wt.string,yt=j(jt,Ut);return yt===null?(wt.done=!0,T(void 0,!0)):wt.global?(I(yt[0])===""&&(jt.lastIndex=U(Ut,C(jt.lastIndex),wt.unicode)),T(yt,!1)):(wt.done=!0,T(yt,!1))}),St=function(Ct){var wt=R(this),jt=I(Ct),Ut=X(wt,RegExp),yt=I(M(wt)),Tt=new Ut(Ut===RegExp?wt.source:wt,yt),Ot=!!~ut(yt,"g"),Bt=!!~ut(yt,"u")||!!~ut(yt,"v");return Tt.lastIndex=C(wt.lastIndex),new mt(Tt,jt,Ot,Bt)};g({target:"String",proto:!0,forced:pt},{matchAll:function(wt){var jt=A(this),Ut,yt,Tt,Ot;if(O(wt)){if(L(wt)&&(Ut=I(A(M(wt))),!~ut(Ut,"g")))throw new ct("`.matchAll` does not allow non-global regexes");if(pt)return gt(jt,wt);if(Tt=$(wt,Q),Tt===void 0&&K&&F(wt)==="RegExp"&&(Tt=St),Tt)return p(Tt,wt,jt)}else if(pt)return gt(jt,wt);return yt=I(jt),Ot=new RegExp(wt,"g"),K?p(St,Ot,yt):Ot[Q](yt)}}),K||Q in ft||D(ft,Q,St)}),(function(S,P,i){"use strict";var g=i(3),p=i(248).end,m=i(503);g({target:"String",proto:!0,forced:m},{padEnd:function(T){return p(this,T,arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(28);S.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(g)}),(function(S,P,i){"use strict";var g=i(3),p=i(248).start,m=i(503);g({target:"String",proto:!0,forced:m},{padStart:function(T){return p(this,T,arguments.length>1?arguments[1]:void 0)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(12),y=i(39),T=i(68),A=i(63),C=p([].push),I=p([].join);g({target:"String",stat:!0},{raw:function(O){var F=m(y(O).raw),L=A(F);if(!L)return"";for(var M=arguments.length,$=[],D=0;;){if(C($,T(F[D++])),D===L)return I($,"");D<M&&C($,T(arguments[D]))}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(249);g({target:"String",proto:!0},{repeat:p})}),(function(S,P,i){"use strict";var g=i(117),p=i(8),m=i(14),y=i(498),T=i(7),A=i(46),C=i(21),I=i(20),R=i(61),O=i(64),F=i(68),L=i(16),M=i(499),$=i(29),D=i(508),z=i(447),H=i(500),X=i(33),U=X("replace"),j=Math.max,W=Math.min,K=m([].concat),Q=m([].push),tt=m("".indexOf),J=m("".slice),q=function(ut){return ut===void 0?ut:String(ut)},rt=(function(){return"a".replace(/./,"$0")==="$0"})(),ft=(function(){return/./[U]?/./[U]("a","$0")==="":!1})(),ct=!T(function(){var ut=/./;return ut.exec=function(){var gt=[];return gt.groups={a:"7"},gt},"".replace(ut,"$<a>")!=="7"});y("replace",function(ut,gt,pt){var mt=ft?"$":"$0";return[function(Ct,wt){var jt=L(this),Ut=I(Ct)?$(Ct,U):void 0;return Ut?p(Ut,Ct,jt,wt):p(gt,F(jt),Ct,wt)},function(St,Ct){var wt=A(this),jt=F(St),Ut=C(Ct);Ut||(Ct=F(Ct));var yt=F(z(wt));if(typeof Ct=="string"&&!~tt(Ct,mt)&&!~tt(Ct,"$<")&&!~tt(yt,"y")){var Tt=pt(gt,wt,jt,Ct);if(Tt.done)return Tt.value}var Ot=!!~tt(yt,"g"),Bt;Ot&&(Bt=!!~tt(yt,"u")||!!~tt(yt,"v"),wt.lastIndex=0);for(var Kt=[],qt;qt=H(wt,jt),!(qt===null||(Q(Kt,qt),!Ot));){var $t=F(qt[0]);$t===""&&(wt.lastIndex=M(jt,O(wt.lastIndex),Bt))}for(var Jt="",te=0,de=0;de<Kt.length;de++){qt=Kt[de];for(var ue=F(qt[0]),he=j(W(R(qt.index),jt.length),0),Ee=[],$e,Ie=1;Ie<qt.length;Ie++)Q(Ee,q(qt[Ie]));var oe=qt.groups;if(Ut){var ye=K([ue],Ee,he,jt);oe!==void 0&&Q(ye,oe),$e=F(g(Ct,void 0,ye))}else $e=D(ue,jt,he,Ee,oe,Ct);he>=te&&(Jt+=J(jt,te,he)+$e,te=he+ue.length)}return Jt+J(jt,te)}]},!ct||!rt||ft)}),(function(S,P,i){"use strict";var g=i(14),p=i(39),m=Math.floor,y=g("".charAt),T=g("".replace),A=g("".slice),C=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,I=/\$([$&'`]|\d{1,2})/g;S.exports=function(R,O,F,L,M,$){var D=F+R.length,z=L.length,H=I;return M!==void 0&&(M=p(M),H=C),T($,H,function(X,U){var j;switch(y(U,0)){case"$":return"$";case"&":return R;case"`":return A(O,0,F);case"'":return A(O,D);case"<":j=M[A(U,1,-1)];break;default:var W=+U;if(W===0)return X;if(W>z){var K=m(W/10);return K===0?X:K<=z?L[K-1]===void 0?y(U,1):L[K-1]+y(U,1):X}j=L[W-1]}return j===void 0?"":j})}}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(14),y=i(16),T=i(21),A=i(20),C=i(446),I=i(68),R=i(29),O=i(447),F=i(508),L=i(33),M=i(36),$=L("replace"),D=TypeError,z=m("".indexOf),H=m("".replace),X=m("".slice),U=Math.max;g({target:"String",proto:!0},{replaceAll:function(W,K){var Q=y(this),tt,J,q,rt,ft,ct,ut,gt,pt,mt,St=0,Ct="";if(A(W)){if(tt=C(W),tt&&(J=I(y(O(W))),!~z(J,"g")))throw new D("`.replaceAll` does not allow non-global regexes");if(q=R(W,$),q)return p(q,W,Q,K);if(M&&tt)return H(I(Q),W,K)}for(rt=I(Q),ft=I(W),ct=T(K),ct||(K=I(K)),ut=ft.length,gt=U(1,ut),pt=z(rt,ft);pt!==-1;)mt=ct?I(K(ft,pt,rt)):F(ft,rt,pt,[],void 0,K),Ct+=X(rt,St,pt)+mt,St=pt+ut,pt=pt+gt>rt.length?-1:z(rt,ft,pt+gt);return St<rt.length&&(Ct+=X(rt,St)),Ct}})}),(function(S,P,i){"use strict";var g=i(8),p=i(498),m=i(46),y=i(20),T=i(16),A=i(376),C=i(68),I=i(29),R=i(500);p("search",function(O,F,L){return[function($){var D=T(this),z=y($)?I($,O):void 0;if(z)return g(z,$,D);var H=C(D);return new RegExp($)[O](H)},function(M){var $=m(this),D=C(M),z=L(F,$,D);if(z.done)return z.value;var H=$.lastIndex;A(H,0)||($.lastIndex=0);var X=R($,D);return A($.lastIndex,H)||($.lastIndex=H),X===null?-1:X.index}]})}),(function(S,P,i){"use strict";var g=i(8),p=i(14),m=i(498),y=i(46),T=i(20),A=i(16),C=i(394),I=i(499),R=i(64),O=i(68),F=i(29),L=i(447),M=i(500),$=i(450),D=i(7),z=$.UNSUPPORTED_Y,H=4294967295,X=Math.min,U=p([].push),j=p("".slice),W=p("".indexOf),K=!D(function(){var tt=/(?:)/,J=tt.exec;tt.exec=function(){return J.apply(this,arguments)};var q="ab".split(tt);return q.length!==2||q[0]!=="a"||q[1]!=="b"}),Q="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;m("split",function(tt,J,q){var rt="0".split(void 0,0).length?function(ft,ct){return ft===void 0&&ct===0?[]:g(J,this,ft,ct)}:J;return[function(ct,ut){var gt=A(this),pt=T(ct)?F(ct,tt):void 0;return pt?g(pt,ct,gt,ut):g(rt,O(gt),ct,ut)},function(ft,ct){var ut=y(this),gt=O(ft);if(!Q){var pt=q(rt,ut,gt,ct,rt!==J);if(pt.done)return pt.value}var mt=C(ut,RegExp),St=O(L(ut)),Ct=!!~W(St,"u")||!!~W(St,"v");z?~W(St,"g")||(St+="g"):~W(St,"y")||(St+="y");var wt=new mt(z?"^(?:"+ut.source+")":ut,St),jt=ct===void 0?H:ct>>>0;if(jt===0)return[];if(gt.length===0)return M(wt,gt)===null?[gt]:[];for(var Ut=0,yt=0,Tt=[];yt<gt.length;){wt.lastIndex=z?0:yt;var Ot=M(wt,z?j(gt,yt):gt),Bt;if(Ot===null||(Bt=X(R(wt.lastIndex+(z?yt:0)),gt.length))===Ut)yt=I(gt,yt,Ct);else{if(U(Tt,j(gt,Ut,yt)),Tt.length===jt)return Tt;for(var Kt=1;Kt<=Ot.length-1;Kt++)if(U(Tt,Ot[Kt]),Tt.length===jt)return Tt;yt=Ut=Bt}}return U(Tt,j(gt,Ut)),Tt}]},Q||!K,z)}),(function(S,P,i){"use strict";var g=i(3),p=i(85),m=i(5).f,y=i(64),T=i(68),A=i(491),C=i(16),I=i(492),R=i(36),O=p("".slice),F=Math.min,L=I("startsWith"),M=!R&&!L&&!!(function(){var $=m(String.prototype,"startsWith");return $&&!$.writable})();g({target:"String",proto:!0,forced:!M&&!L},{startsWith:function(D){var z=T(C(this));A(D);var H=T(D),X=y(F(arguments.length>1?arguments[1]:void 0,z.length));return O(z,X,X+H.length)===H}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(16),y=i(61),T=i(68),A=p("".slice),C=Math.max,I=Math.min,R=!"".substr||"ab".substr(-1)!=="b";g({target:"String",proto:!0,forced:R},{substr:function(F,L){var M=T(m(this)),$=M.length,D=y(F),z=D<0?C($+D,0):I(D,$),H=L===void 0?$:y(L);if(H<=0)return"";var X=I(z+H,$);return z>=X?"":A(M,z,X)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(14),y=i(16),T=i(68),A=i(7),C=Array,I=m("".charAt),R=m("".charCodeAt),O=m([].join),F="".toWellFormed,L="\uFFFD",M=F&&A(function(){return p(F,1)!=="1"});g({target:"String",proto:!0,forced:M},{toWellFormed:function(){var D=T(y(this));if(M)return p(F,D);for(var z=D.length,H=C(z),X=0;X<z;X++){var U=R(D,X);(U&63488)!==55296?H[X]=I(D,X):U>=56320||X+1>=z||(R(D,X+1)&64512)!==56320?H[X]=L:(H[X]=I(D,X),H[++X]=I(D,X))}return O(H,"")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(340).trim,m=i(516);g({target:"String",proto:!0,forced:m("trim")},{trim:function(){return p(this)}})}),(function(S,P,i){"use strict";var g=i(49).PROPER,p=i(7),m=i(341),y="\u200B\x85\u180E";S.exports=function(T){return p(function(){return!!m[T]()||y[T]()!==y||g&&m[T].name!==T})}}),(function(S,P,i){"use strict";i(518);var g=i(3),p=i(519);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==p},{trimEnd:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(519);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==p},{trimRight:p})}),(function(S,P,i){"use strict";var g=i(340).end,p=i(516);S.exports=p("trimEnd")?function(){return g(this)}:"".trimEnd}),(function(S,P,i){"use strict";i(521);var g=i(3),p=i(522);g({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==p},{trimStart:p})}),(function(S,P,i){"use strict";var g=i(3),p=i(522);g({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==p},{trimLeft:p})}),(function(S,P,i){"use strict";var g=i(340).start,p=i(516);S.exports=p("trimStart")?function(){return g(this)}:"".trimStart}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("anchor")},{anchor:function(T){return p(this,"a","name",T)}})}),(function(S,P,i){"use strict";var g=i(14),p=i(16),m=i(68),y=/"/g,T=g("".replace);S.exports=function(A,C,I,R){var O=m(p(A)),F="<"+C;return I!==""&&(F+=" "+I+'="'+T(m(R),y,""")+'"'),F+">"+O+"</"+C+">"}}),(function(S,P,i){"use strict";var g=i(7);S.exports=function(p){return g(function(){var m=""[p]('"');return m!==m.toLowerCase()||m.split('"').length>3})}}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("big")},{big:function(){return p(this,"big","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("blink")},{blink:function(){return p(this,"blink","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("bold")},{bold:function(){return p(this,"b","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("fixed")},{fixed:function(){return p(this,"tt","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("fontcolor")},{fontcolor:function(T){return p(this,"font","color",T)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("fontsize")},{fontsize:function(T){return p(this,"font","size",T)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("italics")},{italics:function(){return p(this,"i","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("link")},{link:function(T){return p(this,"a","href",T)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("small")},{small:function(){return p(this,"small","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("strike")},{strike:function(){return p(this,"strike","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("sub")},{sub:function(){return p(this,"sub","","")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(524),m=i(525);g({target:"String",proto:!0,forced:m("sup")},{sup:function(){return p(this,"sup","","")}})}),(function(S,P,i){"use strict";var g=i(539);g("Float32",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(8),y=i(6),T=i(540),A=i(224),C=i(213),I=i(216),R=i(11),O=i(43),F=i(269),L=i(217),M=i(541),$=i(542),D=i(18),z=i(38),H=i(69),X=i(20),U=i(22),j=i(71),W=i(24),K=i(119),Q=i(57).f,tt=i(543),J=i(83).forEach,q=i(201),rt=i(77),ft=i(44),ct=i(5),ut=i(205),gt=i(51),pt=i(124),mt=gt.get,St=gt.set,Ct=gt.enforce,wt=ft.f,jt=ct.f,Ut=p.RangeError,yt=C.ArrayBuffer,Tt=yt.prototype,Ot=C.DataView,Bt=A.NATIVE_ARRAY_BUFFER_VIEWS,Kt=A.TYPED_ARRAY_TAG,qt=A.TypedArray,$t=A.TypedArrayPrototype,Jt=A.isTypedArray,te="BYTES_PER_ELEMENT",de="Wrong length",ue=function(oe,ye){rt(oe,ye,{configurable:!0,get:function(){return mt(this)[ye]}})},he=function(oe){var ye;return W(Tt,oe)||(ye=H(oe))==="ArrayBuffer"||ye==="SharedArrayBuffer"},Ee=function(oe,ye){return Jt(oe)&&!U(ye)&&ye in oe&&F(+ye)&&ye>=0},$e=function(ye,ke){return ke=D(ke),Ee(ye,ke)?R(2,ye[ke]):jt(ye,ke)},Ie=function(ye,ke,Ft){return ke=D(ke),Ee(ye,ke)&&X(Ft)&&z(Ft,"value")&&!z(Ft,"get")&&!z(Ft,"set")&&!Ft.configurable&&(!z(Ft,"writable")||Ft.writable)&&(!z(Ft,"enumerable")||Ft.enumerable)?(ye[ke]=Ft.value,ye):wt(ye,ke,Ft)};y?(Bt||(ct.f=$e,ft.f=Ie,ue($t,"buffer"),ue($t,"byteOffset"),ue($t,"byteLength"),ue($t,"length")),g({target:"Object",stat:!0,forced:!Bt},{getOwnPropertyDescriptor:$e,defineProperty:Ie}),S.exports=function(oe,ye,ke){var Ft=oe.match(/\d+/)[0]/8,Xt=oe+(ke?"Clamped":"")+"Array",Qt="get"+oe,Re="set"+oe,Wt=p[Xt],Ht=Wt,ie=Ht&&Ht.prototype,fe={},me=function(It,Dt){var zt=mt(It);return zt.view[Qt](Dt*Ft+zt.byteOffset,!0)},Qe=function(It,Dt,zt){var Nt=mt(It);Nt.view[Re](Dt*Ft+Nt.byteOffset,ke?$(zt):zt,!0)},vt=function(It,Dt){wt(It,Dt,{get:function(){return me(this,Dt)},set:function(zt){return Qe(this,Dt,zt)},enumerable:!0})};Bt?T&&(Ht=ye(function(It,Dt,zt,Nt){return I(It,ie),pt((function(){return X(Dt)?he(Dt)?Nt!==void 0?new Wt(Dt,M(zt,Ft),Nt):zt!==void 0?new Wt(Dt,M(zt,Ft)):new Wt(Dt):Jt(Dt)?ut(Ht,Dt):m(tt,Ht,Dt):new Wt(L(Dt))})(),It,Ht)}),K&&K(Ht,qt),J(Q(Wt),function(It){It in Ht||O(Ht,It,Wt[It])}),Ht.prototype=ie):(Ht=ye(function(It,Dt,zt,Nt){I(It,ie);var le=0,Te=0,Ce,Fe,se;if(!X(Dt))se=L(Dt),Fe=se*Ft,Ce=new yt(Fe);else if(he(Dt)){Ce=Dt,Te=M(zt,Ft);var Ue=Dt.byteLength;if(Nt===void 0){if(Ue%Ft)throw new Ut(de);if(Fe=Ue-Te,Fe<0)throw new Ut(de)}else if(Fe=L(Nt)*Ft,Fe+Te>Ue)throw new Ut(de);se=Fe/Ft}else return Jt(Dt)?ut(Ht,Dt):m(tt,Ht,Dt);for(St(It,{buffer:Ce,byteOffset:Te,byteLength:Fe,length:se,view:new Ot(Ce)});le<se;)vt(It,le++)}),K&&K(Ht,qt),ie=Ht.prototype=j($t)),ie.constructor!==Ht&&O(ie,"constructor",Ht),Ct(ie).TypedArrayConstructor=Ht,Kt&&O(ie,Kt,Xt);var Mt=Ht!==Wt;fe[Xt]=Ht,g({global:!0,constructor:!0,forced:Mt,sham:!Bt},fe),te in Ht||O(Ht,te,Ft),te in ie||O(ie,te,Ft),q(Xt)}):S.exports=function(){}}),(function(S,P,i){"use strict";var g=i(4),p=i(7),m=i(172),y=i(224).NATIVE_ARRAY_BUFFER_VIEWS,T=g.ArrayBuffer,A=g.Int8Array;S.exports=!y||!p(function(){A(1)})||!p(function(){new A(-1)})||!m(function(C){new A,new A(null),new A(1.5),new A(C)},!0)||p(function(){return new A(new T(2),1,void 0).length!==1})}),(function(S,P,i){"use strict";var g=i(274),p=RangeError;S.exports=function(m,y){var T=g(m);if(T%y)throw new p("Wrong offset");return T}}),(function(S){"use strict";var P=Math.floor;S.exports=function(i){var g=+i;if(g!==g||g<=0)return 0;if(g>=255)return 255;var p=P(g);return p+.5<g?p+1:g<p+.5||p%2===0?p:p+1}}),(function(S,P,i){"use strict";var g=i(84),p=i(8),m=i(30),y=i(395),T=i(39),A=i(63),C=i(140),I=i(141),R=i(138),O=i(544),F=i(224).aTypedArrayConstructor,L=i(545);S.exports=function($){var D=y(this),z=arguments.length,H=z>1?arguments[1]:void 0,X=H!==void 0;X&&m(H);var U=T($),j=I(U),W,K,Q,tt,J,q,rt,ft;if(j&&!R(j))for(rt=C(U,j),ft=rt.next,U=[];!(q=p(ft,rt)).done;)U.push(q.value);for(X&&z>2&&(H=g(H,arguments[2])),K=A(U),Q=new(F(D))(K),tt=O(Q),W=0;K>W;W++)J=X?H(U[W],W):U[W],Q[W]=tt?L(J):+J;return Q}}),(function(S,P,i){"use strict";var g=i(69);S.exports=function(p){var m=g(p);return m==="BigInt64Array"||m==="BigUint64Array"}}),(function(S,P,i){"use strict";var g=i(19),p=TypeError;S.exports=function(m){var y=g(m,"number");if(typeof y=="number")throw new p("Can't convert number to bigint");return BigInt(y)}}),(function(S,P,i){"use strict";var g=i(539);g("Float64",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(539);g("Int8",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(539);g("Int16",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(539);g("Int32",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(539);g("Uint8",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(539);g("Uint8",function(p){return function(y,T,A){return p(this,y,T,A)}},!0)}),(function(S,P,i){"use strict";var g=i(539);g("Uint16",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(539);g("Uint32",function(p){return function(y,T,A){return p(this,y,T,A)}})}),(function(S,P,i){"use strict";var g=i(224),p=i(63),m=i(61),y=g.aTypedArray,T=g.exportTypedArrayMethod;T("at",function(C){var I=y(this),R=p(I),O=m(C),F=O>=0?O:R+O;return F<0||F>=R?void 0:I[F]})}),(function(S,P,i){"use strict";var g=i(14),p=i(224),m=i(152),y=g(m),T=p.aTypedArray,A=p.exportTypedArrayMethod;A("copyWithin",function(I,R){return y(T(this),I,R,arguments.length>2?arguments[2]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(83).every,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("every",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(157),m=i(545),y=i(69),T=i(8),A=i(14),C=i(7),I=g.aTypedArray,R=g.exportTypedArrayMethod,O=A("".slice),F=C(function(){var L=0;return new Int8Array(2).fill({valueOf:function(){return L++}}),L!==1});R("fill",function(M){var $=arguments.length;I(this);var D=O(y(this),0,3)==="Big"?m(M):+M;return T(p,this,D,$>1?arguments[1]:void 0,$>2?arguments[2]:void 0)},F)}),(function(S,P,i){"use strict";var g=i(224),p=i(83).filter,m=i(559),y=g.aTypedArray,T=g.exportTypedArrayMethod;T("filter",function(C){var I=p(y(this),C,arguments.length>1?arguments[1]:void 0);return m(this,I)})}),(function(S,P,i){"use strict";var g=i(205),p=i(224).getTypedArrayConstructor;S.exports=function(m,y){return g(p(m),y)}}),(function(S,P,i){"use strict";var g=i(224),p=i(83).find,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("find",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(83).findIndex,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("findIndex",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(162).findLast,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("findLast",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(162).findLastIndex,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("findLastIndex",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(83).forEach,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("forEach",function(A){p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(540),p=i(224).exportTypedArrayStaticMethod,m=i(543);p("from",m,g)}),(function(S,P,i){"use strict";var g=i(224),p=i(59).includes,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("includes",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(59).indexOf,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("indexOf",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(4),p=i(7),m=i(14),y=i(224),T=i(176),A=i(33),C=A("iterator"),I=g.Uint8Array,R=m(T.values),O=m(T.keys),F=m(T.entries),L=y.aTypedArray,M=y.exportTypedArrayMethod,$=I&&I.prototype,D=!p(function(){$[C].call([1])}),z=!!$&&$.values&&$[C]===$.values&&$.values.name==="values",H=function(){return R(L(this))};M("entries",function(){return F(L(this))},D),M("keys",function(){return O(L(this))},D),M("values",H,D||!z,{name:"values"}),M(C,H,D||!z,{name:"values"})}),(function(S,P,i){"use strict";var g=i(224),p=i(14),m=g.aTypedArray,y=g.exportTypedArrayMethod,T=p([].join);y("join",function(C){return T(m(this),C)})}),(function(S,P,i){"use strict";var g=i(224),p=i(117),m=i(183),y=g.aTypedArray,T=g.exportTypedArrayMethod;T("lastIndexOf",function(C){var I=arguments.length;return p(m,y(this),I>1?[C,arguments[1]]:[C])})}),(function(S,P,i){"use strict";var g=i(224),p=i(83).map,m=i(559),y=g.aTypedArray,T=g.exportTypedArrayMethod;T("map",function(C){var I=p(y(this),C,arguments.length>1?arguments[1]:void 0);return m(this,I)})}),(function(S,P,i){"use strict";var g=i(224),p=i(540),m=g.aTypedArrayConstructor,y=g.exportTypedArrayStaticMethod;y("of",function(){for(var A=0,C=arguments.length,I=new(m(this))(C);C>A;)I[A]=arguments[A++];return I},p)}),(function(S,P,i){"use strict";var g=i(224),p=i(188).left,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("reduce",function(A){var C=arguments.length;return p(m(this),A,C,C>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=i(188).right,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("reduceRight",function(A){var C=arguments.length;return p(m(this),A,C,C>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(224),p=g.aTypedArray,m=g.exportTypedArrayMethod,y=Math.floor;m("reverse",function(){for(var A=this,C=p(A).length,I=y(C/2),R=0,O;R<I;)O=A[R],A[R++]=A[--C],A[C]=O;return A})}),(function(S,P,i){"use strict";var g=i(4),p=i(8),m=i(224),y=i(63),T=i(541),A=i(39),C=i(7),I=g.RangeError,R=g.Int8Array,O=R&&R.prototype,F=O&&O.set,L=m.aTypedArray,M=m.exportTypedArrayMethod,$=!C(function(){var z=new Uint8ClampedArray(2);return p(F,z,{length:1,0:3},1),z[1]!==3}),D=$&&m.NATIVE_ARRAY_BUFFER_VIEWS&&C(function(){var z=new R(2);return z.set(1),z.set("2",1),z[0]!==0||z[1]!==2});M("set",function(H){L(this);var X=T(arguments.length>1?arguments[1]:void 0,1),U=A(H);if($)return p(F,this,U,X);var j=this.length,W=y(U),K=0;if(W+X>j)throw new I("Wrong length");for(;K<W;)this[X+K]=U[K++]},!$||D)}),(function(S,P,i){"use strict";var g=i(224),p=i(7),m=i(76),y=g.aTypedArray,T=g.getTypedArrayConstructor,A=g.exportTypedArrayMethod,C=p(function(){new Int8Array(1).slice()});A("slice",function(R,O){for(var F=m(y(this),R,O),L=T(this),M=0,$=F.length,D=new L($);$>M;)D[M]=F[M++];return D},C)}),(function(S,P,i){"use strict";var g=i(224),p=i(83).some,m=g.aTypedArray,y=g.exportTypedArrayMethod;y("some",function(A){return p(m(this),A,arguments.length>1?arguments[1]:void 0)})}),(function(S,P,i){"use strict";var g=i(4),p=i(85),m=i(7),y=i(30),T=i(196),A=i(224),C=i(197),I=i(198),R=i(27),O=i(199),F=A.aTypedArray,L=A.exportTypedArrayMethod,M=g.Uint16Array,$=M&&p(M.prototype.sort),D=!!$&&!(m(function(){$(new M(2),null)})&&m(function(){$(new M(2),{})})),z=!!$&&!m(function(){if(R)return R<74;if(C)return C<67;if(I)return!0;if(O)return O<602;var X=new M(516),U=Array(516),j,W;for(j=0;j<516;j++)W=j%4,X[j]=515-j,U[j]=j-2*W+3;for($(X,function(K,Q){return(K/4|0)-(Q/4|0)}),j=0;j<516;j++)if(X[j]!==U[j])return!0}),H=function(X){return function(U,j){return X!==void 0?+X(U,j)||0:j!==j?U!==U?0:-1:U!==U?1:U===0&&j===0?1/U>0?1/j>0?0:1:1/j>0?-1:0:U>j?1:U<j?-1:0}};L("sort",function(U){return U!==void 0&&y(U),z?$(this,U):T(F(this),H(U))},!z||D)}),(function(S,P,i){"use strict";var g=i(224),p=i(64),m=i(60),y=g.aTypedArray,T=g.getTypedArrayConstructor,A=g.exportTypedArrayMethod;A("subarray",function(I,R){var O=y(this),F=O.length,L=m(I,F),M=T(O);return new M(O.buffer,O.byteOffset+L*O.BYTES_PER_ELEMENT,p((R===void 0?F:m(R,F))-L))})}),(function(S,P,i){"use strict";var g=i(4),p=i(117),m=i(224),y=i(7),T=i(76),A=g.Int8Array,C=m.aTypedArray,I=m.exportTypedArrayMethod,R=[].toLocaleString,O=!!A&&y(function(){R.call(new A(1))}),F=y(function(){return[1,2].toLocaleString()!==new A([1,2]).toLocaleString()})||!y(function(){A.prototype.toLocaleString.call([1,2])});I("toLocaleString",function(){return p(R,O?T(C(this)):C(this),T(arguments))},F)}),(function(S,P,i){"use strict";var g=i(63),p=i(224),m=p.aTypedArray,y=p.exportTypedArrayMethod,T=p.getTypedArrayConstructor;y("toReversed",function(){for(var C=m(this),I=g(C),R=new(T(C))(I),O=0;O<I;O++)R[O]=C[I-O-1];return R})}),(function(S,P,i){"use strict";var g=i(224),p=i(14),m=i(30),y=i(205),T=g.aTypedArray,A=g.getTypedArrayConstructor,C=g.exportTypedArrayMethod,I=p(g.TypedArrayPrototype.sort);C("toSorted",function(O){O!==void 0&&m(O);var F=T(this),L=y(A(F),F);return I(L,O)})}),(function(S,P,i){"use strict";var g=i(224).exportTypedArrayMethod,p=i(7),m=i(4),y=i(14),T=m.Uint8Array,A=T&&T.prototype||{},C=[].toString,I=y([].join);p(function(){C.call({})})&&(C=function(){return I(this)});var R=A.toString!==C;g("toString",C,R)}),(function(S,P,i){"use strict";var g=i(224),p=i(544),m=i(63),y=i(61),T=i(545),A=g.aTypedArray,C=g.getTypedArrayConstructor,I=g.exportTypedArrayMethod,R=RangeError,O=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(L){return L===8}})(),F=O&&(function(){try{new Int8Array(1).with(-.5,1)}catch(L){return!0}})();I("with",function(L,M){var $=A(this),D=m($),z=y(L),H=z<0?D+z:z,X=p($)?T(M):+M;if(H>=D||H<0)throw new R("Incorrect index");for(var U=new(C($))(D),j=0;j<D;j++)U[j]=j===H?X:$[j];return U},!O||F)}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(205),y=i(587),T=p.Uint8Array,A=!T||!T.fromBase64||!(function(){try{T.fromBase64("a");return}catch(C){}try{T.fromBase64("",null)}catch(C){return!0}})();T&&g({target:"Uint8Array",stat:!0,forced:A},{fromBase64:function(I){var R=y(I,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return m(T,R.bytes)}})}),(function(S,P,i){"use strict";var g=i(4),p=i(14),m=i(295),y=i(454),T=i(38),A=i(588),C=i(589),I=i(237),R=A.c2i,O=A.c2iUrl,F=g.SyntaxError,L=g.TypeError,M=g.Array,$=p("".charAt),D=Math.floor,z=function(U,j){for(var W=U.length;j<W;j++){var K=$(U,j);if(K!==" "&&K!==" "&&K!==`
|
|
30
|
+
`&&K!=="\f"&&K!=="\r")break}return j},H=function(U,j,W){var K=U.length;K<4&&(U+=K===2?"AA":"A");var Q=(j[$(U,0)]<<18)+(j[$(U,1)]<<12)+(j[$(U,2)]<<6)+j[$(U,3)],tt=[Q>>16&255,Q>>8&255,Q&255];if(K===2){if(W&&tt[1]!==0)throw new F("Extra bits");return[tt[0]]}if(K===3){if(W&&tt[2]!==0)throw new F("Extra bits");return[tt[0],tt[1]]}return tt},X=function(U,j,W){for(var K=j.length,Q=0;Q<K;Q++)U[W+Q]=j[Q];return W+K};S.exports=function(U,j,W,K){y(U),m(j);var Q=C(j)==="base64"?R:O,tt=j?j.lastChunkHandling:void 0;if(tt===void 0&&(tt="loose"),tt!=="loose"&&tt!=="strict"&&tt!=="stop-before-partial")throw new L("Incorrect `lastChunkHandling` option");W&&I(W.buffer);var J=U.length,q=W||M(D(J*3/4)),rt=0,ft=0,ct="",ut=0;if(K)for(;;){if(ut=z(U,ut),ut===J){if(ct.length>0){if(tt==="stop-before-partial")break;if(tt==="loose"){if(ct.length===1)throw new F("Malformed padding: exactly one additional character");rt=X(q,H(ct,Q,!1),rt)}else throw new F("Missing padding")}ft=J;break}var gt=$(U,ut);if(++ut,gt==="="){if(ct.length<2)throw new F("Padding is too early");if(ut=z(U,ut),ct.length===2){if(ut===J){if(tt==="stop-before-partial")break;throw new F("Malformed padding: only one =")}$(U,ut)==="="&&(++ut,ut=z(U,ut))}if(ut<J)throw new F("Unexpected character after padding");rt=X(q,H(ct,Q,tt==="strict"),rt),ft=J;break}if(!T(Q,gt))throw new F("Unexpected character");var pt=K-rt;if(pt===1&&ct.length===2||pt===2&&ct.length===3||(ct+=gt,ct.length===4&&(rt=X(q,H(ct,Q,!1),rt),ct="",ft=ut,rt===K)))break}return W||(q.length=rt),{bytes:q,read:ft,written:rt}}}),(function(S){"use strict";var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=P+"+/",g=P+"-_",p=function(m){for(var y={},T=0;T<64;T++)y[m.charAt(T)]=T;return y};S.exports={i2c:i,c2i:p(i),i2cUrl:g,c2iUrl:p(g)}}),(function(S){"use strict";var P=TypeError;S.exports=function(i){var g=i&&i.alphabet;if(g===void 0||g==="base64"||g==="base64url")return g||"base64";throw new P("Incorrect `alphabet` option")}}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(454),y=i(591);p.Uint8Array&&g({target:"Uint8Array",stat:!0},{fromHex:function(A){return y(m(A)).bytes}})}),(function(S,P,i){"use strict";var g=i(4),p=i(14),m=g.Uint8Array,y=g.SyntaxError,T=Math.min,A=p("".match);S.exports=function(C,I){var R=C.length;if(R%2!==0)throw new y("String should be an even number of characters");for(var O=I?T(I.length,R/2):R/2,F=I||new m(O),L=A(C,/[\S\s]{2}/g),M=0;M<O;M++){var $=+("0x"+L[M]+"0");if($!==$)throw new y("String should only contain hex characters");F[M]=$>>4}return{bytes:F,read:M<<1}}}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(587),y=i(593),T=p.Uint8Array,A=!T||!T.prototype.setFromBase64||!(function(){var C=new T([255,255,255,255,255]);try{C.setFromBase64("",null);return}catch(I){}try{C.setFromBase64("a");return}catch(I){}try{C.setFromBase64("MjYyZg===")}catch(I){return C[0]===50&&C[1]===54&&C[2]===50&&C[3]===255&&C[4]===255}})();T&&g({target:"Uint8Array",proto:!0,forced:A},{setFromBase64:function(I){y(this);var R=m(I,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:R.read,written:R.written}}})}),(function(S,P,i){"use strict";var g=i(69),p=TypeError;S.exports=function(m){if(g(m)==="Uint8Array")return m;throw new p("Argument is not an Uint8Array")}}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(454),y=i(593),T=i(237),A=i(591);function C(){try{var I=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(I).setFromHex("cafed00d")}catch(R){return!0}}p.Uint8Array&&g({target:"Uint8Array",proto:!0,forced:C()},{setFromHex:function(R){y(this),m(R),T(this.buffer);var O=A(R,this).read;return{read:O,written:O/2}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(14),y=i(295),T=i(593),A=i(237),C=i(588),I=i(589),R=C.i2c,O=C.i2cUrl,F=Math.floor,L=Math.ceil,M=m("".charAt),$=p.Uint8Array,D=p.Array,z=m([].join),H=!$||!$.prototype.toBase64||!(function(){try{var X=new $;X.toBase64(null)}catch(U){return!0}})();$&&g({target:"Uint8Array",proto:!0,forced:H},{toBase64:function(){var U=T(this),j=arguments.length?y(arguments[0]):void 0,W=I(j)==="base64"?R:O,K=!!j&&!!j.omitPadding;A(this.buffer);for(var Q=0,tt=U.length,J=D(K?F(tt/3)*4+(tt%3?tt%3+1:0):L(tt/3)*4),q=0,rt,ft=function(ct){return M(W,rt>>6*ct&63)};Q+2<tt;Q+=3)rt=(U[Q]<<16)+(U[Q+1]<<8)+U[Q+2],J[q++]=ft(3),J[q++]=ft(2),J[q++]=ft(1),J[q++]=ft(0);return Q+2===tt?(rt=(U[Q]<<16)+(U[Q+1]<<8),J[q++]=ft(3),J[q++]=ft(2),J[q++]=ft(1),K||(J[q++]="=")):Q+1===tt&&(rt=U[Q]<<16,J[q++]=ft(3),J[q++]=ft(2),K||(J[q++]="=",J[q++]="=")),z(J,"")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(14),y=i(593),T=i(237),A=m(1.1.toString),C=m([].join),I=Array,R=p.Uint8Array,O=!R||!R.prototype.toHex||!(function(){try{var F=new R([255,255,255,255,255,255,255,255]);return F.toHex()==="ffffffffffffffff"}catch(L){return!1}})();R&&g({target:"Uint8Array",proto:!0,forced:O},{toHex:function(){y(this),T(this.buffer);for(var L=I(this.length),M=0,$=this.length;M<$;M++){var D=A(this[M],16);L[M]=D.length===1?"0"+D:D}return C(L,"")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(14),m=i(68),y=String.fromCharCode,T=p("".charAt),A=p(/./.exec),C=p("".slice),I=/^[\da-f]{2}$/i,R=/^[\da-f]{4}$/i;g({global:!0},{unescape:function(F){for(var L=m(F),M="",$=L.length,D=0,z,H;D<$;){if(z=T(L,D++),z==="%"){if(T(L,D)==="u"){if(H=C(L,D+1,D+5),A(R,H)){M+=y(parseInt(H,16)),D+=5;continue}}else if(H=C(L,D,D+2),A(I,H)){M+=y(parseInt(H,16)),D+=2;continue}}M+=z}return M}})}),(function(S,P,i){"use strict";i(599)}),(function(S,P,i){"use strict";var g=i(303),p=i(4),m=i(14),y=i(215),T=i(308),A=i(307),C=i(600),I=i(20),R=i(51).enforce,O=i(7),F=i(52),L=Object,M=Array.isArray,$=L.isExtensible,D=L.isFrozen,z=L.isSealed,H=L.freeze,X=L.seal,U=!p.ActiveXObject&&"ActiveXObject"in p,j,W=function(ct){return function(){return ct(this,arguments.length?arguments[0]:void 0)}},K=A("WeakMap",W,C),Q=K.prototype,tt=m(Q.set),J=function(){return g&&O(function(){var ct=H([]);return tt(new K,ct,1),!D(ct)})};if(F)if(U){j=C.getConstructor(W,"WeakMap",!0),T.enable();var q=m(Q.delete),rt=m(Q.has),ft=m(Q.get);y(Q,{delete:function(ct){if(I(ct)&&!$(ct)){var ut=R(this);return ut.frozen||(ut.frozen=new j),q(this,ct)||ut.frozen.delete(ct)}return q(this,ct)},has:function(ut){if(I(ut)&&!$(ut)){var gt=R(this);return gt.frozen||(gt.frozen=new j),rt(this,ut)||gt.frozen.has(ut)}return rt(this,ut)},get:function(ut){if(I(ut)&&!$(ut)){var gt=R(this);return gt.frozen||(gt.frozen=new j),rt(this,ut)?ft(this,ut):gt.frozen.get(ut)}return ft(this,ut)},set:function(ut,gt){if(I(ut)&&!$(ut)){var pt=R(this);pt.frozen||(pt.frozen=new j),rt(this,ut)?tt(this,ut,gt):pt.frozen.set(ut,gt)}else tt(this,ut,gt);return this}})}else J()&&y(Q,{set:function(ut,gt){var pt;return M(ut)&&(D(ut)?pt=H:z(ut)&&(pt=X)),tt(this,ut,gt),pt&&pt(ut),this}})}),(function(S,P,i){"use strict";var g=i(14),p=i(215),m=i(308).getWeakData,y=i(216),T=i(46),A=i(17),C=i(20),I=i(137),R=i(83),O=i(38),F=i(51),L=F.set,M=F.getterFor,$=R.find,D=R.findIndex,z=g([].splice),H=0,X=function(W){return W.frozen||(W.frozen=new U)},U=function(){this.entries=[]},j=function(W,K){return $(W.entries,function(Q){return Q[0]===K})};U.prototype={get:function(W){var K=j(this,W);if(K)return K[1]},has:function(W){return!!j(this,W)},set:function(W,K){var Q=j(this,W);Q?Q[1]=K:this.entries.push([W,K])},delete:function(W){var K=D(this.entries,function(Q){return Q[0]===W});return~K&&z(this.entries,K,1),!!~K}},S.exports={getConstructor:function(W,K,Q,tt){var J=W(function(ct,ut){y(ct,q),L(ct,{type:K,id:H++,frozen:null}),A(ut)||I(ut,ct[tt],{that:ct,AS_ENTRIES:Q})}),q=J.prototype,rt=M(K),ft=function(ct,ut,gt){var pt=rt(ct),mt=m(T(ut),!0);return mt===!0?X(pt).set(ut,gt):mt[pt.id]=gt,ct};return p(q,{delete:function(ct){var ut=rt(this);if(!C(ct))return!1;var gt=m(ct);return gt===!0?X(ut).delete(ct):gt&&O(gt,ut.id)&&delete gt[ut.id]},has:function(ut){var gt=rt(this);if(!C(ut))return!1;var pt=m(ut);return pt===!0?X(gt).has(ut):pt&&O(pt,gt.id)}}),p(q,Q?{get:function(ut){var gt=rt(this);if(C(ut)){var pt=m(ut);if(pt===!0)return X(gt).get(ut);if(pt)return pt[gt.id]}},set:function(ut,gt){return ft(this,ut,gt)}}:{add:function(ut){return ft(this,ut,!0)}}),J}}}),(function(S,P,i){"use strict";var g=i(3),p=i(602),m=i(36),y=p.get,T=p.has,A=p.set;g({target:"WeakMap",proto:!0,real:!0,forced:m},{getOrInsert:function(I,R){return T(this,I)?y(this,I):(A(this,I,R),R)}})}),(function(S,P,i){"use strict";var g=i(14),p=WeakMap.prototype;S.exports={WeakMap,set:g(p.set),get:g(p.get),has:g(p.has),remove:g(p.delete)}}),(function(S,P,i){"use strict";var g=i(3),p=i(30),m=i(604),y=i(605),T=i(602),A=i(36),C=T.get,I=T.has,R=T.set,O=A||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(F){return F instanceof TypeError}})();g({target:"WeakMap",proto:!0,real:!0,forced:O},{getOrInsertComputed:function(L,M){if(A||m(this),y(L),p(M),I(this,L))return C(this,L);var $=M(L);return R(this,L,$),$}})}),(function(S,P,i){"use strict";var g=i(602).has;S.exports=function(p){return g(p),p}}),(function(S,P,i){"use strict";var g=i(602),p=new g.WeakMap,m=g.set,y=g.remove;S.exports=function(T){return m(p,T,1),y(p,T),T}}),(function(S,P,i){"use strict";i(607)}),(function(S,P,i){"use strict";var g=i(307),p=i(600);g("WeakSet",function(m){return function(){return m(this,arguments.length?arguments[0]:void 0)}},p)}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(23),y=i(14),T=i(8),A=i(7),C=i(68),I=i(397),R=i(588).c2i,O=/[^\d+/a-z]/i,F=/[\t\n\f\r ]+/g,L=/[=]{1,2}$/,M=m("atob"),$=Array,D=String.fromCharCode,z=y("".charAt),H=y("".replace),X=y([].join),U=y(O.exec),j=!!M&&!A(function(){return M("aGk=")!=="hi"}),W=j&&A(function(){return M(" ")!==""}),K=j&&!A(function(){M("a")}),Q=j&&!A(function(){M()}),tt=j&&M.length!==1,J=!j||W||K||Q||tt;g({global:!0,bind:!0,enumerable:!0,forced:J},{atob:function(rt){if(I(arguments.length,1),j&&!W&&!K)return T(M,p,rt);var ft=H(C(rt),F,""),ct=0,ut=0,gt,pt,mt;ft.length&3||(ft=H(ft,L,"")),gt=ft.length;var St=gt&3;if(St===1||U(O,ft))throw new(m("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var Ct=new $((gt>>2)*3+(St?St-1:0)),wt=0;ct<gt;)pt=z(ft,ct++),mt=ut&3?(mt<<6)+R[pt]:R[pt],ut++&3&&(Ct[wt++]=D(255&mt>>(-2*ut&6)));return X(Ct,"")}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(23),y=i(14),T=i(8),A=i(7),C=i(68),I=i(397),R=i(588).i2c,O=m("btoa"),F=Array,L=y([].join),M=y("".charAt),$=y("".charCodeAt),D=!!O&&!A(function(){return O("hi")!=="aGk="}),z=D&&!A(function(){O()}),H=D&&A(function(){return O(null)!=="bnVsbA=="}),X=D&&O.length!==1;g({global:!0,bind:!0,enumerable:!0,forced:!D||z||H||X},{btoa:function(j){if(I(arguments.length,1),D)return T(O,p,C(j));for(var W=C(j),K=new F((W.length+2)/3<<2),Q=0,tt=0,J=R,q,rt;M(W,tt)||(J="=",tt%1);){if(rt=$(W,tt+=.75),rt>255)throw new(m("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");q=q<<8|rt,K[Q++]=M(J,63&q>>8-tt%1*8)}return L(K,"")}})}),(function(S,P,i){"use strict";var g=i(4),p=i(611),m=i(612),y=i(168),T=i(43),A=function(I){if(I&&I.forEach!==y)try{T(I,"forEach",y)}catch(R){I.forEach=y}};for(var C in p)p[C]&&A(g[C]&&g[C].prototype);A(m)}),(function(S){"use strict";S.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),(function(S,P,i){"use strict";var g=i(42),p=g("span").classList,m=p&&p.constructor&&p.constructor.prototype;S.exports=m===Object.prototype?void 0:m}),(function(S,P,i){"use strict";var g=i(4),p=i(611),m=i(612),y=i(176),T=i(43),A=i(82),C=i(33),I=C("iterator"),R=y.values,O=function(L,M){if(L){if(L[I]!==R)try{T(L,I,R)}catch(D){L[I]=R}if(A(L,M,!0),p[M]){for(var $ in y)if(L[$]!==y[$])try{T(L,$,y[$])}catch(D){L[$]=y[$]}}}};for(var F in p)O(g[F]&&g[F].prototype,F);O(m,"DOMTokenList")}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(239),y=i(7),T=i(71),A=i(11),C=i(44).f,I=i(47),R=i(77),O=i(38),F=i(216),L=i(46),M=i(132),$=i(125),D=i(615),z=i(128),H=i(51),X=i(6),U=i(36),j="DOMException",W="DATA_CLONE_ERR",K=p("Error"),Q=p(j)||(function(){try{var $t=p("MessageChannel")||m("worker_threads").MessageChannel;new $t().port1.postMessage(new WeakMap)}catch(Jt){if(Jt.name===W&&Jt.code===25)return Jt.constructor}})(),tt=Q&&Q.prototype,J=K.prototype,q=H.set,rt=H.getterFor(j),ft="stack"in new K(j),ct=function($t){return O(D,$t)&&D[$t].m?D[$t].c:0},ut=function(){F(this,gt);var Jt=arguments.length,te=$(Jt<1?void 0:arguments[0]),de=$(Jt<2?void 0:arguments[1],"Error"),ue=ct(de);if(q(this,{type:j,name:de,message:te,code:ue}),X||(this.name=de,this.message=te,this.code=ue),ft){var he=new K(te);he.name=j,C(this,"stack",A(1,z(he.stack,1)))}},gt=ut.prototype=T(J),pt=function($t){return{enumerable:!0,configurable:!0,get:$t}},mt=function($t){return pt(function(){return rt(this)[$t]})};X&&(R(gt,"code",mt("code")),R(gt,"message",mt("message")),R(gt,"name",mt("name"))),C(gt,"constructor",A(1,ut));var St=y(function(){return!(new Q instanceof K)}),Ct=St||y(function(){return J.toString!==M||String(new Q(1,2))!=="2: 1"}),wt=St||y(function(){return new Q(1,"DataCloneError").code!==25}),jt=St||Q[W]!==25||tt[W]!==25,Ut=U?Ct||wt||jt:St;g({global:!0,constructor:!0,forced:Ut},{DOMException:Ut?ut:Q});var yt=p(j),Tt=yt.prototype;Ct&&(U||Q===yt)&&I(Tt,"toString",M),wt&&X&&Q===yt&&R(Tt,"code",pt(function(){return ct(L(this).name)}));for(var Ot in D)if(O(D,Ot)){var Bt=D[Ot],Kt=Bt.s,qt=A(6,Bt.c);O(yt,Kt)||C(yt,Kt,qt),O(Tt,Kt)||C(Tt,Kt,qt)}}),(function(S){"use strict";S.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(23),y=i(11),T=i(44).f,A=i(38),C=i(216),I=i(124),R=i(125),O=i(615),F=i(128),L=i(6),M=i(36),$="DOMException",D=m("Error"),z=m($),H=function(){C(this,X);var ut=arguments.length,gt=R(ut<1?void 0:arguments[0]),pt=R(ut<2?void 0:arguments[1],"Error"),mt=new z(gt,pt),St=new D(gt);return St.name=$,T(mt,"stack",y(1,F(St.stack,1))),I(mt,this,H),mt},X=H.prototype=z.prototype,U="stack"in new D($),j="stack"in new z(1,2),W=z&&L&&Object.getOwnPropertyDescriptor(p,$),K=!!W&&!(W.writable&&W.configurable),Q=U&&!K&&!j;g({global:!0,constructor:!0,forced:M||Q},{DOMException:Q?H:z});var tt=m($),J=tt.prototype;if(J.constructor!==tt){M||T(J,"constructor",y(1,tt));for(var q in O)if(A(O,q)){var rt=O[q],ft=rt.s;A(tt,ft)||T(tt,ft,y(6,rt.c))}}}),(function(S,P,i){"use strict";var g=i(23),p=i(82),m="DOMException";p(g(m),m)}),(function(S,P,i){"use strict";i(619),i(620)}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(396).clear;g({global:!0,bind:!0,enumerable:!0,forced:p.clearImmediate!==m},{clearImmediate:m})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(396).set,y=i(621),T=p.setImmediate?y(m,!1):m;g({global:!0,bind:!0,enumerable:!0,forced:p.setImmediate!==T},{setImmediate:T})}),(function(S,P,i){"use strict";var g=i(4),p=i(117),m=i(21),y=i(190),T=i(28),A=i(76),C=i(397),I=g.Function,R=/MSIE .\./.test(T)||y==="BUN"&&(function(){var O=g.Bun.version.split(".");return O.length<3||O[0]==="0"&&(O[1]<3||O[1]==="3"&&O[2]==="0")})();S.exports=function(O,F){var L=F?2:1;return R?function(M,$){var D=C(arguments.length,1)>L,z=m(M)?M:I(M),H=D?A(arguments,L):[],X=D?function(){p(z,this,H)}:z;return F?O(X,$):O(X)}:O}}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(399),y=i(30),T=i(397),A=i(7),C=i(6),I=A(function(){return C&&Object.getOwnPropertyDescriptor(p,"queueMicrotask").value.length!==1});g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:I},{queueMicrotask:function(O){T(arguments.length,1),m(y(O))}})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(77),y=i(6),T=TypeError,A=Object.defineProperty,C=p.self!==p;try{if(y){var I=Object.getOwnPropertyDescriptor(p,"self");(C||!I||!I.get||!I.enumerable)&&m(p,"self",{get:function(){return p},set:function(O){if(this!==p)throw new T("Illegal invocation");A(p,"self",{value:O,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else g({global:!0,simple:!0,forced:C},{self:p})}catch(R){}}),(function(S,P,i){"use strict";var g=i(36),p=i(3),m=i(4),y=i(23),T=i(14),A=i(7),C=i(40),I=i(21),R=i(89),O=i(17),F=i(20),L=i(22),M=i(137),$=i(46),D=i(69),z=i(38),H=i(90),X=i(43),U=i(63),j=i(397),W=i(447),K=i(313),Q=i(467),tt=i(469),J=i(238),q=i(129),rt=i(240),ft=m.Object,ct=m.Array,ut=m.Date,gt=m.Error,pt=m.TypeError,mt=m.PerformanceMark,St=y("DOMException"),Ct=K.Map,wt=K.has,jt=K.get,Ut=K.set,yt=Q.Set,Tt=Q.add,Ot=Q.has,Bt=y("Object","keys"),Kt=T([].push),qt=T((!0).valueOf),$t=T(1.1.valueOf),Jt=T("".valueOf),te=T(ut.prototype.getTime),de=C("structuredClone"),ue="DataCloneError",he="Transferring",Ee=function(vt){return!A(function(){var Mt=new m.Set([7]),It=vt(Mt),Dt=vt(ft(7));return It===Mt||!It.has(7)||!F(Dt)||+Dt!=7})&&vt},$e=function(vt,Mt){return!A(function(){var It=new Mt,Dt=vt({a:It,b:It});return!(Dt&&Dt.a===Dt.b&&Dt.a instanceof Mt&&Dt.a.stack===It.stack)})},Ie=function(vt){return!A(function(){var Mt=vt(new m.AggregateError([1],de,{cause:3}));return Mt.name!=="AggregateError"||Mt.errors[0]!==1||Mt.message!==de||Mt.cause!==3})},oe=m.structuredClone,ye=g||!$e(oe,gt)||!$e(oe,St)||!Ie(oe),ke=!oe&&Ee(function(vt){return new mt(de,{detail:vt}).detail}),Ft=Ee(oe)||ke,Xt=function(vt){throw new St("Uncloneable type: "+vt,ue)},Qt=function(vt,Mt){throw new St((Mt||"Cloning")+" of "+vt+" cannot be properly polyfilled in this engine",ue)},Re=function(vt,Mt){return Ft||Qt(Mt),Ft(vt)},Wt=function(){var vt;try{vt=new m.DataTransfer}catch(Mt){try{vt=new m.ClipboardEvent("").clipboardData}catch(It){}}return vt&&vt.items&&vt.files?vt:null},Ht=function(vt,Mt,It){if(wt(Mt,vt))return jt(Mt,vt);var Dt=It||D(vt),zt,Nt,le,Te,Ce,Fe;if(Dt==="SharedArrayBuffer")Ft?zt=Ft(vt):zt=vt;else{var se=m.DataView;!se&&!I(vt.slice)&&Qt("ArrayBuffer");try{if(I(vt.slice)&&!vt.resizable)zt=vt.slice(0);else for(Nt=vt.byteLength,le=("maxByteLength"in vt)?{maxByteLength:vt.maxByteLength}:void 0,zt=new ArrayBuffer(Nt,le),Te=new se(vt),Ce=new se(zt),Fe=0;Fe<Nt;Fe++)Ce.setUint8(Fe,Te.getUint8(Fe))}catch(Ue){throw new St("ArrayBuffer is detached",ue)}}return Ut(Mt,vt,zt),zt},ie=function(vt,Mt,It,Dt,zt){var Nt=m[Mt];return F(Nt)||Qt(Mt),new Nt(Ht(vt.buffer,zt),It,Dt)},fe=function(vt,Mt){if(L(vt)&&Xt("Symbol"),!F(vt))return vt;if(Mt){if(wt(Mt,vt))return jt(Mt,vt)}else Mt=new Ct;var It=D(vt),Dt,zt,Nt,le,Te,Ce,Fe,se;switch(It){case"Array":Nt=ct(U(vt));break;case"Object":Nt={};break;case"Map":Nt=new Ct;break;case"Set":Nt=new yt;break;case"RegExp":Nt=new RegExp(vt.source,W(vt));break;case"Error":switch(zt=vt.name,zt){case"AggregateError":Nt=new(y(zt))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":Nt=new(y(zt));break;case"CompileError":case"LinkError":case"RuntimeError":Nt=new(y("WebAssembly",zt));break;default:Nt=new gt}break;case"DOMException":Nt=new St(vt.message,vt.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Nt=Ht(vt,Mt,It);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Ce=It==="DataView"?vt.byteLength:vt.length,Nt=ie(vt,It,vt.byteOffset,Ce,Mt);break;case"DOMQuad":try{Nt=new DOMQuad(fe(vt.p1,Mt),fe(vt.p2,Mt),fe(vt.p3,Mt),fe(vt.p4,Mt))}catch(Ue){Nt=Re(vt,It)}break;case"File":if(Ft)try{Nt=Ft(vt),D(Nt)!==It&&(Nt=void 0)}catch(Ue){}if(!Nt)try{Nt=new File([vt],vt.name,vt)}catch(Ue){}Nt||Qt(It);break;case"FileList":if(le=Wt(),le){for(Te=0,Ce=U(vt);Te<Ce;Te++)le.items.add(fe(vt[Te],Mt));Nt=le.files}else Nt=Re(vt,It);break;case"ImageData":try{Nt=new ImageData(fe(vt.data,Mt),vt.width,vt.height,{colorSpace:vt.colorSpace})}catch(Ue){Nt=Re(vt,It)}break;default:if(Ft)Nt=Ft(vt);else switch(It){case"BigInt":Nt=ft(vt.valueOf());break;case"Boolean":Nt=ft(qt(vt));break;case"Number":Nt=ft($t(vt));break;case"String":Nt=ft(Jt(vt));break;case"Date":Nt=new ut(te(vt));break;case"Blob":try{Nt=vt.slice(0,vt.size,vt.type)}catch(Ue){Qt(It)}break;case"DOMPoint":case"DOMPointReadOnly":Dt=m[It];try{Nt=Dt.fromPoint?Dt.fromPoint(vt):new Dt(vt.x,vt.y,vt.z,vt.w)}catch(Ue){Qt(It)}break;case"DOMRect":case"DOMRectReadOnly":Dt=m[It];try{Nt=Dt.fromRect?Dt.fromRect(vt):new Dt(vt.x,vt.y,vt.width,vt.height)}catch(Ue){Qt(It)}break;case"DOMMatrix":case"DOMMatrixReadOnly":Dt=m[It];try{Nt=Dt.fromMatrix?Dt.fromMatrix(vt):new Dt(vt)}catch(Ue){Qt(It)}break;case"AudioData":case"VideoFrame":I(vt.clone)||Qt(It);try{Nt=vt.clone()}catch(Ue){Xt(It)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":Qt(It);default:Xt(It)}}switch(Ut(Mt,vt,Nt),It){case"Array":case"Object":for(Fe=Bt(vt),Te=0,Ce=U(Fe);Te<Ce;Te++)se=Fe[Te],H(Nt,se,fe(vt[se],Mt));break;case"Map":vt.forEach(function(Ue,Ze){Ut(Nt,fe(Ze,Mt),fe(Ue,Mt))});break;case"Set":vt.forEach(function(Ue){Tt(Nt,fe(Ue,Mt))});break;case"Error":X(Nt,"message",fe(vt.message,Mt)),z(vt,"cause")&&X(Nt,"cause",fe(vt.cause,Mt)),zt==="AggregateError"?Nt.errors=fe(vt.errors,Mt):zt==="SuppressedError"&&(Nt.error=fe(vt.error,Mt),Nt.suppressed=fe(vt.suppressed,Mt));case"DOMException":q&&X(Nt,"stack",fe(vt.stack,Mt))}return Nt},me=function(vt,Mt){if(!F(vt))throw new pt("Transfer option cannot be converted to a sequence");var It=[];M(vt,function(Ze){Kt(It,$(Ze))});for(var Dt=0,zt=U(It),Nt=new yt,le,Te,Ce,Fe,se,Ue;Dt<zt;){if(le=It[Dt++],Te=D(le),Fe=void 0,Te==="ArrayBuffer"?Ot(Nt,le):wt(Mt,le))throw new St("Duplicate transferable",ue);if(Te==="ArrayBuffer"){Tt(Nt,le);continue}if(rt)Fe=oe(le,{transfer:[le]});else switch(Te){case"ImageBitmap":Ce=m.OffscreenCanvas,R(Ce)||Qt(Te,he);try{se=new Ce(le.width,le.height),Ue=se.getContext("bitmaprenderer"),Ue.transferFromImageBitmap(le),Fe=se.transferToImageBitmap()}catch(Ze){}break;case"AudioData":case"VideoFrame":(!I(le.clone)||!I(le.close))&&Qt(Te,he);try{Fe=le.clone(),le.close()}catch(Ze){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":Qt(Te,he)}if(Fe===void 0)throw new St("This object cannot be transferred: "+Te,ue);Ut(Mt,le,Fe)}return Nt},Qe=function(vt){tt(vt,function(Mt){rt?oe(Mt,{transfer:[Mt]}):I(Mt.transfer)?Mt.transfer():J?J(Mt):Qt("ArrayBuffer",he)})};p({global:!0,enumerable:!0,sham:!rt,forced:ye},{structuredClone:function(Mt){var It=j(arguments.length,1)>1&&!O(arguments[1])?$(arguments[1]):void 0,Dt=It?It.transfer:void 0,zt,Nt;Dt!==void 0&&(zt=new Ct,Nt=me(Dt,zt));var le=fe(Mt,zt);return Nt&&Qe(Nt),le}})}),(function(S,P,i){"use strict";i(626),i(627)}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(621),y=m(p.setInterval,!0);g({global:!0,bind:!0,forced:p.setInterval!==y},{setInterval:y})}),(function(S,P,i){"use strict";var g=i(3),p=i(4),m=i(621),y=m(p.setTimeout,!0);g({global:!0,bind:!0,forced:p.setTimeout!==y},{setTimeout:y})}),(function(S,P,i){"use strict";i(629)}),(function(S,P,i){"use strict";i(496);var g=i(3),p=i(6),m=i(630),y=i(4),T=i(84),A=i(14),C=i(47),I=i(77),R=i(216),O=i(38),F=i(358),L=i(170),M=i(76),$=i(489).codeAt,D=i(631),z=i(632),H=i(68),X=i(82),U=i(397),j=i(633),W=i(51),K=W.set,Q=W.getterFor("URL"),tt=j.URLSearchParams,J=j.getState,q=z.decode,rt=z.encode,ft=y.URL,ct=y.TypeError,ut=y.parseInt,gt=Math.floor,pt=Math.pow,mt=String.fromCharCode,St=A("".charAt),Ct=A(/./.exec),wt=A([].join),jt=A(1.1.toString),Ut=A([].pop),yt=A([].push),Tt=A("".replace),Ot=A([].shift),Bt=A("".split),Kt=A("".indexOf),qt=A("".slice),$t=A("".toLowerCase),Jt=A([].unshift),te="Invalid authority",de="Invalid scheme",ue="Invalid host",he="Invalid port",Ee=/[a-z]/i,$e=/[\d+\-.a-z]/i,Ie=/\d/,oe=/^0x/i,ye=/^[0-7]+$/,ke=/^\d+$/,Ft=/^[\da-f]+$/i,Xt=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,Qt=/[\0\t\n\r #/:<>?@[\\\]^|]/,Re=/^[\u0000-\u0020]+/,Wt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Ht=/[\t\n\r]/g,ie=/[^\u0000-\u007F]/,fe="\xA8\xAF\xB4\xB8\u02D8\u02D9\u02DA\u02DB\u02DC\u02DD\u037A\u0384\u0385\u1FBD\u1FBF\u1FC0\u1FC1\u1FCD\u1FCE\u1FCF\u1FDD\u1FDE\u1FDF\u1FED\u1FEE\u1FFD\u1FFE\u2017\u203E\u2047\u2048\u2049\u2100\u2101\u2105\u2106\u2A74\u309B\u309C\uFC5E\uFC5F\uFC60\uFC61\uFC62\uFC63\uFDFA\uFDFB\uFE13\uFE16\uFE47\uFE48\uFE49\uFE4A\uFE4B\uFE4C\uFE55\uFE56\uFE5F\uFE64\uFE65\uFE68\uFE6A\uFE6B\uFE70\uFE72\uFE74\uFE76\uFE78\uFE7A\uFE7C\uFE7E\uFFE3",me,Qe=function(ht){return ht===173||ht===847||ht===8203||ht===12644||ht===65279||ht===65440||ht>=4447&&ht<=4448||ht>=6068&&ht<=6069||ht>=6155&&ht<=6159||ht>=8288&&ht<=8292||ht>=8298&&ht<=8303||ht>=65024&&ht<=65039||ht>=917760&&ht<=917999},vt=function(ht){return ht===65533||ht>=55296&&ht<=57343||ht>=128&&ht<=159||ht>=8206&&ht<=8207||ht>=8232&&ht<=8233||ht>=8234&&ht<=8238||ht>=8293&&ht<=8297||ht>=64976&&ht<=65007||(ht&65534)===65534||ht>=57344&&ht<=63743||ht>=983040&&ht<=1114109},Mt=function(ht){return ht>=65281&&ht<=65374?ht-65248:ht===160||ht===5760||ht===8239||ht===8287||ht===12288||ht>=8192&&ht<=8202||ht<=65535&&Kt(fe,mt(ht))>-1?32:ht},It=function(ht){if(!Ct(ie,ht))return ht===""?null:D(ht);var Pt=L(ht),Lt="",xt,kt,we;for(xt=0;xt<Pt.length;xt++){if(kt=$(Pt[xt],0),vt(kt))return null;Qe(kt)||(we=Mt(kt),Lt+=we===kt?Pt[xt]:mt(we))}return Lt===""?null:D(Lt)},Dt=function(ht){var Pt=Bt(ht,"."),Lt,xt;if(Pt[Pt.length-1]===""){if(Pt.length===1)return!1;Pt.length--}return Lt=Pt[Pt.length-1],Ct(ke,Lt)?!0:Ct(oe,Lt)?(xt=qt(Lt,2),xt===""||!!Ct(Ft,xt)):!1},zt=function(ht){var Pt=Bt(ht,"."),Lt,xt,kt,we,ce,Ge,De;if(Pt.length&&Pt[Pt.length-1]===""&&Pt.length--,Lt=Pt.length,Lt>4)return null;for(xt=[],kt=0;kt<Lt;kt++){if(we=Pt[kt],we==="")return null;if(ce=10,we.length>1&&St(we,0)==="0"&&(ce=Ct(oe,we)?16:8,we=qt(we,ce===8?1:2)),we==="")Ge=0;else{if(!Ct(ce===10?ke:ce===8?ye:Ft,we))return null;Ge=ut(we,ce)}yt(xt,Ge)}for(kt=0;kt<Lt;kt++)if(Ge=xt[kt],kt===Lt-1){if(Ge>=pt(256,5-Lt))return null}else if(Ge>255)return null;for(De=Ut(xt),kt=0;kt<xt.length;kt++)De+=xt[kt]*pt(256,3-kt);return De},Nt=function(ht){var Pt=[0,0,0,0,0,0,0,0],Lt=0,xt=null,kt=0,we,ce,Ge,De,He,on,_t,qe=function(){return St(ht,kt)};if(qe()===":"){if(St(ht,1)!==":")return;kt+=2,Lt++,xt=Lt}for(;qe();){if(Lt===8)return;if(qe()===":"){if(xt!==null)return;kt++,Lt++,xt=Lt;continue}for(we=ce=0;ce<4&&Ct(Ft,qe());)we=we*16+ut(qe(),16),kt++,ce++;if(qe()==="."){if(ce===0||(kt-=ce,Lt>6))return;for(Ge=0;qe();){if(De=null,Ge>0)if(qe()==="."&&Ge<4)kt++;else return;if(!Ct(Ie,qe()))return;for(;Ct(Ie,qe());){if(He=ut(qe(),10),De===null)De=He;else{if(De===0)return;De=De*10+He}if(De>255)return;kt++}Pt[Lt]=Pt[Lt]*256+De,Ge++,(Ge===2||Ge===4)&&Lt++}if(Ge!==4)return;break}else if(qe()===":"){if(kt++,!qe())return}else if(qe())return;Pt[Lt++]=we}if(xt!==null)for(on=Lt-xt,Lt=7;Lt!==0&&on>0;)_t=Pt[Lt],Pt[Lt--]=Pt[xt+on-1],Pt[xt+--on]=_t;else if(Lt!==8)return;return Pt},le=function(ht){for(var Pt=null,Lt=1,xt=null,kt=0,we=0;we<8;we++)ht[we]!==0?(kt>Lt&&(Pt=xt,Lt=kt),xt=null,kt=0):(xt===null&&(xt=we),++kt);return kt>Lt?xt:Pt},Te=function(ht){var Pt,Lt,xt,kt;if(typeof ht=="number"){for(Pt=[],Lt=0;Lt<4;Lt++)Jt(Pt,ht%256),ht=gt(ht/256);return wt(Pt,".")}if(typeof ht=="object"){for(Pt="",xt=le(ht),Lt=0;Lt<8;Lt++)kt&&ht[Lt]===0||(kt&&(kt=!1),xt===Lt?(Pt+=Lt?":":"::",kt=!0):(Pt+=jt(ht[Lt],16),Lt<7&&(Pt+=":")));return"["+Pt+"]"}return ht},Ce={},Fe=F({},Ce,{" ":1,'"':1,"#":1,"<":1,">":1}),se=F({},Fe,{"'":1}),Ue=F({},Ce,{" ":1,'"':1,"<":1,">":1,"`":1}),Ze=F({},Ue,{"#":1,"?":1,"{":1,"}":1,"^":1}),Yi=F({},Ze,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Rn=function(ht,Pt){var Lt=$(ht,0);return Lt>=32&&Lt<127&&!O(Pt,ht)?ht:ht==="'"&&O(Pt,ht)?"%27":rt(ht)},_a={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ve=function(ht,Pt){var Lt;return ht.length===2&&Ct(Ee,St(ht,0))&&((Lt=St(ht,1))===":"||!Pt&&Lt==="|")},qa=function(ht){var Pt;return ht.length>1&&Ve(qt(ht,0,2))&&(ht.length===2||(Pt=St(ht,2))==="/"||Pt==="\\"||Pt==="?"||Pt==="#")},kl=function(ht){return ht==="."||$t(ht)==="%2e"},dr=function(ht){return ht=$t(ht),ht===".."||ht==="%2e."||ht===".%2e"||ht==="%2e%2e"},wr={},Xn={},ia={},Zs={},Vn={},Ia={},Ir={},bn={},Ra={},Oa={},ti={},ei={},ni={},ri={},Ki={},Zi={},sa={},On={},ai={},kn={},hr={},ii=function(ht,Pt,Lt){var xt=H(ht),kt,we,ce;if(Pt){if(we=this.parse(xt),we)throw new ct(we);this.searchParams=null}else{if(Lt!==void 0&&(kt=new ii(Lt,!0)),we=this.parse(xt,null,kt),we)throw new ct(we);ce=J(new tt),ce.bindURL(this),this.searchParams=ce}};ii.prototype={type:"URL",parse:function(ht,Pt,Lt){var xt=this,kt=Pt||wr,we=0,ce="",Ge=!1,De=!1,He=!1,on,_t,qe,gr;for(ht=H(ht),Pt||(xt.scheme="",xt.username="",xt.password="",xt.host=null,xt.port=null,xt.path=[],xt.query=null,xt.fragment=null,xt.cannotBeABaseURL=!1,ht=Tt(ht,Re,""),ht=Tt(ht,Wt,"$1")),ht=Tt(ht,Ht,""),on=L(ht);we<=on.length;){switch(_t=on[we],kt){case wr:if(_t&&Ct(Ee,_t))ce+=$t(_t),kt=Xn;else{if(Pt)return de;kt=ia;continue}break;case Xn:if(_t&&Ct($e,_t))ce+=$t(_t);else if(_t===":"){if(Pt&&(xt.isSpecial()!==O(_a,ce)||ce==="file"&&(xt.includesCredentials()||xt.port!==null)||xt.scheme==="file"&&xt.host===""))return;if(xt.scheme=ce,Pt){xt.isSpecial()&&_a[xt.scheme]===xt.port&&(xt.port=null);return}ce="",xt.scheme==="file"?kt=ri:xt.isSpecial()&&Lt&&Lt.scheme===xt.scheme?kt=Zs:xt.isSpecial()?kt=bn:on[we+1]==="/"?(kt=Vn,we++):(xt.cannotBeABaseURL=!0,yt(xt.path,""),kt=ai)}else{if(Pt)return de;ce="",kt=ia,we=0;continue}break;case ia:if(!Lt||Lt.cannotBeABaseURL&&_t!=="#")return de;if(Lt.cannotBeABaseURL&&_t==="#"){xt.scheme=Lt.scheme,xt.path=M(Lt.path),xt.query=Lt.query,xt.fragment="",xt.cannotBeABaseURL=!0,kt=hr;break}kt=Lt.scheme==="file"?ri:Ia;continue;case Zs:if(_t==="/"&&on[we+1]==="/")kt=Ra,we++;else{kt=Ia;continue}break;case Vn:if(_t==="/"){kt=Oa;break}else{kt=On;continue}case Ia:if(xt.scheme=Lt.scheme,_t===me)xt.username=Lt.username,xt.password=Lt.password,xt.host=Lt.host,xt.port=Lt.port,xt.path=M(Lt.path),xt.query=Lt.query;else if(_t==="/"||_t==="\\"&&xt.isSpecial())kt=Ir;else if(_t==="?")xt.username=Lt.username,xt.password=Lt.password,xt.host=Lt.host,xt.port=Lt.port,xt.path=M(Lt.path),xt.query="",kt=kn;else if(_t==="#")xt.username=Lt.username,xt.password=Lt.password,xt.host=Lt.host,xt.port=Lt.port,xt.path=M(Lt.path),xt.query=Lt.query,xt.fragment="",kt=hr;else{xt.username=Lt.username,xt.password=Lt.password,xt.host=Lt.host,xt.port=Lt.port,xt.path=M(Lt.path),xt.path.length&&xt.path.length--,kt=On;continue}break;case Ir:if(xt.isSpecial()&&(_t==="/"||_t==="\\"))kt=Ra;else if(_t==="/")kt=Oa;else{xt.username=Lt.username,xt.password=Lt.password,xt.host=Lt.host,xt.port=Lt.port,kt=On;continue}break;case bn:if(kt=Ra,_t!=="/"||on[we+1]!=="/")continue;we++;break;case Ra:if(_t!=="/"&&_t!=="\\"){kt=Oa;continue}break;case Oa:if(_t==="@"){Ge&&(ce="%40"+ce),Ge=!0,qe=L(ce);for(var si=0;si<qe.length;si++){var la=qe[si];if(la===":"&&!He){He=!0;continue}var Qs=Rn(la,Yi);He?xt.password+=Qs:xt.username+=Qs}ce=""}else if(_t===me||_t==="/"||_t==="?"||_t==="#"||_t==="\\"&&xt.isSpecial()){if(Ge&&ce==="")return te;we-=L(ce).length+1,ce="",kt=ti}else ce+=_t;break;case ti:case ei:if(Pt&&xt.scheme==="file"){kt=Zi;continue}else if(_t===":"&&!De){if(ce==="")return ue;if(Pt===ei)return;if(gr=xt.parseHost(ce),gr)return gr;ce="",kt=ni}else if(_t===me||_t==="/"||_t==="?"||_t==="#"||_t==="\\"&&xt.isSpecial()){if(xt.isSpecial()&&ce==="")return ue;if(Pt&&ce===""&&(xt.includesCredentials()||xt.port!==null))return;if(gr=xt.parseHost(ce),gr)return gr;if(ce="",kt=sa,Pt)return;continue}else _t==="["?De=!0:_t==="]"&&(De=!1),ce+=_t;break;case ni:if(Ct(Ie,_t))ce+=_t;else if(_t===me||_t==="/"||_t==="?"||_t==="#"||_t==="\\"&&xt.isSpecial()||Pt){if(ce!==""){var Ji=ut(ce,10);if(Ji>65535)return he;xt.port=xt.isSpecial()&&Ji===_a[xt.scheme]?null:Ji,ce=""}if(Pt)return;kt=sa;continue}else return he;break;case ri:if(xt.scheme="file",xt.host="",_t==="/"||_t==="\\")kt=Ki;else if(Lt&&Lt.scheme==="file")switch(_t){case me:xt.host=Lt.host,xt.path=M(Lt.path),xt.query=Lt.query;break;case"?":xt.host=Lt.host,xt.path=M(Lt.path),xt.query="",kt=kn;break;case"#":xt.host=Lt.host,xt.path=M(Lt.path),xt.query=Lt.query,xt.fragment="",kt=hr;break;default:xt.host=Lt.host,qa(wt(M(on,we),""))||(xt.path=M(Lt.path),xt.shortenPath()),kt=On;continue}else{kt=On;continue}break;case Ki:if(_t==="/"||_t==="\\"){kt=Zi;break}Lt&&Lt.scheme==="file"&&(xt.host=Lt.host,!qa(wt(M(on,we),""))&&Ve(Lt.path[0],!0)&&yt(xt.path,Lt.path[0])),kt=On;continue;case Zi:if(_t===me||_t==="/"||_t==="\\"||_t==="?"||_t==="#"){if(!Pt&&Ve(ce))kt=On;else if(ce===""){if(xt.host="",Pt)return;kt=sa}else{if(gr=xt.parseHost(ce),gr)return gr;if(xt.host==="localhost"&&(xt.host=""),Pt)return;ce="",kt=sa}continue}else ce+=_t;break;case sa:if(xt.isSpecial()){if(kt=On,_t!=="/"&&_t!=="\\")continue}else if(!Pt&&_t==="?")xt.query="",kt=kn;else if(!Pt&&_t==="#")xt.fragment="",kt=hr;else if(_t!==me&&(kt=On,_t!=="/"))continue;break;case On:if(_t===me||_t==="/"||_t==="\\"&&xt.isSpecial()||!Pt&&(_t==="?"||_t==="#")){if(dr(ce)?(xt.shortenPath(),_t!=="/"&&!(_t==="\\"&&xt.isSpecial())&&yt(xt.path,"")):kl(ce)?_t!=="/"&&!(_t==="\\"&&xt.isSpecial())&&yt(xt.path,""):(xt.scheme==="file"&&!xt.path.length&&Ve(ce)&&(xt.host!==null&&xt.host!==""&&(xt.host=""),ce=St(ce,0)+":"),yt(xt.path,ce)),ce="",xt.scheme==="file"&&(_t===me||_t==="?"||_t==="#"))for(;xt.path.length>1&&xt.path[0]==="";)Ot(xt.path);_t==="?"?(xt.query="",kt=kn):_t==="#"&&(xt.fragment="",kt=hr)}else ce+=Rn(_t,Ze);break;case ai:_t==="?"?(xt.query="",kt=kn):_t==="#"?(xt.fragment="",kt=hr):_t!==me&&(_t===" "?xt.path[0]+=on[we+1]==="?"||on[we+1]==="#"?"%20":" ":xt.path[0]+=Rn(_t,Ce));break;case kn:!Pt&&_t==="#"?(xt.fragment="",kt=hr):_t!==me&&(xt.query+=Rn(_t,xt.isSpecial()?se:Fe));break;case hr:_t!==me&&(xt.fragment+=Rn(_t,Ue));break}we++}},parseHost:function(ht){var Pt,Lt,xt;if(St(ht,0)==="["){if(St(ht,ht.length-1)!=="]"||(Pt=Nt(qt(ht,1,-1)),!Pt))return ue;this.host=Pt}else if(this.isSpecial()){if(ht=It(q(ht)),ht===null||Ct(Xt,ht))return ue;if(Dt(ht)){if(Pt=zt(ht),Pt===null)return ue;this.host=Pt}else this.host=ht}else{if(Ct(Qt,ht))return ue;for(Pt="",Lt=L(ht),xt=0;xt<Lt.length;xt++)Pt+=Rn(Lt[xt],Ce);this.host=Pt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return O(_a,this.scheme)},shortenPath:function(){var ht=this.path,Pt=ht.length;Pt&&(this.scheme!=="file"||Pt!==1||!Ve(ht[0],!0))&&ht.length--},serialize:function(){var ht=this,Pt=ht.scheme,Lt=ht.username,xt=ht.password,kt=ht.host,we=ht.port,ce=ht.path,Ge=ht.query,De=ht.fragment,He=Pt+":";return kt!==null?(He+="//",ht.includesCredentials()&&(He+=Lt+(xt?":"+xt:"")+"@"),He+=Te(kt),we!==null&&(He+=":"+we)):Pt==="file"&&(He+="//"),kt===null&&!ht.cannotBeABaseURL&&ce.length>1&&ce[0]===""&&(He+="/."),He+=ht.cannotBeABaseURL?ce[0]:ce.length?"/"+wt(ce,"/"):"",Ge!==null&&(He+="?"+Ge),De!==null&&(He+="#"+De),He},setHref:function(ht){var Pt=this.parse(ht);if(Pt)throw new ct(Pt);this.searchParams.update()},getOrigin:function(){var ht=this.scheme,Pt=this.port;if(ht==="blob")try{return new oa(this.path[0]).origin}catch(Lt){return"null"}return ht==="file"||!this.isSpecial()?"null":ht+"://"+Te(this.host)+(Pt!==null?":"+Pt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ht){this.parse(H(ht)+":",wr)},getUsername:function(){return this.username},setUsername:function(ht){var Pt=L(H(ht));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var Lt=0;Lt<Pt.length;Lt++)this.username+=Rn(Pt[Lt],Yi)}},getPassword:function(){return this.password},setPassword:function(ht){var Pt=L(H(ht));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var Lt=0;Lt<Pt.length;Lt++)this.password+=Rn(Pt[Lt],Yi)}},getHost:function(){var ht=this.host,Pt=this.port;return ht===null?"":Pt===null?Te(ht):Te(ht)+":"+Pt},setHost:function(ht){this.cannotBeABaseURL||this.parse(ht,ti)},getHostname:function(){var ht=this.host;return ht===null?"":Te(ht)},setHostname:function(ht){this.cannotBeABaseURL||this.parse(ht,ei)},getPort:function(){var ht=this.port;return ht===null?"":H(ht)},setPort:function(ht){this.cannotHaveUsernamePasswordPort()||(ht=H(ht),ht===""?this.port=null:this.parse(ht,ni))},getPathname:function(){var ht=this.path;return this.cannotBeABaseURL?ht[0]:ht.length?"/"+wt(ht,"/"):""},setPathname:function(ht){this.cannotBeABaseURL||(this.path=[],this.parse(ht,sa))},getSearch:function(){var ht=this.query;return ht?"?"+ht:""},setSearch:function(ht){ht=H(ht),ht===""?this.query=null:(St(ht,0)==="?"&&(ht=qt(ht,1)),this.query="",this.parse(ht,kn)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ht=this.fragment;return ht?"#"+ht:""},setHash:function(ht){if(ht=H(ht),ht===""){this.fragment=null;return}St(ht,0)==="#"&&(ht=qt(ht,1)),this.fragment="",this.parse(ht,hr)},update:function(){this.query=this.searchParams.serialize()||null}};var oa=function(Pt){var Lt=R(this,Tn),xt=U(arguments.length,1)>1?arguments[1]:void 0,kt=K(Lt,new ii(Pt,!1,xt));p||(Lt.href=kt.serialize(),Lt.origin=kt.getOrigin(),Lt.protocol=kt.getProtocol(),Lt.username=kt.getUsername(),Lt.password=kt.getPassword(),Lt.host=kt.getHost(),Lt.hostname=kt.getHostname(),Lt.port=kt.getPort(),Lt.pathname=kt.getPathname(),Lt.search=kt.getSearch(),Lt.searchParams=kt.getSearchParams(),Lt.hash=kt.getHash())},Tn=oa.prototype,jn=function(ht,Pt){return{get:function(){return Q(this)[ht]()},set:Pt&&function(Lt){return Q(this)[Pt](Lt)},configurable:!0,enumerable:!0}};if(p&&(I(Tn,"href",jn("serialize","setHref")),I(Tn,"origin",jn("getOrigin")),I(Tn,"protocol",jn("getProtocol","setProtocol")),I(Tn,"username",jn("getUsername","setUsername")),I(Tn,"password",jn("getPassword","setPassword")),I(Tn,"host",jn("getHost","setHost")),I(Tn,"hostname",jn("getHostname","setHostname")),I(Tn,"port",jn("getPort","setPort")),I(Tn,"pathname",jn("getPathname","setPathname")),I(Tn,"search",jn("getSearch","setSearch")),I(Tn,"searchParams",jn("getSearchParams")),I(Tn,"hash",jn("getHash","setHash"))),C(Tn,"toJSON",function(){return Q(this).serialize()},{enumerable:!0}),C(Tn,"toString",function(){return Q(this).serialize()},{enumerable:!0}),ft){var Pa=ft.createObjectURL,Js=ft.revokeObjectURL;Pa&&C(oa,"createObjectURL",T(Pa,ft)),Js&&C(oa,"revokeObjectURL",T(Js,ft))}X(oa,"URL"),g({global:!0,constructor:!0,forced:!m,sham:!p},{URL:oa})}),(function(S,P,i){"use strict";var g=i(7),p=i(33),m=i(6),y=i(36),T=p("iterator");S.exports=!g(function(){var A=new URL("b?a=1&b=2&c=3","https://a"),C=A.searchParams,I=new URLSearchParams("a=1&a=2&b=3"),R="";return A.pathname="c%20d",C.forEach(function(O,F){C.delete("b"),R+=F+O}),I.delete("a",2),I.delete("b",void 0),y&&(!A.toJSON||!I.has("a",1)||I.has("a",2)||!I.has("a",void 0)||I.has("b"))||!C.size&&(y||!m)||!C.sort||A.href!=="https://a/c%20d?a=1&c=3"||C.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!C[T]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||R!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(S,P,i){"use strict";var g=i(14),p=2147483647,m=36,y=1,T=26,A=38,C=700,I=72,R=128,O="-",F=/[^\0-\u007E]/,L=/[.\u3002\uFF0E\uFF61]/g,M="Overflow: input needs wider integers to process",$=m-y,D=RangeError,z=g(L.exec),H=Math.floor,X=String.fromCharCode,U=g("".charCodeAt),j=g([].join),W=g([].push),K=g("".replace),Q=g("".split),tt=g("".toLowerCase),J=function(ct){for(var ut=[],gt=0,pt=ct.length;gt<pt;){var mt=U(ct,gt++);if(mt>=55296&&mt<=56319&><pt){var St=U(ct,gt++);(St&64512)===56320?W(ut,((mt&1023)<<10)+(St&1023)+65536):(W(ut,mt),gt--)}else W(ut,mt)}return ut},q=function(ct){return ct+22+75*(ct<26)},rt=function(ct,ut,gt){var pt=0;for(ct=gt?H(ct/C):ct>>1,ct+=H(ct/ut);ct>$*T>>1;)ct=H(ct/$),pt+=m;return H(pt+($+1)*ct/(ct+A))},ft=function(ct){var ut=[];ct=J(ct);var gt=ct.length,pt=R,mt=0,St=I,Ct,wt;for(Ct=0;Ct<ct.length;Ct++)wt=ct[Ct],wt<128&&W(ut,X(wt));var jt=ut.length,Ut=jt;for(jt&&W(ut,O);Ut<gt;){var yt=p;for(Ct=0;Ct<ct.length;Ct++)wt=ct[Ct],wt>=pt&&wt<yt&&(yt=wt);var Tt=Ut+1;if(yt-pt>H((p-mt)/Tt))throw new D(M);for(mt+=(yt-pt)*Tt,pt=yt,Ct=0;Ct<ct.length;Ct++){if(wt=ct[Ct],wt<pt&&++mt>p)throw new D(M);if(wt===pt){for(var Ot=mt,Bt=m;;){var Kt=Bt<=St?y:Bt>=St+T?T:Bt-St;if(Ot<Kt)break;var qt=Ot-Kt,$t=m-Kt;W(ut,X(q(Kt+qt%$t))),Ot=H(qt/$t),Bt+=m}W(ut,X(q(Ot))),St=rt(mt,Tt,Ut===jt),mt=0,Ut++}}mt++,pt++}return j(ut,"")};S.exports=function(ct){var ut=[],gt=Q(K(tt(ct),L,"."),"."),pt,mt;for(pt=0;pt<gt.length;pt++)mt=gt[pt],W(ut,z(F,mt)?"xn--"+ft(mt):mt);return j(ut,".")}}),(function(S,P,i){"use strict";i(493);var g=i(23),p=i(14),m=String.fromCharCode,y=g("String","fromCodePoint"),T=encodeURIComponent,A=parseInt,C=p("".charAt),I=p([].push),R=p("".replace),O=p("".slice),F=p(/./.exec),L="\uFFFD",M=/^[0-9a-f]+$/i,$=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,D=function(W,K){var Q=O(W,K,K+2);return F(M,Q)?A(Q,16):NaN},z=function(W){for(var K=0,Q=128;Q>0&&(W&Q)!==0;Q>>=1)K++;return K},H=function(W){var K=null,Q=W.length;switch(Q){case 1:K=W[0];break;case 2:K=(W[0]&31)<<6|W[1]&63;break;case 3:K=(W[0]&15)<<12|(W[1]&63)<<6|W[2]&63;break;case 4:K=(W[0]&7)<<18|(W[1]&63)<<12|(W[2]&63)<<6|W[3]&63;break}return K===null||K>1114111||K>=55296&&K<=57343||K<(Q>3?65536:Q>2?2048:Q>1?128:0)?null:K},X=function(W){return W.length===2?W:L},U=function(W){for(var K=W.length,Q="",tt=0;tt<K;){var J=C(W,tt);if(J==="%"){if(C(W,tt+1)==="%"||tt+3>K){Q+="%",tt++;continue}var q=D(W,tt+1);if(q!==q){Q+=J,tt++;continue}tt+=2;var rt=z(q);if(rt===0)J=m(q);else{if(rt===1||rt>4){Q+=L,tt++;continue}for(var ft=[q],ct=1;ct<rt&&(tt++,!(tt+3>K||C(W,tt)!=="%"));){var ut=D(W,tt+1);if(ut!==ut||ut>191||ut<128||ct===1&&(q===224&&ut<160||q===237&&ut>159||q===240&&ut<144||q===244&&ut>143))break;I(ft,ut),tt+=2,ct++}if(ft.length!==rt){Q+=L;continue}var gt=H(ft);if(gt===null){for(var pt=0;pt<rt;pt++)Q+=L;tt++;continue}else J=y(gt)}}Q+=J,tt++}return Q},j=function(W){try{return T(W)}catch(K){return T(R(W,$,X))}};S.exports={decode:U,encode:j}}),(function(S,P,i){"use strict";i(176);var g=i(3),p=i(4),m=i(400),y=i(8),T=i(14),A=i(6),C=i(630),I=i(632),R=i(47),O=i(77),F=i(215),L=i(82),M=i(178),$=i(51),D=i(216),z=i(21),H=i(38),X=i(84),U=i(69),j=i(46),W=i(20),K=i(68),Q=i(71),tt=i(11),J=i(140),q=i(141),rt=i(180),ft=i(397),ct=i(33),ut=i(196),gt=ct("iterator"),pt="URLSearchParams",mt=pt+"Iterator",St=$.set,Ct=$.getterFor(pt),wt=$.getterFor(mt),jt=I.decode,Ut=I.encode,yt=m("fetch"),Tt=m("Request"),Ot=m("Headers"),Bt=Tt&&Tt.prototype,Kt=Ot&&Ot.prototype,qt=p.TypeError,$t=T("".charAt),Jt=T([].join),te=T([].push),de=T("".replace),ue=T([].shift),he=T([].splice),Ee=T("".split),$e=T("".slice),Ie=/\+/g,oe=function(vt){return jt(de(vt,Ie," "))},ye=/[!'()~]|%20/g,ke={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ft=function(vt){return ke[vt]},Xt=function(vt){return de(Ut(vt),ye,Ft)},Qt=M(function(Mt,It){St(this,{type:mt,target:Ct(Mt).entries,index:0,kind:It})},pt,function(){var Mt=wt(this),It=Mt.target,Dt=Mt.index++;if(!It||Dt>=It.length)return Mt.target=null,rt(void 0,!0);var zt=It[Dt];switch(Mt.kind){case"keys":return rt(zt.key,!1);case"values":return rt(zt.value,!1)}return rt([zt.key,zt.value],!1)},!0),Re=function(vt){this.entries=[],this.url=null,vt!==void 0&&(W(vt)?this.parseObject(vt):this.parseQuery(typeof vt=="string"?$t(vt,0)==="?"?$e(vt,1):vt:K(vt)))};Re.prototype={type:pt,bindURL:function(vt){this.url=vt,this.update()},parseObject:function(vt){var Mt=this.entries,It=q(vt),Dt,zt,Nt,le,Te,Ce,Fe;if(It)for(Dt=J(vt,It),zt=Dt.next;!(Nt=y(zt,Dt)).done;){if(le=J(j(Nt.value)),Te=le.next,(Ce=y(Te,le)).done||(Fe=y(Te,le)).done||!y(Te,le).done)throw new qt("Expected sequence with length 2");te(Mt,{key:K(Ce.value),value:K(Fe.value)})}else for(var se in vt)H(vt,se)&&te(Mt,{key:se,value:K(vt[se])})},parseQuery:function(vt){if(vt)for(var Mt=this.entries,It=Ee(vt,"&"),Dt=0,zt,Nt;Dt<It.length;)zt=It[Dt++],zt.length&&(Nt=Ee(zt,"="),te(Mt,{key:oe(ue(Nt)),value:oe(Jt(Nt,"="))}))},serialize:function(){for(var vt=this.entries,Mt=[],It=0,Dt;It<vt.length;)Dt=vt[It++],te(Mt,Xt(Dt.key)+"="+Xt(Dt.value));return Jt(Mt,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Wt=function(){D(this,Ht);var Mt=arguments.length>0?arguments[0]:void 0,It=St(this,new Re(Mt));A||(this.size=It.entries.length)},Ht=Wt.prototype;if(F(Ht,{append:function(Mt,It){var Dt=Ct(this);ft(arguments.length,2),te(Dt.entries,{key:K(Mt),value:K(It)}),A||this.size++,Dt.updateURL()},delete:function(vt){for(var Mt=Ct(this),It=ft(arguments.length,1),Dt=Mt.entries,zt=K(vt),Nt=It<2?void 0:arguments[1],le=Nt===void 0?Nt:K(Nt),Te=0;Te<Dt.length;){var Ce=Dt[Te];Ce.key===zt&&(le===void 0||Ce.value===le)?he(Dt,Te,1):Te++}A||(this.size=Dt.length),Mt.updateURL()},get:function(Mt){var It=Ct(this).entries;ft(arguments.length,1);for(var Dt=K(Mt),zt=0;zt<It.length;zt++)if(It[zt].key===Dt)return It[zt].value;return null},getAll:function(Mt){var It=Ct(this).entries;ft(arguments.length,1);for(var Dt=K(Mt),zt=[],Nt=0;Nt<It.length;Nt++)It[Nt].key===Dt&&te(zt,It[Nt].value);return zt},has:function(Mt){for(var It=Ct(this).entries,Dt=ft(arguments.length,1),zt=K(Mt),Nt=Dt<2?void 0:arguments[1],le=Nt===void 0?Nt:K(Nt),Te=0;Te<It.length;){var Ce=It[Te++];if(Ce.key===zt&&(le===void 0||Ce.value===le))return!0}return!1},set:function(Mt,It){var Dt=Ct(this);ft(arguments.length,2);for(var zt=Dt.entries,Nt=!1,le=K(Mt),Te=K(It),Ce=0,Fe;Ce<zt.length;Ce++)Fe=zt[Ce],Fe.key===le&&(Nt?he(zt,Ce--,1):(Nt=!0,Fe.value=Te));Nt||te(zt,{key:le,value:Te}),A||(this.size=zt.length),Dt.updateURL()},sort:function(){var Mt=Ct(this);ut(Mt.entries,function(It,Dt){return It.key>Dt.key?1:-1}),Mt.updateURL()},forEach:function(Mt){for(var It=Ct(this).entries,Dt=X(Mt,arguments.length>1?arguments[1]:void 0),zt=0,Nt;zt<It.length;)Nt=It[zt++],Dt(Nt.value,Nt.key,this)},keys:function(){return new Qt(this,"keys")},values:function(){return new Qt(this,"values")},entries:function(){return new Qt(this,"entries")}},{enumerable:!0}),R(Ht,gt,Ht.entries,{name:"entries"}),R(Ht,"toString",function(){return Ct(this).serialize()},{enumerable:!0}),A&&O(Ht,"size",{get:function(){return Ct(this).entries.length},configurable:!0,enumerable:!0}),L(Wt,pt),g({global:!0,constructor:!0,forced:!C},{URLSearchParams:Wt}),!C&&z(Ot)){var ie=T(Kt.has),fe=T(Kt.set),me=function(vt){if(W(vt)){var Mt=vt.body,It;if(U(Mt)===pt)return It=vt.headers?new Ot(vt.headers):new Ot,ie(It,"content-type")||fe(It,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Q(vt,{body:tt(0,K(Mt)),headers:tt(0,It)})}return vt};if(z(yt)&&g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Mt){return yt(Mt,arguments.length>1?me(arguments[1]):{})}}),z(Tt)){var Qe=function(Mt){return D(this,Bt),new Tt(Mt,arguments.length>1?me(arguments[1]):{})};Bt.constructor=Qe,Qe.prototype=Bt,g({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Qe})}}S.exports={URLSearchParams:Wt,getState:Ct}}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(7),y=i(397),T=i(68),A=i(630),C=p("URL"),I=A&&m(function(){C.canParse()}),R=m(function(){return C.canParse.length!==1});g({target:"URL",stat:!0,forced:!I||R},{canParse:function(F){var L=y(arguments.length,1),M=T(F),$=L<2||arguments[1]===void 0?void 0:T(arguments[1]);try{return!!new C(M,$)}catch(D){return!1}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(23),m=i(397),y=i(68),T=i(630),A=p("URL");g({target:"URL",stat:!0,forced:!T},{parse:function(I){var R=m(arguments.length,1),O=y(I),F=R<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return new A(O,F)}catch(L){return null}}})}),(function(S,P,i){"use strict";var g=i(3),p=i(8),m=i(206),y=m("URL","toString");g({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return p(y,this)}})}),(function(S,P,i){"use strict";i(633)}),(function(S,P,i){"use strict";var g=i(47),p=i(14),m=i(68),y=i(397),T=URLSearchParams,A=T.prototype,C=p(A.append),I=p(A.delete),R=p(A.forEach),O=p([].push),F=new T("a=1&a=2&b=3");F.delete("a",1),F.delete("b",void 0),F+""!="a=2"&&g(A,"delete",function(L){var M=arguments.length,$=M<2?void 0:arguments[1];if(M&&$===void 0)return I(this,L);var D=[];R(this,function(W,K){O(D,{key:K,value:W})}),y(M,1);for(var z=m(L),H=m($),X=0,U=D.length,j;X<U;)j=D[X],I(this,j.key),X++;for(X=0;X<U;)j=D[X++],j.key===z&&j.value===H||C(this,j.key,j.value)},{enumerable:!0,unsafe:!0})}),(function(S,P,i){"use strict";var g=i(47),p=i(14),m=i(68),y=i(397),T=URLSearchParams,A=T.prototype,C=p(A.getAll),I=p(A.has),R=new T("a=1");(R.has("a",2)||!R.has("a",void 0))&&g(A,"has",function(F){var L=arguments.length,M=L<2?void 0:arguments[1];if(L&&M===void 0)return I(this,F);var $=C(this,F);y(L,1);for(var D=m(M),z=0;z<$.length;)if($[z++]===D)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(S,P,i){"use strict";var g=i(6),p=i(14),m=i(77),y=URLSearchParams.prototype,T=p(y.forEach);g&&!("size"in y)&&m(y,"size",{get:function(){var C=0;return T(this,function(){C++}),C},configurable:!0,enumerable:!0})}),(function(S,P,i){"use strict";i.r(P),i.d(P,{bb:function(){return Zx},default:function(){return Zx}});var g={};i.r(g),i.d(g,{selection:function(){return Bm},subchart:function(){return Wm},zoom:function(){return Ym}});var p={};i.r(p),i.d(p,{area:function(){return gy},areaLineRange:function(){return vy},areaSpline:function(){return my},areaSplineRange:function(){return yy},areaStep:function(){return xy},areaStepRange:function(){return py},bar:function(){return by},boxplot:function(){return Ay},bubble:function(){return Ey},bullet:function(){return Dy},candlestick:function(){return ky},donut:function(){return jy},funnel:function(){return Qy},gauge:function(){return _y},heatmap:function(){return sx},line:function(){return ox},pie:function(){return ux},polar:function(){return dx},radar:function(){return gx},sankey:function(){return Cx},scatter:function(){return wx},spline:function(){return lx},step:function(){return cx},treemap:function(){return Kx}});function m(t,e){return t.config.axis_rotated?[e[1],e[0]]:[e[0],e[1]]}function y(t,e,n=1){const r=e.map(h=>m(t,h)),a=r.map(([h])=>h),s=r.map(([,h])=>h),o=Math.min(...a),l=Math.min(...s),c=Math.max(...a)-o,u=Math.max(...s)-l,f=Math.max(n,c),d=Math.max(n,u);return{x:o-(f-c)/2,y:l-(d-u)/2,w:f,h:d}}function T(t,e){var n,r;const a=(n=t.isGrouped)!=null&&n.call(t,e.id)&&t.circleY?t.circleY(e,e.index):t.getYScaleById(e.id)(t.getBaseValue(e)),s=(r=t.xx(e))!=null?r:NaN;return t.config.axis_rotated?{x:a,y:s}:{x:s,y:a}}function A(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function C(t,e){return{body:y(t,[e[0],e[1]]),wickStart:m(t,[e[2][0],e[2][1]]),wickEnd:m(t,[e[2][0],e[2][2]])}}function I(t,e,n,r=!1){if(e===n)return{x:0,y:0,w:t.state.width,h:0};const{scale:{x:a,y:s}}=t,o=a(e.x0),l=s(e.y0),c=a(e.x1)-o,u=s(e.y1)-l;return{x:o,y:l,w:r?Math.max(0,c):c,h:r?Math.max(0,u):u}}function R(t,e,n,r){const{config:a}=t,{id:s,value:o,ratio:l=0}=e,c=a.treemap_label_format,u=typeof c=="function"?c.bind(t.api)(o,l,s,{width:n,height:r}):`${s}
|
|
31
|
+
${(l*100).toFixed(2)}%`;return u==null?null:String(u)}function O(t){const{config:e,state:n}=t;return!!(e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&e.subchart_show&&e.subchart_brush_enabled===!1&&n.width2>0&&n.height2>0)}function F(t,e){var n;const{config:r,scale:a,state:s}=t,o=a.zoom||a.x,l=a.subX;if(!o||!l)return null;const c=r.axis_rotated?s.height2:s.width2,u=r.axis_rotated?s.height:s.width,f=(n=l.invert)==null?void 0:n.call(l,e);let d=f==null?NaN:o(f);return!Number.isFinite(d)&&c>0&&(d=Math.max(0,Math.min(1,e/c))*u),Number.isFinite(d)?Math.max(0,Math.min(u,d)):null}const L=t=>t||t===0,M=t=>typeof t=="function",$=t=>typeof t=="string",D=t=>typeof t=="number",z=t=>typeof t=="undefined",H=t=>typeof t!="undefined",X=t=>typeof t=="boolean",U=t=>Math.ceil(t/10)*10,j=t=>Math.ceil(t)+.5,W=t=>t[1]-t[0],K=t=>typeof t=="object",Q=t=>{for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},tt=t=>z(t)||t===null||$(t)&&t.length===0||K(t)&&!(t instanceof Date)&&Q(t)||D(t)&&isNaN(t),J=t=>!tt(t),q=t=>Array.isArray(t),rt=t=>t&&!(t!=null&&t.nodeType)&&K(t)&&!q(t),ft=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ct=/([aAcChHlLmMqQsStTvVzZ])|([-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?)/g;function ut(t){const e=new Set;let n=-1,r=0,a=!1,s;for(ct.lastIndex=0;s=ct.exec(t);)if(s[1])a=s[1]==="a"||s[1]==="A",r=0;else if(n++,a){const o=r%7;(o===2||o===3||o===4)&&e.add(n),r++}return e}function gt(t,e){const n=ut(e),r=[],a=[];let s=0,o=-1,l=-1,c,u;const f=v=>{r[o]?r[o]+=v:r[++o]=v};ft.lastIndex=0;const d=ft,h=new RegExp(ft.source,"g");for(t+="",e+="";(c=d.exec(t))&&(u=h.exec(e));){if(l++,u.index>s&&f(e.slice(s,u.index)),c[0]===u[0])f(u[0]);else{const v=+c[0],b=+u[0],x=n.has(l);r[++o]=null,a.push({index:o,fn:x?E=>Math.round(v+(b-v)*E):E=>v+(b-v)*E})}s=h.lastIndex}if(s<e.length&&f(e.slice(s)),!a.length){const v=r.join("");return()=>v}return v=>{for(let b=0,x=a.length;b<x;b++){const{index:E,fn:w}=a[b];r[E]=String(w(v))}return r.join("")}}function pt(t){const{bar_radius:e,bar_radius_ratio:n}=t.config;return D(e)&&e>0?()=>e:D(n)?r=>r*n:null}function mt(t){const{config:e,data:n}=t,r=new Set;if(!e.data_groups.length)return r;const a=t.orderTargets(t.filterTargetsToShow(n.targets.filter(t.isBarType,t)));for(const s of e.data_groups){const o=new Set(s),l=new Map,c=new Map;for(const u of a)if(o.has(u.id))for(const f of u.values)f.value===null||f.value===0||(f.value>0?l:c).set(f.index,u.id);for(const[u,f]of l)r.add(`${f}:${u}`);for(const[u,f]of c)r.add(`${f}:${u}`)}return r}function St(t,e,n){return n?t?e?{tl:n,bl:n}:{tr:n,br:n}:e?{br:n,bl:n}:{tl:n,tr:n}:0}function Ct(t,e,n,r){let a="";return n?r&&t[0]<e?a=`0 ${e-t[0]}px 0 0`:!r&&t[0]>e&&(a=`0 0 0 ${t[0]-e}px`):r&&t[1]>e?a=`${t[1]-e}px 0 0 0`:!r&&t[1]<e&&(a=`0 0 ${e-t[1]}px 0`),a?`inset(${a})`:null}function wt(t,e,n,r,a,s){const{config:o,state:l}=t,c=o.axis_rotated,u=+c,f=+!u,d=e.value<0,h=o[`axis_${t.axis.getId(e.id)}_inverted`],v=!h&&d||h&&!d,b=t.isGrouped(e.id),x=r&&b&&e.value!==0?l.hiddenTargetIds.has(e.id)&&s?s(e):a.has(`${e.id}:${e.index}`):!1,E=[n[0][u],n[0][f]];let w=0;if(r){const k=c?f:u,B=Math.abs(n[2][k]-n[0][k]);w=Math.max(0,!b||x?r(B):0)}const N=c?n[1][u]+(v?w:-w):n[1][f]+(v?-w:w);return{radius:w,corners:St(c,v,w),clipPath:w?Ct(E,N,c,v):null,indexX:u,indexY:f,isNegative:v,pos:N}}function jt(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function Ut(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",r=s=>setTimeout(s,1),a=s=>clearTimeout(s);return[e?t.requestAnimationFrame:r,e?t.cancelAnimationFrame:a,n?t.requestIdleCallback:r,n?t.cancelIdleCallback:a]}const yt=jt(),Tt=yt==null?void 0:yt.document,[Ot,Bt,Kt,qt]=Ut(yt),$t=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Jt=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),te=new Map;$t.forEach(t=>te.set(t.toLowerCase(),t));const de=new Map;Jt.forEach(t=>de.set(t.toLowerCase(),t));const ue=new Set(["http:","https:","mailto:"]),he=new Set(["href","src","xlink:href"]),Ee=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,$e=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,Ie=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,oe=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,ye=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,ke=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function Ft(t){return t.replace(/:/gi,":").replace(/&newline;/gi,`
|
|
32
|
+
`).replace(/&tab;/gi," ").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&#(\d+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Xt(t){const n=Ft(t).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?ue.has(r[0]):!0}function Qt(t){const n=Ft(t).replace(/[\u0000-\u001f]/g,"");ye.lastIndex=0;let r;for(;(r=ye.exec(n))!==null;)if(!Xt(r[1]))return null;const a=n.toLowerCase().replace(/\s/g,"");for(const s of ke)if(a.includes(s))return null;return t}const Re={'"':""","'":"'","`":"`"},Wt=/["'`]/g;function Ht(t){return t.replace(Wt,e=>Re[e])}function ie(t,e,n=!1){if(he.has(t))return Xt(e)?n?Ht(e):e:null;if(t==="style"){const a=Qt(e);return a===null?null:n?Ht(a):a}const r=Ft(e).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?Ht(e):e}function fe(t){const e=t.match(Ee);return e?e[1].toLowerCase():null}function me(t){const e=fe(t);return e!==null&&te.has(e)}function Qe(t){var e,n,r;const a=t.match($e);if(a){const x=a[1].toLowerCase();return`</${(e=te.get(x))!=null?e:x}>`}const s=t.match(Ie);if(!s)return"";const[,o,l,c]=s,u=o.toLowerCase(),f=(n=te.get(u))!=null?n:u,d=[];oe.lastIndex=0;let h;for(;(h=oe.exec(l))!==null;){const x=h[1].toLowerCase(),E=h[2],w=h[3],N=h[4];if(x.startsWith("on"))continue;const k=(r=de.get(x))!=null?r:x;let B,G;if(E!==void 0)B=E,G='"';else if(w!==void 0)B=w,G="'";else if(N!==void 0)B=N,G='"';else{de.has(x)&&d.push(k);continue}if(de.has(x)){const Z=ie(x,B,N!==void 0);Z!==null&&d.push(`${k}=${G}${Z}${G}`)}}const v=d.length>0?` ${d.join(" ")}`:"";return`<${f}${v}${c?"/>":">"}`}function vt(t){return typeof t!="string"||!t||t.indexOf("<")===-1?t:t.replace(/<\/?[^>]*>|<[^>]*$|[^<>\s]+>/g,e=>e.startsWith("<")&&!e.endsWith(">")?e.replace(/</g,"<"):e.startsWith("<!--")?"":e.startsWith("<")?me(e)?Qe(e):e.replace(/</g,"<"):e.slice(0,-1)+">")}var Mt=Object.defineProperty,It=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,Nt=(t,e,n)=>e in t?Mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,le=(t,e)=>{for(var n in e||(e={}))Dt.call(e,n)&&Nt(t,n,e[n]);if(It)for(var n of It(e))zt.call(e,n)&&Nt(t,n,e[n]);return t};function Te(t,e){for(let n=0;n<t.length;n++){const r=t[n];r!==null&&H(r)&&e(r,n)}}function Ce(t,e,n){return H(t[e])?t[e]:n}function Fe(t,e){for(const n in t)if(t[n]===e)return!0;return!1}function se(t,e,...n){const r=M(t);return r&&t.call(e,...n),r}function Ue(t,e){let n=0;const r=function(...a){!--n&&e.apply(this,a)};"duration"in t?t.each(()=>++n).on("end",r):(++n,t.call(r))}const Ze=t=>t.charAt(0).toUpperCase()+t.slice(1);function Yi(t,e="-"){return t.split(e).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Rn=t=>[].slice.call(t);function _a(...t){const e=n=>{if(q(n))return n.map(e);if(rt(n)&&n.constructor){const r=new n.constructor;for(const a in n)r[a]=e(n[a]);return r}return n};return t.map(n=>e(n)).reduce((n,r)=>le(le({},n),r))}function Ve(t={},e){q(e)&&e.forEach(n=>Ve(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}function qa(t){const e=t[0]instanceof Date,n=Array.from(new Set(e?t.map(Number):t));return e?n.map(r=>new Date(r)):n}function kl(t){if(!(t!=null&&t.length))return[];if(t.length===1)return t[0];const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(Array.isArray(r))for(let a=0;a<r.length;a++)e.push(r[a]);else e.push(r)}return e}function dr(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return rt(t)&&rt(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const a=n[r];a instanceof Date?t[r]=new Date(a.getTime()):rt(a)?(!t[r]&&(t[r]={}),t[r]=dr(t[r],a)):t[r]=q(a)?a.concat():a}}),dr(t,...e)}function wr(t,e=!0){let n;return t[0]instanceof Date?n=e?(r,a)=>r-a:(r,a)=>a-r:e&&!t.every(isNaN)?n=(r,a)=>r-a:e||(n=(r,a)=>r>a&&-1||r<a&&1||r===a&&0),t.concat().sort(n)}function Xn(t,e){let n=e.filter(r=>J(r));if(n.length)if(D(n[0])){let r=t==="min"?1/0:-1/0;for(const a of n)(t==="min"?a<r:a>r)&&(r=a);n=r}else n[0]instanceof Date&&(n=wr(n,t==="min")[0]);else n=void 0;return n}const ia=(t,e,n=1)=>{const r=[],a=Math.max(0,Math.ceil((e-t)/n))|0;for(let s=0;s<a;s++)r.push(t+s*n);return r};let Zs=0;function Vn(t=!0){const e=++Zs;return t?String(e):e}function Ia(t,e,n,r,a){if(n>r)return-1;const s=Math.floor((n+r)/2);let{x:o,w:l=0}=t[s];return a&&(o=t[s].y,l=t[s].h),e>=o&&e<=o+l?s:e<o?Ia(t,e,n,s-1,a):Ia(t,e,s+1,r,a)}function Ir(t,e){return vt(t.replace(/\{=([^}]+)\}/g,(n,r)=>{var a;return(a=e[r])!=null?a:""}))}function bn(t){var e;let n;if(t instanceof Date)n=t;else if($(t)){const{config:r,format:a}=this;n=(e=a.dataTime(r.data_xFormat)(t))!=null?e:new Date(t)}else D(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function Ra(t){if(rt(t)&&!$(t)){const o=t;return{top:o.top||0,right:o.right||0,bottom:o.bottom||0,left:o.left||0}}const e=($(t)?t.trim().split(/\s+/):[t]).map(o=>+o||0),[n,r=n,a=n,s=r]=e;return{top:n,right:r,bottom:a,left:s}}function Oa(t,e){e()===!1?Ot(()=>Oa(t,e)):t()}function ti(t,e=(n=>n)){const n=new Set;return Te(t,(r,a)=>{n.add(e(r,a))}),n}function ei(t,e,n=(r=>r)){const r=new Map;return Te(t,(a,s)=>{r.set(e(a,s),n(a,s))}),r}const ni="2 2";function ri(t,e,n){const r=t.axis.isTimeSeries(),a=(s,o)=>z(s)?o:r?bn.call(t,s):s;return(n||[]).map(s=>{var o,l;return{start:a(s.start,(o=e[0])==null?void 0:o.x),end:a(s.end,(l=e[e.length-1])==null?void 0:l.x),style:s.style||{dasharray:ni}}})}function Ki(t,e){for(let n=0,r;r=e[n];n++)if(r.start<t&&t<=r.end)return r.style;return!1}function Zi(t){const e=String((t==null?void 0:t.dasharray)||ni).split(/[\s,]+/).map(Number).filter(Number.isFinite);return e.length?e:[2,2]}function sa(t,e,n,r,a){const s=t.config.axis_rotated,o=ri(t,e,a),l=[];for(let c=1;c<e.length;c++){const u=e[c-1],f=e[c];if(!L(u.value)||!L(f.value)){l.push({isBreak:!0});continue}const d=Ki(f.x,o),h=n(u.x),v=r(u.value),b=n(f.x),x=r(f.value);l.push({start:s?[v,h]:[h,v],end:s?[x,b]:[b,x],dash:d?Zi(d):[]})}return l}const On=Math.PI,ai=2*On,kn=1e-6,hr=ai-kn;function ii(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function oa(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ii;const n=Jf(10,e);return function(r){this._+=r[0];for(let a=1,s=r.length;a<s;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}function Tn(t,e,n,r){return t===n&&e===r}function jn(t){const e=Math.floor(t);if(!(e<=15))return Tn;const n=Jf(10,e),r=function(a){return Math.round(a*n)};return function(a,s,o,l){return r(a)===r(o)&&r(s)===r(l)}}class Pa{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?ii:oa(e),this._equal=e==null?Tn:jn(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,a){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(e,n,r,a,s,o){this._append`C${+e},${+n},${+r},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(e,n,r,a,s){if(e=+e,n=+n,r=+r,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,c=r-e,u=a-n,f=o-e,d=l-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>kn)if(!(Math.abs(d*c-u*f)>kn)||!s)this._append`L${this._x1=e},${this._y1=n}`;else{let v=r-o,b=a-l,x=c*c+u*u,E=v*v+b*b,w=Math.sqrt(x),N=Math.sqrt(h),k=s*Math.tan((On-Math.acos((x+h-E)/(2*w*N)))/2),B=k/N,G=k/w;Math.abs(B-1)>kn&&this._append`L${e+B*f},${n+B*d}`,this._append`A${s},${s},0,0,${+(d*v>f*b)},${this._x1=e+G*c},${this._y1=n+G*u}`}}arc(e,n,r,a,s,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(a),c=r*Math.sin(a),u=e+l,f=n+c,d=1^o,h=o?a-s:s-a;if(this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>kn||Math.abs(this._y1-f)>kn)&&this._append`L${u},${f}`,!!r){if(h<0&&(h=h%ai+ai),h>hr)this._append`A${r},${r},0,1,${d},${e-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`;else if(h>kn){const v=e+r*Math.cos(s),b=n+r*Math.sin(s);if(h>=On&&this._equal(u,f,v,b)){h/=2;let x=a+h;this._append`A${r},${r},0,${+(h>=On)},${d},${e+r*Math.cos(x)},${n+r*Math.sin(x)}`}this._append`A${r},${r},0,${+(h>=On)},${d},${this._x1=v},${this._y1=b}`}}}rect(e,n,r,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function Js(){return new Pa}Js.prototype=Pa.prototype;function ht(t=3){return new Pa(+t)}function Pt(t){return function(){return t}}const Lt=Math.abs,xt=Math.atan2,kt=Math.cos,we=Math.max,ce=Math.min,Ge=Math.sin,De=Math.sqrt,He=1e-12,on=Math.PI,_t=on/2,qe=2*on;function gr(t){return t>1?0:t<-1?on:Math.acos(t)}function si(t){return t>=1?_t:t<=-1?-_t:Math.asin(t)}function la(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Pa(e)}function Qs(t){return t.innerRadius}function Ji(t){return t.outerRadius}function Qx(t){return t.startAngle}function _x(t){return t.endAngle}function qx(t){return t&&t.padAngle}function t0(t,e,n,r,a,s,o,l){var c=n-t,u=r-e,f=o-a,d=l-s,h=d*c-f*u;if(!(h*h<He))return h=(f*(e-s)-d*(t-a))/h,[t+h*c,e+h*u]}function _s(t,e,n,r,a,s,o){var l=t-n,c=e-r,u=(o?s:-s)/De(l*l+c*c),f=u*c,d=-u*l,h=t+f,v=e+d,b=n+f,x=r+d,E=(h+b)/2,w=(v+x)/2,N=b-h,k=x-v,B=N*N+k*k,G=a-s,V=h*x-b*v,Z=(k<0?-1:1)*De(we(0,G*G*B-V*V)),Y=(V*k-N*Z)/B,et=(-V*N-k*Z)/B,it=(V*k+N*Z)/B,at=(-V*N+k*Z)/B,ot=Y-E,st=et-w,_=it-E,lt=at-w;return ot*ot+st*st>_*_+lt*lt&&(Y=it,et=at),{cx:Y,cy:et,x01:-f,y01:-d,x11:Y*(a/G-1),y11:et*(a/G-1)}}function _f(){var t=Qs,e=Ji,n=Pt(0),r=null,a=Qx,s=_x,o=qx,l=null,c=la(u);function u(){var f,d,h=+t.apply(this,arguments),v=+e.apply(this,arguments),b=a.apply(this,arguments)-_t,x=s.apply(this,arguments)-_t,E=Lt(x-b),w=x>b;if(l||(l=f=c()),v<h&&(d=v,v=h,h=d),!(v>He))l.moveTo(0,0);else if(E>qe-He)l.moveTo(v*kt(b),v*Ge(b)),l.arc(0,0,v,b,x,!w),h>He&&(l.moveTo(h*kt(x),h*Ge(x)),l.arc(0,0,h,x,b,w));else{var N=b,k=x,B=b,G=x,V=E,Z=E,Y=o.apply(this,arguments)/2,et=Y>He&&(r?+r.apply(this,arguments):De(h*h+v*v)),it=ce(Lt(v-h)/2,+n.apply(this,arguments)),at=it,ot=it,st,_;if(et>He){var lt=si(et/h*Ge(Y)),nt=si(et/v*Ge(Y));(V-=lt*2)>He?(lt*=w?1:-1,B+=lt,G-=lt):(V=0,B=G=(b+x)/2),(Z-=nt*2)>He?(nt*=w?1:-1,N+=nt,k-=nt):(Z=0,N=k=(b+x)/2)}var dt=v*kt(N),bt=v*Ge(N),At=h*kt(G),Et=h*Ge(G);if(it>He){var Rt=v*kt(k),Vt=v*Ge(k),ae=h*kt(B),re=h*Ge(B),ve;if(E<on)if(ve=t0(dt,bt,ae,re,Rt,Vt,At,Et)){var xe=dt-ve[0],ge=bt-ve[1],Le=Rt-ve[0],Yt=Vt-ve[1],pe=1/Ge(gr((xe*Le+ge*Yt)/(De(xe*xe+ge*ge)*De(Le*Le+Yt*Yt)))/2),be=De(ve[0]*ve[0]+ve[1]*ve[1]);at=ce(it,(h-be)/(pe-1)),ot=ce(it,(v-be)/(pe+1))}else at=ot=0}Z>He?ot>He?(st=_s(ae,re,dt,bt,v,ot,w),_=_s(Rt,Vt,At,Et,v,ot,w),l.moveTo(st.cx+st.x01,st.cy+st.y01),ot<it?l.arc(st.cx,st.cy,ot,xt(st.y01,st.x01),xt(_.y01,_.x01),!w):(l.arc(st.cx,st.cy,ot,xt(st.y01,st.x01),xt(st.y11,st.x11),!w),l.arc(0,0,v,xt(st.cy+st.y11,st.cx+st.x11),xt(_.cy+_.y11,_.cx+_.x11),!w),l.arc(_.cx,_.cy,ot,xt(_.y11,_.x11),xt(_.y01,_.x01),!w))):(l.moveTo(dt,bt),l.arc(0,0,v,N,k,!w)):l.moveTo(dt,bt),!(h>He)||!(V>He)?l.lineTo(At,Et):at>He?(st=_s(At,Et,Rt,Vt,h,-at,w),_=_s(dt,bt,ae,re,h,-at,w),l.lineTo(st.cx+st.x01,st.cy+st.y01),at<it?l.arc(st.cx,st.cy,at,xt(st.y01,st.x01),xt(_.y01,_.x01),!w):(l.arc(st.cx,st.cy,at,xt(st.y01,st.x01),xt(st.y11,st.x11),!w),l.arc(0,0,h,xt(st.cy+st.y11,st.cx+st.x11),xt(_.cy+_.y11,_.cx+_.x11),w),l.arc(_.cx,_.cy,at,xt(_.y11,_.x11),xt(_.y01,_.x01),!w))):l.arc(0,0,h,G,B,w)}if(l.closePath(),f)return l=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-on/2;return[kt(d)*f,Ge(d)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Pt(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Pt(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:Pt(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Pt(+f),u):r},u.startAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Pt(+f),u):a},u.endAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Pt(+f),u):s},u.padAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Pt(+f),u):o},u.context=function(f){return arguments.length?(l=f==null?null:f,u):l},u}var e0=Array.prototype.slice;function qs(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function qf(t){this._context=t}qf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Qi(t){return new qf(t)}function zl(t){return t[0]}function Ul(t){return t[1]}function to(t,e){var n=Pt(!0),r=null,a=Qi,s=null,o=la(l);t=typeof t=="function"?t:t===void 0?zl:Pt(t),e=typeof e=="function"?e:e===void 0?Ul:Pt(e);function l(c){var u,f=(c=qs(c)).length,d,h=!1,v;for(r==null&&(s=a(v=o())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(d,u,c),+e(d,u,c));if(v)return s=null,v+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:Pt(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:Pt(+c),l):e},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Pt(!!c),l):n},l.curve=function(c){return arguments.length?(a=c,r!=null&&(s=a(r)),l):a},l.context=function(c){return arguments.length?(c==null?r=s=null:s=a(r=c),l):r},l}function td(t,e,n){var r=null,a=Pt(!0),s=null,o=Qi,l=null,c=la(u);t=typeof t=="function"?t:t===void 0?zl:Pt(+t),e=typeof e=="function"?e:Pt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Ul:Pt(+n);function u(d){var h,v,b,x=(d=qs(d)).length,E,w=!1,N,k=new Array(x),B=new Array(x);for(s==null&&(l=o(N=c())),h=0;h<=x;++h){if(!(h<x&&a(E=d[h],h,d))===w)if(w=!w)v=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=h-1;b>=v;--b)l.point(k[b],B[b]);l.lineEnd(),l.areaEnd()}w&&(k[h]=+t(E,h,d),B[h]=+e(E,h,d),l.point(r?+r(E,h,d):k[h],n?+n(E,h,d):B[h]))}if(N)return l=null,N+""||null}function f(){return to().defined(a).curve(o).context(s)}return u.x=function(d){return arguments.length?(t=typeof d=="function"?d:Pt(+d),r=null,u):t},u.x0=function(d){return arguments.length?(t=typeof d=="function"?d:Pt(+d),u):t},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Pt(+d),u):r},u.y=function(d){return arguments.length?(e=typeof d=="function"?d:Pt(+d),n=null,u):e},u.y0=function(d){return arguments.length?(e=typeof d=="function"?d:Pt(+d),u):e},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Pt(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Pt(!!d),u):a},u.curve=function(d){return arguments.length?(o=d,s!=null&&(l=o(s)),u):o},u.context=function(d){return arguments.length?(d==null?s=l=null:l=o(s=d),u):s},u}function n0(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function r0(t){return t}function a0(){var t=r0,e=n0,n=null,r=Pt(0),a=Pt(qe),s=Pt(0);function o(l){var c,u=(l=qs(l)).length,f,d,h=0,v=new Array(u),b=new Array(u),x=+r.apply(this,arguments),E=Math.min(qe,Math.max(-qe,a.apply(this,arguments)-x)),w,N=Math.min(Math.abs(E)/u,s.apply(this,arguments)),k=N*(E<0?-1:1),B;for(c=0;c<u;++c)(B=b[v[c]=c]=+t(l[c],c,l))>0&&(h+=B);for(e!=null?v.sort(function(G,V){return e(b[G],b[V])}):n!=null&&v.sort(function(G,V){return n(l[G],l[V])}),c=0,d=h?(E-u*k)/h:0;c<u;++c,x=w)f=v[c],B=b[f],w=x+(B>0?B*d:0)+k,b[f]={data:l[f],index:c,value:B,startAngle:x,endAngle:w,padAngle:N};return b}return o.value=function(l){return arguments.length?(t=typeof l=="function"?l:Pt(+l),o):t},o.sortValues=function(l){return arguments.length?(e=l,n=null,o):e},o.sort=function(l){return arguments.length?(n=l,e=null,o):n},o.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:Pt(+l),o):r},o.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Pt(+l),o):a},o.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Pt(+l),o):s},o}var ed=Wl(Qi);function nd(t){this._curve=t}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))}};function Wl(t){function e(n){return new nd(t(n))}return e._curve=t,e}function _i(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(Wl(n)):e()._curve},t}function m3(){return _i(to().curve(ed))}function y3(){var t=td().curve(ed),e=t.curve,n=t.lineX0,r=t.lineX1,a=t.lineY0,s=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return _i(n())},delete t.lineX0,t.lineEndAngle=function(){return _i(r())},delete t.lineX1,t.lineInnerRadius=function(){return _i(a())},delete t.lineY0,t.lineOuterRadius=function(){return _i(s())},delete t.lineY1,t.curve=function(o){return arguments.length?e(Wl(o)):e()._curve},t}function eo(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class rd{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class i0{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=eo(this._x0,this._y0),a=eo(this._x0,this._y0=(this._y0+n)/2),s=eo(e,this._y0),o=eo(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...a,...s,...o)}this._x0=e,this._y0=n}}function s0(t){return new rd(t,!0)}function o0(t){return new rd(t,!1)}function l0(t){return new i0(t)}function c0(t){return t.source}function u0(t){return t.target}function Gl(t){let e=c0,n=u0,r=zl,a=Ul,s=null,o=null,l=la(c);function c(){let u;const f=e0.call(arguments),d=e.apply(this,f),h=n.apply(this,f);if(s==null&&(o=t(u=l())),o.lineStart(),f[0]=d,o.point(+r.apply(this,f),+a.apply(this,f)),f[0]=h,o.point(+r.apply(this,f),+a.apply(this,f)),o.lineEnd(),u)return o=null,u+""||null}return c.source=function(u){return arguments.length?(e=u,c):e},c.target=function(u){return arguments.length?(n=u,c):n},c.x=function(u){return arguments.length?(r=typeof u=="function"?u:Pt(+u),c):r},c.y=function(u){return arguments.length?(a=typeof u=="function"?u:Pt(+u),c):a},c.context=function(u){return arguments.length?(u==null?s=o=null:o=t(s=u),c):s},c}function x3(){return Gl(s0)}function b3(){return Gl(o0)}function T3(){const t=Gl(l0);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const f0=De(3);var d0={draw(t,e){const n=De(e+ce(e/28,.75))*.59436,r=n/2,a=r*f0;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-a,-r),t.lineTo(a,r),t.moveTo(-a,r),t.lineTo(a,-r)}},Hl={draw(t,e){const n=De(e/on);t.moveTo(n,0),t.arc(0,0,n,0,qe)}},h0={draw(t,e){const n=De(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};const ad=De(1/3),g0=ad*2;var v0={draw(t,e){const n=De(e/g0),r=n*ad;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},p0={draw(t,e){const n=De(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},m0={draw(t,e){const n=De(e-ce(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},y0={draw(t,e){const n=De(e),r=-n/2;t.rect(r,r,n,n)}},x0={draw(t,e){const n=De(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}};const b0=.8908130915292852,id=Ge(on/10)/Ge(7*on/10),T0=Ge(qe/10)*id,S0=-kt(qe/10)*id;var A0={draw(t,e){const n=De(e*b0),r=T0*n,a=S0*n;t.moveTo(0,-n),t.lineTo(r,a);for(let s=1;s<5;++s){const o=qe*s/5,l=kt(o),c=Ge(o);t.lineTo(c*n,-l*n),t.lineTo(l*r-c*a,c*r+l*a)}t.closePath()}};const Xl=De(3);var E0={draw(t,e){const n=-De(e/(Xl*3));t.moveTo(0,n*2),t.lineTo(-Xl*n,-n),t.lineTo(Xl*n,-n),t.closePath()}};const C0=De(3);var w0={draw(t,e){const n=De(e)*.6824,r=n/2,a=n*C0/2;t.moveTo(0,-n),t.lineTo(a,r),t.lineTo(-a,r),t.closePath()}};const rr=-.5,ar=De(3)/2,Vl=1/De(12),I0=(Vl/2+1)*3;var R0={draw(t,e){const n=De(e/I0),r=n/2,a=n*Vl,s=r,o=n*Vl+n,l=-s,c=o;t.moveTo(r,a),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(rr*r-ar*a,ar*r+rr*a),t.lineTo(rr*s-ar*o,ar*s+rr*o),t.lineTo(rr*l-ar*c,ar*l+rr*c),t.lineTo(rr*r+ar*a,rr*a-ar*r),t.lineTo(rr*s+ar*o,rr*o-ar*s),t.lineTo(rr*l+ar*c,rr*c-ar*l),t.closePath()}},O0={draw(t,e){const n=De(e-ce(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}};const S3=[Hl,h0,v0,y0,A0,E0,R0],A3=[Hl,m0,O0,w0,d0,x0,p0];function E3(t,e){let n=null,r=la(a);t=typeof t=="function"?t:Pt(t||Hl),e=typeof e=="function"?e:Pt(e===void 0?64:+e);function a(){let s;if(n||(n=s=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),s)return n=null,s+""||null}return a.type=function(s){return arguments.length?(t=typeof s=="function"?s:Pt(s),a):t},a.size=function(s){return arguments.length?(e=typeof s=="function"?s:Pt(+s),a):e},a.context=function(s){return arguments.length?(n=s==null?null:s,a):n},a}function ca(){}function no(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 ro(t){this._context=t}ro.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:no(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:no(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function P0(t){return new ro(t)}function sd(t){this._context=t}sd.prototype={areaStart:ca,areaEnd:ca,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);break}}},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:no(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function M0(t){return new sd(t)}function od(t){this._context=t}od.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||this._line!==0&&this._point===3)&&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:no(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function L0(t){return new od(t)}function ld(t,e){this._basis=new ro(t),this._beta=e}ld.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=t[0],a=e[0],s=t[n]-r,o=e[n]-a,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+c*s),this._beta*e[l]+(1-this._beta)*(a+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var D0=(function t(e){function n(r){return e===1?new ro(r):new ld(r,e)}return n.beta=function(r){return t(+r)},n})(.85);function ao(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 jl(t,e){this._context=t,this._k=(1-e)/6}jl.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:ao(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:ao(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var F0=(function t(e){function n(r){return new jl(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Yl(t,e){this._context=t,this._k=(1-e)/6}Yl.prototype={areaStart:ca,areaEnd:ca,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);break}}},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:ao(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var N0=(function t(e){function n(r){return new Yl(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Kl(t,e){this._context=t,this._k=(1-e)/6}Kl.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||this._line!==0&&this._point===3)&&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:ao(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var $0=(function t(e){function n(r){return new Kl(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Zl(t,e,n){var r=t._x1,a=t._y1,s=t._x2,o=t._y2;if(t._l01_a>He){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,a=(a*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>He){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*u+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,a,s,o,t._x2,t._y2)}function cd(t,e){this._context=t,this._alpha=e}cd.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);break}(this._line||this._line!==0&&this._point===1)&&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:Zl(this,t,e);break}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 B0=(function t(e){function n(r){return e?new cd(r,e):new jl(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function ud(t,e){this._context=t,this._alpha=e}ud.prototype={areaStart:ca,areaEnd:ca,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);break}}},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:Zl(this,t,e);break}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 k0=(function t(e){function n(r){return e?new ud(r,e):new Yl(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function fd(t,e){this._context=t,this._alpha=e}fd.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||this._line!==0&&this._point===3)&&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:Zl(this,t,e);break}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 z0=(function t(e){function n(r){return e?new fd(r,e):new Kl(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function dd(t){this._context=t}dd.prototype={areaStart:ca,areaEnd:ca,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))}};function U0(t){return new dd(t)}function hd(t){return t<0?-1:1}function gd(t,e,n){var r=t._x1-t._x0,a=e-t._x1,s=(t._y1-t._y0)/(r||a<0&&-0),o=(n-t._y1)/(a||r<0&&-0),l=(s*a+o*r)/(r+a);return(hd(s)+hd(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function vd(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Jl(t,e,n){var r=t._x0,a=t._y0,s=t._x1,o=t._y1,l=(s-r)/3;t._context.bezierCurveTo(r+l,a+l*e,s-l,o-l*n,s,o)}function io(t){this._context=t}io.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:Jl(this,this._t0,vd(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(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,Jl(this,vd(this,n=gd(this,t,e)),n);break;default:Jl(this,this._t0,n=gd(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function pd(t){this._context=new md(t)}(pd.prototype=Object.create(io.prototype)).point=function(t,e){io.prototype.point.call(this,e,t)};function md(t){this._context=t}md.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,a,s){this._context.bezierCurveTo(e,t,r,n,s,a)}};function W0(t){return new io(t)}function G0(t){return new pd(t)}function yd(t){this._context=t}yd.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]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=xd(t),a=xd(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],a[0][s],r[1][s],a[1][s],t[o],e[o]);(this._line||this._line!==0&&n===1)&&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)}};function xd(t){var e,n=t.length-1,r,a=new Array(n),s=new Array(n),o=new Array(n);for(a[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)a[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(a[n-1]=2,s[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=a[e]/s[e-1],s[e]-=r,o[e]-=r*o[e-1];for(a[n-1]=o[n-1]/s[n-1],e=n-2;e>=0;--e)a[e]=(o[e]-a[e+1])/s[e];for(s[n-1]=(t[n]+a[n-1])/2,e=0;e<n-1;++e)s[e]=2*t[e+1]-a[e+1];return[a,s]}function H0(t){return new yd(t)}function so(t,e){this._context=t,this._t=e}so.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&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)}break}}this._x=t,this._y=e}};function X0(t){return new so(t,.5)}function V0(t){return new so(t,0)}function j0(t){return new so(t,1)}function qi(t,e){if((o=t.length)>1)for(var n=1,r,a,s=t[e[0]],o,l=s.length;n<o;++n)for(a=s,s=t[e[n]],r=0;r<l;++r)s[r][1]+=s[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function ts(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Y0(t,e){return t[e]}function K0(t){const e=[];return e.key=t,e}function C3(){var t=Pt([]),e=ts,n=qi,r=Y0;function a(s){var o=Array.from(t.apply(this,arguments),K0),l,c=o.length,u=-1,f;for(const d of s)for(l=0,++u;l<c;++l)(o[l][u]=[0,+r(d,o[l].key,u,s)]).data=d;for(l=0,f=qs(e(o));l<c;++l)o[f[l]].index=l;return n(o,f),o}return a.keys=function(s){return arguments.length?(t=typeof s=="function"?s:Pt(Array.from(s)),a):t},a.value=function(s){return arguments.length?(r=typeof s=="function"?s:Pt(+s),a):r},a.order=function(s){return arguments.length?(e=s==null?ts:typeof s=="function"?s:Pt(Array.from(s)),a):e},a.offset=function(s){return arguments.length?(n=s==null?qi:s,a):n},a}function w3(t,e){if((r=t.length)>0){for(var n,r,a=0,s=t[0].length,o;a<s;++a){for(o=n=0;n<r;++n)o+=t[n][a][1]||0;if(o)for(n=0;n<r;++n)t[n][a][1]/=o}qi(t,e)}}function I3(t,e){if((c=t.length)>0)for(var n,r=0,a,s,o,l,c,u=t[e[0]].length;r<u;++r)for(o=l=0,n=0;n<c;++n)(s=(a=t[e[n]][r])[1]-a[0])>0?(a[0]=o,a[1]=o+=s):s<0?(a[1]=l,a[0]=l+=s):(a[0]=0,a[1]=s)}function R3(t,e){if((a=t.length)>0){for(var n=0,r=t[e[0]],a,s=r.length;n<s;++n){for(var o=0,l=0;o<a;++o)l+=t[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}qi(t,e)}}function O3(t,e){if(!(!((o=t.length)>0)||!((s=(a=t[e[0]]).length)>0))){for(var n=0,r=1,a,s,o;r<s;++r){for(var l=0,c=0,u=0;l<o;++l){for(var f=t[e[l]],d=f[r][1]||0,h=f[r-1][1]||0,v=(d-h)/2,b=0;b<l;++b){var x=t[e[b]],E=x[r][1]||0,w=x[r-1][1]||0;v+=E-w}c+=d,u+=v*d}a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,qi(t,e)}}function Z0(t){var e=t.map(J0);return ts(t).sort(function(n,r){return e[n]-e[r]})}function J0(t){for(var e=-1,n=0,r=t.length,a,s=-1/0;++e<r;)(a=+t[e][1])>s&&(s=a,n=e);return n}function Q0(t){var e=t.map(bd);return ts(t).sort(function(n,r){return e[n]-e[r]})}function bd(t){for(var e=0,n=-1,r=t.length,a;++n<r;)(a=+t[n][1])&&(e+=a);return e}function P3(t){return Q0(t).reverse()}function M3(t){var e=t.length,n,r,a=t.map(bd),s=Z0(t),o=0,l=0,c=[],u=[];for(n=0;n<e;++n)r=s[n],o<l?(o+=a[r],c.push(r)):(l+=a[r],u.push(r));return u.reverse().concat(c)}function L3(t){return ts(t).reverse()}var _0=Object.defineProperty,q0=Object.defineProperties,tb=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,eb=Object.prototype.hasOwnProperty,nb=Object.prototype.propertyIsEnumerable,Sd=(t,e,n)=>e in t?_0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ad=(t,e)=>{for(var n in e||(e={}))eb.call(e,n)&&Sd(t,n,e[n]);if(Td)for(var n of Td(e))nb.call(e,n)&&Sd(t,n,e[n]);return t},Ed=(t,e)=>q0(t,tb(e));function Cd(t,e){return e?n=>{var r;const a=(r=t.getSubchartCandlestickShapeValue)==null?void 0:r.call(t,n,!0);return a===void 0?t.getBaseValue(n):a}:n=>t.getBaseValue(n)}function wd(t,e,n){return n?e.map(r=>{var a;const s=(a=t.getSubchartCandlestickShapeValue)==null?void 0:a.call(t,r,n);return s===void 0?r:Ed(Ad({},r),{value:s})}):e}function rb(t,e,n){return t.isStepType(e)?t.convertValuesToStep(n):n}function Id(t,e,n,r){const{config:a,scale:s}=t,o=a.line_connectNull,l=a.axis_rotated,c=t.generateGetLinePoints(e,n),u=t.getYScaleById.bind(t),f=Cd(t,n),d=x=>(n?t.subxx:t.xx).call(t,x),h=(x,E)=>t.isGrouped(x.id)?c(x,E)[0][1]:u(x.id,n)(f(x));let v=to();v=l?v.x(h).y(d):v.x(d).y(h),r&&(v=v.context(r)),o||(v=v.defined(x=>f(x)!==null));const b=n?s.subX:s.x;return x=>{const E=u(x.id,n);let w=o?t.filterRemoveNull(x.values):x.values,N=0,k=0,B;if(t.isLineType(x)){const G=a.data_regions[x.id];G&&!r&&t.lineWithRegions?(w=wd(t,w,n),t.isAreaRangeType(x)&&(w=w.map(V=>Ed(Ad({},V),{value:t.getRangedData(V,"mid")}))),t.isStepType(x)&&(w=t.convertValuesToStep(w)),B=t.lineWithRegions(w,s.zoom||b,E,G)):B=v.curve(t.getCurve(x))(rb(t,x,w))}else w[0]&&(N=b(w[0].x),k=E(f(w[0]))),B=l?`M ${k} ${N}`:`M ${N} ${k}`;return B||(r?void 0:"M 0 0")}}function Rd(t,e,n,r){const{config:a}=t,s=a.line_connectNull,o=a.axis_rotated,l=t.generateGetAreaPoints(e,n),c=t.getYScaleById.bind(t),u=Cd(t,n),f=new Map,d=x=>{let E=f.get(x);return E===void 0&&(E=t.getShapeYMin(x,n),f.set(x,E)),E},h=x=>(n?t.subxx:t.xx).call(t,x),v=(x,E)=>t.isGrouped(x.id)?l(x,E)[0][1]:c(x.id,n)(t.isAreaRangeType(x)?t.getRangedData(x,"high"):d(x.id)),b=(x,E)=>t.isGrouped(x.id)?l(x,E)[1][1]:c(x.id,n)(t.isAreaRangeType(x)?t.getRangedData(x,"low"):u(x));return x=>{let E=s?t.filterRemoveNull(x.values):x.values,w=0,N=0,k;if(t.isAreaType(x)){let B=td();B=o?B.y(h).x0(v).x1(b):B.x(h).y0(a.area_above?0:a.area_below?n?t.state.height2:t.state.height:v).y1(b),r&&(B=B.context(r)),s||(B=B.defined(G=>u(G)!==null)),E=wd(t,E,n),t.isStepType(x)&&(E=t.convertValuesToStep(E)),k=B.curve(t.getCurve(x))(E)}else E[0]&&(w=(n?t.scale.subX:t.scale.x)(E[0].x),N=t.getYScaleById(x.id,n)(u(E[0]))),k=o?`M ${N} ${w}`:`M ${w} ${N}`;return k||(r?void 0:"M 0 0")}}const ne={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},ab={export:"exportApi",flow:"flow",xgrids:"grid",ygrids:"grid",regions:"regions",category:"category",categories:"category"},Od=16,Rr=10,tn=6,Ma=3,Pd=tn+Ma,Md=1,Ld={x:{start:"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z",end:"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"},y:{start:"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z",end:"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"}},Dd={area:"initArea","area-line-range":"initArea","area-spline":"initArea","area-spline-range":"initArea","area-step":"initArea","area-step-range":"initArea",bar:"initBar",bubble:"initCircle",boxplot:"initBoxplot",bullet:"getBulletData",candlestick:"initCandlestick",donut:"initArc",funnel:"initFunnel",gauge:"initArc",line:"initLine",pie:"initArc",polar:"initPolar",radar:"initCircle",heatmap:"getHeatmapLayout",sankey:"getSankeyLayout",scatter:"initCircle",spline:"initLine",step:"initLine",treemap:"initTreemap"},vr={Area:[ne.AREA,ne.AREA_SPLINE,ne.AREA_SPLINE_RANGE,ne.AREA_LINE_RANGE,ne.AREA_STEP,ne.AREA_STEP_RANGE],AreaRange:[ne.AREA_SPLINE_RANGE,ne.AREA_LINE_RANGE,ne.AREA_STEP_RANGE],Arc:[ne.PIE,ne.DONUT,ne.GAUGE,ne.POLAR,ne.RADAR],Line:[ne.LINE,ne.SPLINE,ne.AREA,ne.AREA_SPLINE,ne.AREA_SPLINE_RANGE,ne.AREA_LINE_RANGE,ne.STEP,ne.AREA_STEP,ne.AREA_STEP_RANGE],Step:[ne.STEP,ne.AREA_STEP,ne.AREA_STEP_RANGE],Spline:[ne.SPLINE,ne.AREA_SPLINE,ne.AREA_SPLINE_RANGE]},Fd=1e5;function Qn(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function Pn(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function oi(t,e,n=[]){var r;const a=typeof e=="string"?e:e==null?void 0:e.id;return!((r=t.isGrouped)!=null&&r.call(t,a))||n.some(s=>s(t,e))}function ua(t,e){var n;const r=typeof e=="string"?e:e==null?void 0:e.id;return r&&((n=t.data_types)==null?void 0:n[r])||t.data_type||ne.LINE}function oo(t){const e=+t;return Number.isFinite(e)?e:null}function Nd(t){var e,n;const r=(n=(e=t.scale.zoom||t.scale.x)==null?void 0:e.domain)==null?void 0:n.call(e),a=oo(r==null?void 0:r[0]),s=oo(r==null?void 0:r[1]);return a===null||s===null?null:[Math.min(a,s),Math.max(a,s)]}function lo(t){return oo(t==null?void 0:t.x)}function ib(t,e,n){let r=0,a=t.length;for(;r<a;){const s=r+a>>1,o=lo(t[s]);if(o===null)return 0;(n?o<e:o>e)?r=s+1:a=s}return r}function sb(t,e,n){let r=0,a=t.length;for(;r<a;){const s=r+a>>1,o=lo(t[s]);if(o===null)return t.length;(n?o<=e:o>=e)?r=s+1:a=s}return r}function pr(t,e,n=1){const r=(e==null?void 0:e.values)||[],a={start:0,end:r.length},s=Nd(t);if(!r.length||!s)return a;const o=t.state,l=o._canvasVisibleRangeCache||(o._canvasVisibleRangeCache=new Map),c=[e.id,r.length,o.dataGeneration,s[0],s[1],n].join(":"),u=l.get(e.id);if((u==null?void 0:u.key)===c)return u.range;const f=lo(r[0]),d=lo(r[r.length-1]);if(f===null||d===null)return a;const h=f<=d,v=ib(r,s[0],h),b=sb(r,s[1],h),x={start:Math.max(0,Math.min(v,b)-n),end:Math.min(r.length,Math.max(v,b)+n)};return l.set(e.id,{key:c,range:x}),x}function _n(t,e){return ua(t.config,e)===ne.BAR}function es(t,e){return vr.Area.indexOf(ua(t.config,e))>-1}function li(t,e){const n=ua(t.config,e);return vr.Line.indexOf(n)>-1}function fa(t,e){return ua(t.config,e)===ne.SCATTER}function da(t,e){return ua(t.config,e)===ne.BUBBLE}function mr(t,e){return li(t,e)||fa(t,e)||da(t,e)}function zn(t,e){return ua(t.config,e)===ne.CANDLESTICK}function Ql(t,e){return ua(t.config,e)===ne.TREEMAP}function D3(t,e){const n=ua(t,e);return n===ne.BAR||vr.Area.indexOf(n)>-1}function gn(t,e){const n=t.getBaseValue(e);return n!=null}function ln(t,e){return Number.isFinite(t)&&Number.isFinite(e)}function $d(t,e,n){const r=Math.ceil(n)+1,a=Math.max(1,Math.ceil(t)+r*2+1),s=Math.max(1,Math.ceil(e)+r*2+1);return{data:new Uint8Array(a*s),height:s,offset:r,width:a}}function Bd(t,e,n){const r=Math.round(e)+t.offset,a=Math.round(n)+t.offset;if(r<0||r>=t.width||a<0||a>=t.height)return!1;const s=a*t.width+r;return t.data[s]?!1:(t.data[s]=1,!0)}var ob=Object.defineProperty,lb=(t,e,n)=>e in t?ob(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cb=(t,e,n)=>lb(t,typeof e!="symbol"?e+"":e,n);class kd{constructor(e){cb(this,"ctx",e)}get context(){return this.ctx}withContext(e,n){const r=this.ctx;this.ctx=e;try{n()}finally{this.ctx=r}}withState(e){const{ctx:n}=this;n.save();try{e(n)}finally{n.restore()}}withTranslation(e,n,r){this.withState(a=>{a.translate(e,n),r(a)})}clipRect(e,n){this.withState(r=>{r.beginPath(),r.rect(e.x,e.y,e.w,e.h),r.clip(),n(r)})}measureText(e){return this.ctx.measureText(e)}traceLine(e,n,r,a){const{ctx:s}=this;s.moveTo(e,n),s.lineTo(r,a)}traceCrispLine(e,n,r,a,s){this.traceLine(this.crisp(e,s),this.crisp(n,s),this.crisp(r,s),this.crisp(a,s))}traceCircle(e,n,r){this.ctx.moveTo(e+r,n),this.ctx.arc(e,n,r,0,Math.PI*2)}strokePath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.stroke()})}fillPath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.fill()})}fillRect(e,n){this.withStyle(n,r=>{r.fillRect(e.x,e.y,e.w,e.h)})}fillRoundRect(e,n=0,r){const a=this.normalizeRect(e),s=this.getRectRadii(a,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.fillRect(a,r);return}this.fillPath(o=>{this.traceRoundRect(o,a,s)},r)}strokeRoundRect(e,n=0,r){const a=this.normalizeRect(e),s=this.getRectRadii(a,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.strokeRect(a,r);return}this.strokePath(o=>{this.traceRoundRect(o,a,s)},r)}strokeRect(e,n){this.withStyle(n,r=>{r.strokeRect(e.x,e.y,e.w,e.h)})}text(e,n,r,a){const s=(l,c,u)=>{(a==null?void 0:a.maxWidth)===void 0?l.fillText(e,c,u):l.fillText(e,c,u,a.maxWidth)},o=l=>{a!=null&&a.angle?(l.translate(n,r),l.rotate(a.angle*Math.PI/180),s(l,0,0)):s(l,n,r)};a!=null&&a.angle?this.withState(l=>{this.applyStyle(a),o(l)}):this.withStyle(a,o)}textLines(e,n,r,a){this.withState(s=>{const o=e.split(`
|
|
33
|
+
`),l=Qn((a==null?void 0:a.font)||s.font),c=o.length>1?-((o.length-1)*l):0;this.applyStyle(a),s.translate(n,r),a!=null&&a.angle&&s.rotate(a.angle*Math.PI/180),o.forEach((u,f)=>{const d=c+f*l;(a==null?void 0:a.maxWidth)===void 0?s.fillText(u,0,d):s.fillText(u,0,d,a.maxWidth)})})}point(e,n,r,a,s){this.withStyle(s,o=>{const l=!(s!=null&&s.stroke)||s.fill!==void 0,c=(s==null?void 0:s.stroke)!==void 0;if(e==="rectangle"){const u=a*2,f={x:n-a,y:r-a,w:u,h:u};l&&o.fillRect(f.x,f.y,f.w,f.h),c&&o.strokeRect(f.x,f.y,f.w,f.h)}else o.beginPath(),o.arc(n,r,a,0,Math.PI*2),l&&o.fill(),c&&o.stroke()})}getRectRadii(e,n){const r=typeof n=="number"?{tl:n,tr:n,br:n,bl:n}:{tl:n.tl||0,tr:n.tr||0,br:n.br||0,bl:n.bl||0},a=Math.max(0,Math.min(Math.abs(e.w),Math.abs(e.h))/2);return{tl:Math.max(0,Math.min(r.tl,a)),tr:Math.max(0,Math.min(r.tr,a)),br:Math.max(0,Math.min(r.br,a)),bl:Math.max(0,Math.min(r.bl,a))}}traceRoundRect(e,n,r){const{x:a,y:s,w:o,h:l}=n,c=a+o,u=s+l;e.moveTo(a+r.tl,s),e.lineTo(c-r.tr,s),r.tr?e.quadraticCurveTo(c,s,c,s+r.tr):e.lineTo(c,s),e.lineTo(c,u-r.br),r.br?e.quadraticCurveTo(c,u,c-r.br,u):e.lineTo(c,u),e.lineTo(a+r.bl,u),r.bl?e.quadraticCurveTo(a,u,a,u-r.bl):e.lineTo(a,u),e.lineTo(a,s+r.tl),r.tl?e.quadraticCurveTo(a,s,a+r.tl,s):e.lineTo(a,s),e.closePath()}normalizeRect(e){const n=e.w<0?e.x+e.w:e.x,r=e.h<0?e.y+e.h:e.y;return{x:n,y:r,w:Math.abs(e.w),h:Math.abs(e.h)}}applyStyle(e){if(!e)return;const{ctx:n}=this;e.fill!==void 0&&(n.fillStyle=e.fill),e.stroke!==void 0&&(n.strokeStyle=e.stroke),e.lineWidth!==void 0&&(n.lineWidth=e.lineWidth),e.alpha!==void 0&&(n.globalAlpha=e.alpha),e.font!==void 0&&(n.font=e.font),e.textAlign!==void 0&&(n.textAlign=e.textAlign),e.textBaseline!==void 0&&(n.textBaseline=e.textBaseline),e.lineDash!==void 0&&n.setLineDash(e.lineDash)}withStyle(e,n){e?this.withState(r=>{this.applyStyle(e),n(r)}):n(this.ctx)}crisp(e,n){return n%2?Math.round(e)+.5:Math.round(e)}}let Wr;function co(t,e){if(!D(e)||e>=1)return t;const n=t.match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(n){const s=(n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1]).match(/.{2}/g);return s?`rgba(${s.map(l=>parseInt(l,16)).join(",")},${e})`:t}if(/^rgb\(/i.test(t))return t.replace(/^rgb\((.*)\)$/i,`rgba($1,${e})`);if(/^rgba\(/i.test(t))return t.replace(/^rgba\((.*),\s*([\d.]+)\)$/i,(a,s,o)=>`rgba(${s},${Number(o)*e})`);const r=ub(t);return r&&r!==t?co(r,e):t}function ub(t){if(!yt.document||(Wr===void 0&&(Wr=yt.document.createElement("canvas").getContext("2d")),!Wr))return null;Wr.fillStyle="#000",Wr.fillStyle=t;const e=Wr.fillStyle;Wr.fillStyle="#fff",Wr.fillStyle=t;const n=Wr.fillStyle;return e===n?e:null}function ns(t,e,n,r){const a=e(n,r),s=y(t,a);return ln(s.x,s.y)&&ln(s.x+s.w,s.y+s.h)?{points:a,rect:s}:null}function rs(t,e,n,r){const a=e(n,r),{body:s,wickStart:o,wickEnd:l}=C(t,a);return ln(s.x,s.y)&&ln(s.x+s.w,s.y+s.h)&&ln(o[0],o[1])&&ln(l[0],l[1])?{body:s,points:a,wickStart:o,wickEnd:l}:null}const fb=1.2;function _l(t,e){var n,r,a;let{value:s}=e;if((n=t.isBubbleZType)!=null&&n.call(t,e))s=t.getBubbleZData(s,"z");else if((r=t.isCandlestickType)!=null&&r.call(t,e)){const o=(a=t.getCandlestickData)==null?void 0:a.call(t,e);o&&(s=o.close)}return s}function ql(t,e){const n=t.dataLabelFormat(e.id)(_l(t,e),e.id,e.index,[]);return n==null?null:String(n)}function zd(t){return`${t.id}:${t.index}`}function tc(t,e,n){var r;if(!(e!=null&&e.length))return()=>!1;if(t.config.tooltip_grouped&&e.length>1){const s=(r=e[0])==null?void 0:r.index;return o=>s!==void 0&&o.index===s&&n(t,o)}const a=new Set(e.filter(s=>s&&n(t,s)).map(zd));return s=>a.has(zd(s))}function ci(t,e,n,r){const a=t.config.data_labels_position;let s;if(M(a))s=a.bind(t.api)(n,_l(t,e),e.id,e.index,r);else if(a){const o=e.id in a?a[e.id]:a;s=o==null?void 0:o[n]}return D(s)?s:0}function db(t,e){var n,r;const a=(n=t.config.data_labels)==null?void 0:n.image;if(M(a))return(r=a.call(t.api,_l(t,e),e.id,e.index))!=null?r:null;if(a){const{url:s="",width:o=0,height:l=0,pos:c}=a;return{url:s,width:o,height:l,pos:c}}return null}function hb(t,e){return Ir(t.url,{ID:e.id})}function gb(t,e,n,r,a,s){var o,l,c;const{width:u=0,height:f=0,pos:d}=e,h=u/2,v=f/2,b=ec(t.canvasEngine.ctx,n,r,a).h,x=Qn(t.canvasEngine.ctx.font),E=r-h,w=a-v-((o=t.isTreemapType)!=null&&o.call(t,s)?x*.7:b/2);let N=r,k=a;return t.config.axis_rotated?N+=h:k+=v,{x:E+((l=d==null?void 0:d.x)!=null?l:0),y:w+((c=d==null?void 0:d.y)!=null?c:0),textX:N,textY:k}}function Ud(t,e,n){var r,a,s,o,l;const c=(r=t.updateTextColor)==null?void 0:r.call(t,e);return typeof c=="string"?c:(s=(a=t.getCustomTypeHooks)==null?void 0:a.call(t,e))!=null&&s.themeTextColor||(o=t.isTreemapType)!=null&&o.call(t,e)?n:((l=t.color)==null?void 0:l.call(t,e))||n}function vb(t,e){var n;const r=t.config.data_labels_backgroundColors;if(!r)return null;if($(r))return r;if(M(r)){const s=(n=t.color)==null?void 0:n.call(t,e),o=r.bind(t.api)(s,e);return o==null?null:String(o)}const a=r[e.id];return a==null?null:String(a)}function pb(t){var e,n,r;if(!t)return null;const a=rt(t)?t:{};return{padding:Ra((e=a.padding)!=null?e:"3 5"),radius:D(a.radius)?a.radius:10,stroke:(n=a.stroke)!=null?n:"#000",strokeWidth:D(a.strokeWidth)?a.strokeWidth:1,fill:(r=a.fill)!=null?r:"none"}}function ec(t,e,n,r,a={top:0,right:0,bottom:0,left:0}){var s,o;const l=e.split(`
|
|
34
|
+
`),c=l.map(w=>t.measureText(w)),u=Math.max(...c.map(w=>w.width),0),f=Qn(t.font),d=f*fb,h=c[0]?(c[0].fontBoundingBoxAscent||0)+(c[0].fontBoundingBoxDescent||0):0,v=c[0]&&(c[0].fontBoundingBoxDescent||c[0].actualBoundingBoxDescent)||0,b=l.length>1?d*l.length:Math.max(f,h,((s=c[0])==null?void 0:s.actualBoundingBoxAscent)+((o=c[0])==null?void 0:o.actualBoundingBoxDescent)||0);let x=n,E=r;return t.textAlign==="center"?x-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(x-=u),t.textBaseline==="middle"?E-=b/2:t.textBaseline==="alphabetic"?E-=b-v:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(E-=b),{x:x-a.left,y:E-a.top,w:u+a.left+a.right,h:b+a.top+a.bottom}}function Wd(t,e,n,r,a,s){var o,l;const c=e.context,u=vb(t,n),f=pb((o=t.config.data_labels)==null?void 0:o.border),d=(l=f==null?void 0:f.padding)!=null?l:{top:0,right:0,bottom:0,left:0},h=ec(c,r,a,s,d),v=t.config.data_labels.rotate;e.withState(b=>{var x;v&&(b.translate(a,s),b.rotate(v*Math.PI/180),h.x-=a,h.y-=s),u&&e.fillRoundRect(h,(x=f==null?void 0:f.radius)!=null?x:0,{fill:u}),f&&(f.fill!=="none"&&e.fillRoundRect(h,f.radius,{fill:f.fill}),e.strokeRoundRect(h,f.radius,{stroke:f.stroke,lineWidth:f.strokeWidth}))})}function mb(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function yb(t){return t==="start"?"left":t==="end"?"right":"center"}function xb(t,e,n,r){var a,s,o;const l=mb(t.config.data_labels.rotate),c=t.config.axis_rotated,u=t.config[`axis_${(a=t.axis)==null?void 0:a.getId(e.id)}_inverted`],f=zn(t,e),{value:d}=e,h=D(d)&&d<0||f&&!((o=(s=t.getCandlestickData)==null?void 0:s.call(t,e))!=null&&o._isUp),v=4,b=v*2;return c?l==="start"?(n+=h?0:b,r+=v):l==="middle"?(n+=b,r-=b):l==="end"&&(h&&(n-=b),r+=v):(l==="start"?(n+=v,h&&(r+=b*2)):l==="middle"?r-=b:l==="end"&&(n-=v,h&&(r+=b*2)),u&&(r+=h?-17:f?13:7)),{x:n,y:r,textAlign:yb(l)}}function Gd(t,e,n,r,a){var s;if(t.config.axis_rotated)r+=6,e.textAlign="left",e.textBaseline="middle";else if(da(t,n))e.textAlign="center",e.textBaseline="middle";else{const{config:o,state:l}=t,c=o[`axis_${(s=t.axis)==null?void 0:s.getId(n.id)}_inverted`],u=n.value<0||n.value===0&&!l.hasPositiveValue&&l.hasNegativeValue;let f=3;D(o.point_r)&&o.point_r>5&&(li(t,n)||fa(t,n))&&(f+=o.point_r/2.3),e.textAlign="center",(c?!u:u)?(a+=f,e.textBaseline="top"):(a-=f*2,e.textBaseline="bottom")}return{x:r,y:a}}var bb=Object.defineProperty,Hd=Object.getOwnPropertySymbols,Tb=Object.prototype.hasOwnProperty,Sb=Object.prototype.propertyIsEnumerable,Xd=(t,e,n)=>e in t?bb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gr=(t,e)=>{for(var n in e||(e={}))Tb.call(e,n)&&Xd(t,n,e[n]);if(Hd)for(var n of Hd(e))Sb.call(e,n)&&Xd(t,n,e[n]);return t};const Vd={x:0,y:0,w:8,h:8},nc=new Map,jd=[1,0,0,1,0,0];function Ab(t){return t==="circle"||t==="rectangle"}function wn(t,e,n=0){const r=t.getAttribute(e),a=r===null?NaN:parseFloat(r);return Number.isFinite(a)?a:n}function Eb(t){const e=(t.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi)||[]).map(Number).filter(Number.isFinite),n=[];for(let r=0;r<e.length-1;r+=2)n.push([e[r],e[r+1]]);return n}function Cb(t){const e=(t==null?void 0:t.trim().split(/[\s,]+/).map(Number).filter(Number.isFinite))||[];return e.length===4?{x:e[0],y:e[1],w:e[2],h:e[3]}:null}function Yd(t){const e=t.map(([s])=>s),n=t.map(([,s])=>s),r=Math.min(...e),a=Math.min(...n);return{x:r,y:a,w:Math.max(...e)-r,h:Math.max(...n)-a}}function wb(t){const e=t.filter(o=>Number.isFinite(o.x)&&Number.isFinite(o.y)&&Number.isFinite(o.w)&&Number.isFinite(o.h));if(!e.length)return Gr({},Vd);const n=Math.min(...e.map(o=>o.x)),r=Math.min(...e.map(o=>o.y)),a=Math.max(...e.map(o=>o.x+o.w)),s=Math.max(...e.map(o=>o.y+o.h));return{x:n,y:r,w:a-n,h:s-r}}function as(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function Ib(t){let e=[...jd];return((t==null?void 0:t.match(/[a-z]+\([^)]*\)/gi))||[]).forEach(n=>{var r;const[,a,s]=n.match(/^([a-z]+)\(([^)]*)\)$/i)||[],o=a==null?void 0:a.toLowerCase(),l=((s==null?void 0:s.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi))||[]).map(Number).filter(Number.isFinite);let c=null;if(o==="matrix"&&l.length>=6)c=l.slice(0,6);else if(o==="translate"&&l.length)c=[1,0,0,1,l[0],l[1]||0];else if(o==="scale"&&l.length)c=[l[0],0,0,(r=l[1])!=null?r:l[0],0,0];else if(o==="rotate"&&l.length){const u=l[0]*Math.PI/180,f=Math.cos(u),d=Math.sin(u),h=[f,d,-d,f,0,0];c=l.length>=3?as(as([1,0,0,1,l[1],l[2]],h),[1,0,0,1,-l[1],-l[2]]):h}else o==="skewx"&&l.length?c=[1,0,Math.tan(l[0]*Math.PI/180),1,0,0]:o==="skewy"&&l.length&&(c=[1,Math.tan(l[0]*Math.PI/180),0,1,0,0]);c&&(e=as(e,c))}),e}function ha(t,e){const n=t.getAttribute("style"),r=t.getAttribute(e),a=n==null?void 0:n.match(new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`,"i"));return((a==null?void 0:a[1])||r||"").trim()||null}function Rb(t,e){const n=Gr({},e),r=ha(t,"fill"),a=ha(t,"stroke"),s=ha(t,"stroke-width"),o=ha(t,"opacity"),l=ha(t,"fill-opacity"),c=ha(t,"stroke-opacity");if(r&&(n.fill=r==="none"?null:r),a&&(n.stroke=a==="none"?null:a),s){const u=parseFloat(s);Number.isFinite(u)&&(n.lineWidth=u)}return[o,l,c].forEach(u=>{var f;const d=u===null?NaN:parseFloat(u);Number.isFinite(d)&&(n.alpha=((f=n.alpha)!=null?f:1)*d)}),n}function Ob(t){const e=new Map;return Array.from(t.querySelectorAll("[id]")).forEach(n=>{const r=n.getAttribute("id");r&&e.set(r,n)}),e}function Or(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function Pr(t,e,n,r){if(typeof t=="number")return Number.isFinite(t)?t:r;if(typeof t=="string"&&/%$/.test(t)){const s=parseFloat(t);return Number.isFinite(s)?e+n*s/100:r}const a=parseFloat(t!=null?t:"");return Number.isFinite(a)?a:r}function Pb(t){const e=(t==null?void 0:t.trim())||"0",n=parseFloat(e),r=/%$/.test(e)?n/100:n;return Math.max(0,Math.min(1,Number.isFinite(r)?r:0))}function Mb(t){return Array.from(t.children||[]).filter(e=>e.tagName.toLowerCase()==="stop").map(e=>{const n=ha(e,"stop-color")||"#000",r=ha(e,"stop-opacity"),a=r===null?NaN:parseFloat(r);return{offset:Pb(e.getAttribute("offset")),color:n,opacity:Number.isFinite(a)?a:void 0}})}function Lb(t){const e=new Map;return t.forEach((n,r)=>{const a=n.tagName.toLowerCase(),s=Mb(n);s.length&&(a==="lineargradient"?e.set(r,{type:"linearGradient",x1:Or(n.getAttribute("x1"),"0%"),y1:Or(n.getAttribute("y1"),"0%"),x2:Or(n.getAttribute("x2"),"100%"),y2:Or(n.getAttribute("y2"),"0%"),stops:s}):a==="radialgradient"&&e.set(r,{type:"radialGradient",cx:Or(n.getAttribute("cx"),"50%"),cy:Or(n.getAttribute("cy"),"50%"),r:Or(n.getAttribute("r"),"50%"),fx:Or(n.getAttribute("fx"),"50%"),fy:Or(n.getAttribute("fy"),"50%"),fr:Or(n.getAttribute("fr"),0),stops:s}))}),e}function rc(t,e,n,r=jd,a={},s=new Set){const o=t.tagName.toLowerCase(),l=Array.from(t.children||[]),c=Rb(t,a),u=as(r,Ib(t.getAttribute("transform"))),f={matrix:u,style:c};if(o==="defs")return[];if(o==="svg"||o==="g"||o==="symbol")return l.reduce((d,h)=>d.concat(rc(h,e,n,u,c,s)),[]);if(o==="use"){const d=t.getAttribute("href")||t.getAttribute("xlink:href")||"",h=d.charAt(0)==="#"?d.slice(1):"",v=h&&n.get(h);if(!v||s.has(h))return[];const b=wn(t,"x",0),x=wn(t,"y",0),E=as(u,[1,0,0,1,b,x]);s.add(h);const w=rc(v,e,n,E,c,s);return s.delete(h),w}if(o==="polygon"||o==="polyline"){const d=Eb(t.getAttribute("points")||"");return d.length?[Gr({type:o,points:d,box:Yd(d)},f)]:[]}if(o==="circle"){const d=wn(t,"cx",0),h=wn(t,"cy",0),v=wn(t,"r",0);return v>0?[Gr({type:"circle",cx:d,cy:h,r:v,box:{x:d-v,y:h-v,w:v*2,h:v*2}},f)]:[]}if(o==="ellipse"){const d=wn(t,"cx",0),h=wn(t,"cy",0),v=wn(t,"rx",0),b=wn(t,"ry",0);return v>0&&b>0?[Gr({type:"ellipse",cx:d,cy:h,rx:v,ry:b,box:{x:d-v,y:h-b,w:v*2,h:b*2}},f)]:[]}if(o==="rect"){const d=wn(t,"x",0),h=wn(t,"y",0),v=wn(t,"width",0),b=wn(t,"height",0);return v>0&&b>0?[Gr({type:"rect",x:d,y:h,w:v,h:b,box:{x:d,y:h,w:v,h:b}},f)]:[]}if(o==="line"){const d=wn(t,"x1",0),h=wn(t,"y1",0),v=wn(t,"x2",0),b=wn(t,"y2",0);return[Gr({type:"line",x1:d,y1:h,x2:v,y2:b,box:Yd([[d,h],[v,b]])},f)]}if(o==="path"){const d=t.getAttribute("d")||"";return d?[Gr({type:"path",d,box:e},f)]:[]}return[]}function Db(t){if(!/^</.test(t))return null;if(nc.has(t))return nc.get(t)||null;let e=null;try{const r=new yt.DOMParser().parseFromString(vt(t),"image/svg+xml").documentElement,a=Cb(r.getAttribute("viewBox"))||Vd,s=Ob(r),o=rc(r,a,s);o.length&&(e={shapes:o,box:r.tagName.toLowerCase()==="svg"?a:wb(o.map(l=>l.box)),paints:Lb(s)})}catch(n){e=null}return nc.set(t,e),e}function Fb(t,e){if(e.type==="polygon"||e.type==="polyline"){const[n,...r]=e.points;t.moveTo(n[0],n[1]),r.forEach(([a,s])=>t.lineTo(a,s)),e.type==="polygon"&&t.closePath()}else e.type==="circle"?(t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2)):e.type==="ellipse"?(t.moveTo(e.cx+e.rx,e.cy),t.ellipse(e.cx,e.cy,e.rx,e.ry,0,0,Math.PI*2)):e.type==="rect"?t.rect(e.x,e.y,e.w,e.h):e.type==="line"&&(t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2))}function uo(t){const e=t==null?void 0:t.match(/^url\(#([^)]+)\)$/);return(e==null?void 0:e[1])||null}function Kd(t,e,n){const{x:r,y:a,w:s,h:o}=n,l=e.type==="linearGradient"?t.createLinearGradient(Pr(e.x1,r,s,r),Pr(e.y1,a,o,a),Pr(e.x2,r,s,r+s),Pr(e.y2,a,o,a)):t.createRadialGradient(Pr(e.fx,r,s,r+s/2),Pr(e.fy,a,o,a+o/2),Pr(e.fr,r,Math.max(s,o),0),Pr(e.cx,r,s,r+s/2),Pr(e.cy,a,o,a+o/2),Math.max(.01,Pr(e.r,0,Math.max(s,o),Math.max(s,o)/2)));return e.stops.forEach(({offset:c,color:u,opacity:f})=>{l.addColorStop(c,f===void 0?u:co(u,f))}),l}function Nb(t,e,n,r,a){const s=Gr({},e||{});if(n.fill!==void 0)if(n.fill===null)delete s.fill;else if(uo(n.fill)){const o=r.get(uo(n.fill));o&&(s.fill=Kd(t,o,a))}else/^url\(/.test(n.fill)||(s.fill=n.fill);if(n.stroke!==void 0)if(n.stroke===null)delete s.stroke;else if(uo(n.stroke)){const o=r.get(uo(n.stroke));o&&(s.stroke=Kd(t,o,a))}else/^url\(/.test(n.stroke)||(s.stroke=n.stroke);return n.lineWidth!==void 0&&(s.lineWidth=n.lineWidth),{style:s,shouldFill:n.fill!==null&&(!s.stroke||s.fill!==void 0),shouldStroke:n.stroke!==null&&s.stroke!==void 0,alpha:n.alpha}}function is(t,e,n,r,a,s,o=a){if(Ab(e)){t.point(e,n,r,a,s);return}const l=Db(e);if(!l||a<=0){t.point("circle",n,r,a,s);return}t.withState(c=>{const{box:u,paints:f,shapes:d}=l,h=o>0?a/o:1,v=b=>{const{style:x,shouldFill:E,shouldStroke:w,alpha:N}=Nb(c,s,b.style,f,u);if(c.save(),t.applyStyle(x),N!==void 0&&(c.globalAlpha*=N),c.transform(...b.matrix),c.beginPath(),b.type==="path"){if(yt.Path2D){const k=b.path2D||(b.path2D=new yt.Path2D(b.d));E&&c.fill(k),w&&c.stroke(k)}}else Fb(c,b),E&&c.fill(),w&&c.stroke();c.restore()};c.translate(n-(u.x+u.w/2)*h,r-(u.y+u.h/2)*h),c.scale(h,h),d.forEach(v)})}var $b=Object.defineProperty,Bb=Object.defineProperties,kb=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,zb=Object.prototype.hasOwnProperty,Ub=Object.prototype.propertyIsEnumerable,ac=(t,e,n)=>e in t?$b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jd=(t,e)=>{for(var n in e||(e={}))zb.call(e,n)&&ac(t,n,e[n]);if(Zd)for(var n of Zd(e))Ub.call(e,n)&&ac(t,n,e[n]);return t},Qd=(t,e)=>Bb(t,kb(e)),ui=(t,e,n)=>ac(t,typeof e!="symbol"?e+"":e,n);const Wb=[es,_n,mr,zn],Gb=1e3,_d=new WeakMap;function qd(t,e){if(!e||e==="none")return;const n=e.match(/^matrix\(([^)]+)\)$/),r=e.match(/^matrix3d\(([^)]+)\)$/);if(n){const a=n[1].split(",").map(s=>Number(s.trim()));a.length===6&&a.every(Number.isFinite)&&t.transform(a[0],a[1],a[2],a[3],a[4],a[5])}else if(r){const a=r[1].split(",").map(s=>Number(s.trim()));a.length===16&&a.every(Number.isFinite)&&t.transform(a[0],a[1],a[4],a[5],a[12],a[13])}}function Hb(t,e,n){const r=t.naturalWidth||t.width,a=t.naturalHeight||t.height;if(!r||!a||!e||!n)return{x:0,y:0,w:e,h:n};const s=Math.min(e/r,n/a),o=r*s,l=a*s;return{x:(e-o)/2,y:(n-l)/2,w:o,h:l}}function Xb(t){const{state:e}=t;return e.customType||e.hasTreemap?{x:0,y:0}:{x:j(e.margin.left),y:j(e.margin.top)}}function th(t,e,n,r,a=!1){r.strokePath(s=>{Id(t,n,a,s)(e)},{lineDash:[]})}function eh(t,e,n,r,a=!1){r.fillPath(s=>{Rd(t,n,a,s)(e)})}function nh(t,e){const n=pr(t,e);return n.start===0&&n.end===e.values.length?e:Qd(Jd({},e),{values:e.values.slice(n.start,n.end)})}function ic(t,e){if(!(t!=null&&t.length)||!(e!=null&&e.id))return null;let n=_d.get(t);if(!n){n=new Map;for(const r of t){if(!(r!=null&&r.id))continue;const a=`${r.id}:*`;n.has(a)||n.set(a,r),"index"in r&&n.set(`${r.id}:${r.index}`,r)}_d.set(t,n)}return"index"in e?n.get(`${e.id}:${e.index}`)||null:n.get(`${e.id}:*`)||null}function ss(t,e){const n=t.config.color_onover;return!n||!e?null:rt(n)?e.id in n?n[e.id]:null:$(n)?n:M(n)?n.call(t.api,e):null}function Vb(t,e,n){const r=ic(n,e);return ss(t,r)||t.color(e.id)}function rh(t){var e;return(t==null?void 0:t.id)||((e=t==null?void 0:t.data)==null?void 0:e.id)}function ah(t,e){var n;const r=rh(e);return!!r&&((n=t.state.focusedTargetIds)==null?void 0:n.has(r))}function ir(t,e){var n;const r=rh(e);return r&&((n=t.state.defocusedTargetIds)!=null&&n.has(r))?t.canvasTheme.style.shape.targetDefocusedOpacity:1}function jb(t,e,n,r=!1){var a;const s=(a=t.generateGetAreaPoints)==null?void 0:a.call(t,n,r);if(!s)return null;const o=pr(t,e);let l=1/0,c=1/0,u=-1/0,f=-1/0;for(let d=o.start;d<o.end;d++){const h=e.values[d];gn(t,h)&&s(h,d).forEach(([v,b])=>{ln(v,b)&&(l=Math.min(l,v),c=Math.min(c,b),u=Math.max(u,v),f=Math.max(f,b))})}return Number.isFinite(l)&&Number.isFinite(c)?{x:l,y:c,w:u-l,h:f-c}:null}function fo(t,e,n){return e+n*(D(t)?t:0)}function ih(t,e,n,r,a,s){const o=t.config[`${r}_linearGradient`];if(!o||!a||!a.w||!a.h)return s;const l=t.config.axis_rotated,c=typeof o=="object"?o:{},u=c.x||(l?[1,0]:[0,0]),f=c.y||(l?[0,0]:[0,1]),d=Array.isArray(c.stops)?c.stops:[[0,s,1],[1,s,0]],h=e.createLinearGradient(fo(u[0],a.x,a.w),fo(f[0],a.y,a.h),fo(u[1],a.x,a.w),fo(f[1],a.y,a.h));return d.forEach(([v,b,x])=>{const E=M(b)?b.call(t.api,n.id):b,w=String(E||s),N=Number(v),k=Number.isFinite(N)?Math.max(0,Math.min(1,N)):0;h.addColorStop(k,co(w,x))}),h}function Mr(t,e){return oi(t,e,Wb)}function ho(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:fa(t,e)||da(t,e)?.5:1}function os(t,e,n){var r,a;const s=t.config.point_r;return da(t,e)||M(s)?(a=(r=t.pointR)==null?void 0:r.call(t,n))!=null?a:2.5:s}function Yb(t,e,n,r){return!r&&n==="circle"&&fa(t,e)&&!M(t.config.point_r)&&e.values.length>Fd}function Kb(t,e){const{bar_connectLine:n}=t.config,r=rt(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function Zb(t,e,n){const{indexX:r,indexY:a,pos:s}=n;return t.config.axis_rotated?{x:e[0][r],y:e[0][a],width:e[0][r]-s,height:e[2][a]-e[0][a]}:{x:e[0][r],y:s,width:e[2][r]-e[0][r],height:e[3][a]-s}}function Jb(t,e,n,r,a=1){if(r.length<2)return;const s=t.config.axis_rotated,o=/^start-(start|end)$/.test(n),l=/^end-(start|end)$/.test(n),c=/\w+-end$/.test(n),u=/\w+-start$/.test(n),f=v=>({x:s?l?v.x-v.width:v.x:v.x+v.width,y:s||o?v.y+v.height:v.y}),d=v=>({x:s?v.x-(c?v.width:0):v.x,y:s?v.y:v.y+(u?v.height:0)});let h=f(r[0]);e.strokePath(()=>{for(let v=1;v<r.length;v++){const b=d(r[v]);e.traceLine(h.x,h.y,b.x,b.y),v<r.length-1&&(h=f(r[v]))}},{alpha:a,stroke:t.canvasTheme.style.shape.barConnectLineColor,lineWidth:t.canvasTheme.style.shape.barConnectLineWidth,lineDash:[]})}function sc(t,e){var n;const{config:r}=t;if(da(t,e))return"circle";const a=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],s=Array.isArray(r.point_pattern)&&r.point_pattern.length?r.point_pattern:[r.point_type],o=Math.max(0,a.indexOf(e.id)),l=s[o%s.length];return/^rect(angle)?$/i.test(l)||l==="rectangle"?"rectangle":l||"circle"}function Qb(t,e,n,r,a,s,o){const l=t.config.point_radialGradient;if(!l||!s)return o;const c=rt(l)?l:{},u=D(c.cx)?c.cx:.3,f=D(c.cy)?c.cy:.3,d=D(c.r)?c.r:.7,h=Array.isArray(c.stops)?c.stops:[[.1,null,1],[.9,null,0]],v=r+(u-.5)*s*2,b=a+(f-.5)*s*2,x=e.createRadialGradient(v,b,0,v,b,Math.max(1,s*d*2));return h.forEach(([E,w,N])=>{let k=M(w)?w.bind(t.api)(n.id):w;k||(k=o);const B=Number(E),G=Number.isFinite(B)?Math.max(0,Math.min(1,B)):0;x.addColorStop(G,co(k,N))}),x}function sh(t,e,n){const r=t.config.candlestick_color_down;return(n!=null&&n._isUp?t.color(e):r&&typeof r=="object"?r[e.id]:r)||t.color(e)}function _b(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function qb(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function t1(t,e,n){const{config:r,scale:a}=t,s=a.zoom||a.x,o=t.getYScaleById(e.id),l=r.line_connectNull?t.filterRemoveNull(e.values):e.values;let c=t.isAreaRangeType(e)?l.map(b=>Qd(Jd({},b),{value:t.getRangedData(b,"mid")})):l;t.isStepType(e)&&(c=t.convertValuesToStep(c));const u=sa(t,c,s,o,r.data_regions[e.id]);let f=null,d=[];const h=()=>{if(d.length<2||!f){d=[];return}n.strokePath(b=>{const[x,...E]=d;b.moveTo(x[0],x[1]),E.forEach(w=>{b.lineTo(w[0],w[1])})},{lineDash:f}),d=[]},v=(b,x,E)=>{!f||!qb(f,E)?(h(),f=E,d=[b,x]):d.push(x)};for(const{start:b,end:x,dash:E,isBreak:w}of u){if(w||!b||!x||!E){h(),f=null;continue}if(!ln(b[0],b[1])||!ln(x[0],x[1])){h(),f=null;continue}v(b,x,E)}h()}class e1{constructor(e,n){ui(this,"engine",e),ui(this,"theme",n),ui(this,"painter"),ui(this,"labelImageCache",new Map),ui(this,"backgroundImageCache",new Map),ui(this,"backgroundClassStyleCache",new Map),this.painter=new kd(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}destroy(){const e=n=>{n.image.onload=null,n.image.onerror=null};this.labelImageCache.forEach(e),this.backgroundImageCache.forEach(e),this.labelImageCache.clear(),this.backgroundImageCache.clear(),this.backgroundClassStyleCache.clear()}getLabelImage(e,n){if(!e||!yt.Image)return null;let r=this.labelImageCache.get(e);if(!r){const a={image:new yt.Image,loaded:!1,loading:!0};r=a,this.labelImageCache.set(e,r),a.image.onload=()=>{var s;a.loaded=!0,a.loading=!1,(s=n.redraw)==null||s.call(n)},a.image.onerror=()=>{a.loaded=!1,a.loading=!1},a.image.src=e}return r}getBackgroundImage(e,n){if(!e||!yt.Image)return null;let r=this.backgroundImageCache.get(e);if(!r){const a={image:new yt.Image,loaded:!1,loading:!0};r=a,this.backgroundImageCache.set(e,r),a.image.onload=()=>{var s;a.loaded=!0,a.loading=!1,(s=n.renderCanvasFrame)==null||s.call(n,void 0,null,!1)},a.image.onerror=()=>{a.loaded=!1,a.loading=!1},a.image.src=e}return r}getBackgroundClassStyle(e,n){if(!n||!yt.document)return{};const r=this.backgroundClassStyleCache.get(n);if(r)return r;const a=yt.document.createElement("div");a.className=n,a.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:1px;height:1px;",e.$el.chart.node().appendChild(a);const s=yt.getComputedStyle(a),o=parseFloat(s.opacity),l={opacity:Number.isFinite(o)?o:void 0,transform:s.transform||void 0};return a.remove(),this.backgroundClassStyleCache.set(n,l),l}drawBackground(e){const n=e.config.background;if(!(n!=null&&n.imgUrl)&&!(n!=null&&n.color))return;const{ctx:r,painter:a}=this,{current:s,margin:o,width:l,height:c}=e.state,u=this.getBackgroundClassStyle(e,n.class);a.withState(()=>{if(u.opacity!==void 0&&(r.globalAlpha*=u.opacity),n.imgUrl){const f=this.getBackgroundImage(n.imgUrl,e);if(f!=null&&f.loaded){const d=Xb(e),h=Hb(f.image,s.width,s.height);r.translate(d.x,d.y),qd(r,u.transform),r.drawImage(f.image,h.x,h.y,h.w,h.h)}}else n.color&&(qd(r,u.transform),a.fillRect({x:o.left,y:o.top,w:l,h:c},{fill:n.color}))})}drawLabelImage(e,n,r,a,s){const o=db(e,n);if(!(o!=null&&o.url))return{x:a,y:s};const l=hb(o,n),c=gb(e,o,r,a,s,n),u=this.getLabelImage(l,e);return u!=null&&u.loaded&&this.ctx.drawImage(u.image,c.x,c.y,o.width,o.height),{x:c.textX,y:c.textY}}drawDataLabel(e,n,r,a,s){const{painter:o,theme:{style:l}}=this;if({x:a,y:s}=this.drawLabelImage(e,n,r,a,s),e.config.data_labels.rotate){const c=xb(e,n,a,s);a=c.x,s=c.y,this.ctx.textAlign=c.textAlign}this.ctx.fillStyle=Ud(e,n,l.label.color),Wd(e,o,n,r,a,s),o.textLines(r,a,s,{angle:e.config.data_labels.rotate})}drawFocusLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:a,theme:{style:s}}=this,o=n.filter(c=>c&&gn(e,c)&&mr(e,c)&&Mr(e,{id:c.id})),l={size:()=>o.length};o.length&&(a.font=s.label.font,o.forEach(c=>{const u=ql(e,c);let{x:f,y:d}=T(e,c);u&&({x:f,y:d}=Gd(e,a,c,f,d),f+=ci(e,c,"x",l),d+=ci(e,c,"y",l),ln(f,d)&&this.drawDataLabel(e,c,u,f,d))}))}draw(e,n,r){var a,s,o,l,c;const u=(a=e.getCanvasTypeParts)==null?void 0:a.call(e).find(x=>x.exclusive);if(u){(s=u.draw)==null||s.call(e,this,n,r);return}if(e.state.customType){(c=(l=(o=e.getCustomTypeParts())==null?void 0:o.canvas)==null?void 0:l.draw)==null||c.call(e,this);return}const{margin:f,width:d,height:h}=e.state,v=()=>{e.config.area_front||this.drawAreas(e,n,r),this.drawLines(e,n),e.config.area_front&&this.drawAreas(e,n,r),this.drawCircles(e,n,r)},b=()=>{var x,E,w;e.config.bar_front||this.drawBars(e,n,r),this.drawCandlesticks(e,n,r),(x=e.getAxisTypeParts)==null||x.call(e).forEach(N=>{var k,B;return(B=(k=N.canvas)==null?void 0:k.draw)==null?void 0:B.call(e,this,n)}),v(),e.config.bar_front&&this.drawBars(e,n,r),(w=(E=e.getCanvasFeature)==null?void 0:E.call(e,"selection"))==null||w.draw.call(e,this,n),this.drawLabels(e,n)};e.config.clipPath===!1?b():this.painter.clipRect({x:f.left,y:f.top,w:d,h},b)}drawBars(e,n,r){const{ctx:a,painter:s,theme:{style:o}}=this,l=_n.bind(null,e),c=tc(e,r,_n),u=e.filterTargetsToShow().filter(l).filter(Mr.bind(null,e)),f=e.generateGetBarPoints(Pn(e,n,ne.BAR,l),!1),{margin:d}=e.state,h=pt(e),v=h?mt(e):new Set;f&&s.withTranslation(d.left,d.top,()=>{var b;for(const x of u){const E=pr(e,x),w=Kb(e,x.id),N=ir(e,x),k=[],B=[];for(let G=E.start;G<E.end;G++){const V=x.values[G];if(!gn(e,V))continue;const Z=ns(e,f,V,G);if(!Z)continue;const{points:Y,rect:et}=Z,it=wt(e,V,Y,h,v,(b=e.isStackingRadiusData)==null?void 0:b.bind(e));B.push({d:V,points:Y,rect:et,radiusInfo:it}),w&&k.push(Zb(e,Y,it))}w&&o.shape.barConnectLineWidth>0&&Jb(e,s,w,k,N);for(const{d:G,rect:V,radiusInfo:Z}of B){const Y=ss(e,ic(r,G)),et=Y||e.color(x.id),at=(c(G)?o.shape.barExpandedOpacity:o.shape.barOpacity)*N;a.fillStyle=Y?et:ih(e,a,x,"bar",V,et),h?s.fillRoundRect(V,Z.corners,{alpha:at}):s.fillRect(V,{alpha:at}),o.shape.barLineWidth>0&&(a.strokeStyle=o.shape.barStrokeColor,a.lineWidth=o.shape.barLineWidth,h?s.strokeRoundRect(V,Z.corners,{alpha:o.shape.barOpacity*N}):s.strokeRect(V,{alpha:o.shape.barOpacity*N}))}}})}drawCandlesticks(e,n,r){var a;const{ctx:s,painter:o,theme:{style:l}}=this,c=zn.bind(null,e),u=tc(e,r,zn),f=e.filterTargetsToShow().filter(c).filter(Mr.bind(null,e)),d=(a=e.generateGetCandlestickPoints)==null?void 0:a.call(e,Pn(e,n,ne.CANDLESTICK,c),!1),{margin:h}=e.state;d&&o.withTranslation(h.left,h.top,()=>{var v;s.lineWidth=l.shape.candlestickLineWidth;for(const b of f){const x=pr(e,b),E=ir(e,b),w=l.shape.candlestickLineWidth,N=l.shape.candlestickStrokeColor||"#000";for(let k=x.start;k<x.end;k++){const B=b.values[k],G=(v=e.getCandlestickData)==null?void 0:v.call(e,B);if(!G)continue;const V=rs(e,d,B,k);if(!V)continue;const{body:Z,wickStart:Y,wickEnd:et}=V;s.fillStyle=ss(e,ic(r,B))||sh(e,B,G),s.strokeStyle=N,s.globalAlpha=E,w>0&&o.strokePath(()=>{o.traceLine(Y[0],Y[1],et[0],et[1])}),o.fillRect(Z,{alpha:(u(B)?l.shape.candlestickExpandedOpacity:1)*E}),w>0&&o.strokeRect(Z,{alpha:E,lineWidth:w,stroke:N})}}s.globalAlpha=1})}hasExpandedShapeFocus(e,n){const r=_n.bind(null,e);let a;return!!(n!=null&&n.some(s=>{if(!s)return!1;if(zn(e,s))return!0;if(!r(s))return!1;a=a||e.generateGetBarPoints(Pn(e,e.state.canvasShape||{indices:{}},ne.BAR,r),!1);const o=a==null?void 0:a(s,s.index);if(!o)return!0;const l=y(e,o,0);return(e.config.axis_rotated?l.h:l.w)>=1}))}drawLines(e,n){const{ctx:r,painter:a,theme:{style:s}}=this,o=li.bind(null,e),l=e.filterTargetsToShow().filter(o).filter(Mr.bind(null,e)),c=Pn(e,n,ne.LINE,o),{margin:u}=e.state;e.generateGetLinePoints&&a.withTranslation(u.left,u.top,()=>{var f;for(const d of l){const h=nh(e,d);h.values.some(gn.bind(null,e))&&(r.globalAlpha=ir(e,d),r.lineWidth=ah(e,d)?s.shape.lineFocusedWidth:s.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?t1(e,h,a):th(e,h,c,a))}r.globalAlpha=1})}drawAreas(e,n,r){const{ctx:a,painter:s,theme:{style:o}}=this,l=es.bind(null,e),c=e.filterTargetsToShow().filter(l).filter(Mr.bind(null,e)),u=Pn(e,n,ne.AREA,l),{margin:f}=e.state;e.generateGetAreaPoints&&s.withTranslation(f.left,f.top,()=>{for(const d of c){const h=nh(e,d);if(!h.values.some(gn.bind(null,e)))continue;const v=Vb(e,h,r);a.globalAlpha=o.shape.areaOpacity*ir(e,d),a.fillStyle=ih(e,a,h,"area",e.config.area_linearGradient?jb(e,d,u):null,v),eh(e,h,u,s)}a.globalAlpha=1})}drawCircles(e,n,r){var a;if(!e.config.point_show||(a=e.isPointFocusOnly)!=null&&a.call(e))return;const{ctx:s,painter:o,theme:{style:l}}=this,{cx:c,cy:u}=n.pos,{margin:f}=e.state,d=tc(e,r,mr),h=!!(r!=null&&r.some(v=>v&&mr(e,v)));!c||!u||o.withTranslation(f.left,f.top,()=>{var v,b,x;for(const E of e.filterTargetsToShow()){if(!mr(e,E)||!Mr(e,E)||li(e,E)&&!_b(e,E))continue;const w=e.color(E.id),N=sc(e,E),k=ir(e,E),B=!!e.config.point_radialGradient,G=Yb(e,E,N,B),V=pr(e,E),Z=V.end-V.start,Y=G?$d(e.state.width,e.state.height,os(e,E,E.values[V.start]||E.values[0])):null,et=ho(e,E)*k;s.fillStyle=w,s.globalAlpha=et;const it=l.shape.pointFillColor||w,at=l.shape.pointStrokeColor||w,ot=at?(v=l.shape.pointLineWidth)!=null?v:1:0,st=!!at&&ot>0,_=st&&N==="circle"&&D(et)&&et<1&&it===at;if(!h&&!B&&N==="circle")if(s.fillStyle=it,st&&!_&&(s.strokeStyle=at,s.lineWidth=ot),Z>Gb)for(let lt=V.start;lt<V.end;lt++){const nt=E.values[lt];if(!gn(e,nt))continue;const dt=os(e,E,nt),bt=_?dt+ot/2:dt,At=c(nt,lt),Et=u(nt,lt);ln(At,Et)&&(Y&&!Bd(Y,At,Et)||(s.beginPath(),s.arc(At,Et,bt,0,Math.PI*2),s.fill(),st&&!_&&s.stroke()))}else{s.beginPath();for(let lt=V.start;lt<V.end;lt++){const nt=E.values[lt];if(!gn(e,nt))continue;const dt=os(e,E,nt),bt=_?dt+ot/2:dt,At=c(nt,lt),Et=u(nt,lt);ln(At,Et)&&o.traceCircle(At,Et,bt)}s.fill(),st&&!_&&s.stroke()}else for(let lt=V.start;lt<V.end;lt++){const nt=E.values[lt];if(!gn(e,nt))continue;const dt=d(nt),bt=os(e,E,nt),At=dt?(x=(b=e.pointExpandedR)==null?void 0:b.call(e,nt))!=null?x:bt*1.75:bt,Et=c(nt,lt),Rt=u(nt,lt),Vt=ss(e,nt),ae=Vt||w,re=l.shape.pointFillColor||ae,ve=l.shape.pointStrokeColor||ae,xe=dt&&(Vt||l.focusPoint.fill)||re,ge=dt?Vt||l.focusPoint.stroke||ae:ve,Le=dt?l.focusPoint.lineWidth:ot,Yt=ho(e,nt)*k,pe=!!ge&&(Le!=null?Le:0)>0,be=N==="circle"&&pe&&D(Yt)&&Yt<1&&xe===ge,Gt=be?At+(Le||0)/2:At;ln(Et,Rt)&&(s.fillStyle=B?Qb(e,s,nt,Et,Rt,At,ae):xe,s.globalAlpha=Yt,is(o,N,Et,Rt,Gt,pe&&!be?{fill:s.fillStyle,stroke:ge,lineWidth:Le}:void 0,bt))}}})}drawLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:a,painter:s,theme:{style:o}}=this,{margin:l}=e.state,{cx:c,cy:u}=n.pos,f=n.indices[ne.BAR]?e.generateGetBarPoints(n.indices[ne.BAR],!1):null,d=e.generateGetCandlestickPoints?e.generateGetCandlestickPoints(Pn(e,n,ne.CANDLESTICK,zn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(E=>(_n(e,E)||mr(e,E)||es(e,E)||zn(e,E))&&Mr(e,E)),v=[];let b=0;h.forEach(E=>{const w=pr(e,E),N=e.labelishData(E),k=[];for(let B=0;B<N.length;B++){const G=N[B],V=ql(e,G);V&&G.index>=w.start&&G.index<w.end&&gn(e,G)&&k.push({d:G,text:V})}b+=k.length,k.length&&v.push(k)});const x={size:()=>b};s.withTranslation(l.left,l.top,()=>{a.font=o.label.font,a.textAlign="center",v.forEach(E=>{var w,N;for(const{d:k,text:B}of E){let G,V;if(_n(e,k)&&f){const Z=ns(e,f,k,k.index);if(!Z)continue;const{points:Y,rect:et}=Z,it=e.getBaseValue(k),at=m(e,Y[2]),ot=it<0,st=ec(a,B,0,0).h;G=e.config.axis_rotated&&!e.config.data_labels.centered?at[0]+(ot?-4:4):et.x+et.w/2,V=e.config.data_labels.centered||e.config.axis_rotated?et.y+et.h/2:at[1]+(ot?st-3:-3),a.textAlign=e.config.axis_rotated&&!e.config.data_labels.centered?ot?"right":"left":"center",a.textBaseline=e.config.data_labels.centered||e.config.axis_rotated?"middle":"alphabetic"}else if(zn(e,k)&&d){const Z=(w=e.getCandlestickData)==null?void 0:w.call(e,k),Y=rs(e,d,k,k.index),et=Z==null?void 0:Z._isUp;if(!Y)continue;const{wickEnd:it,wickStart:at}=Y,ot=e.config[`axis_${(N=e.axis)==null?void 0:N.getId(k.id)}_inverted`];G=e.config.axis_rotated?et?it[0]+4:at[0]-4:at[0],V=e.config.axis_rotated?at[1]+3:et?it[1]-3:at[1]+12,!e.config.axis_rotated&&ot&&(V+=15*(et?1:-1)),a.textAlign=e.config.axis_rotated?et?"left":"right":"center",a.textBaseline="alphabetic"}else c&&u&&({x:G,y:V}=A(n.pos,k,k.index),{x:G,y:V}=Gd(e,a,k,G,V));G+=ci(e,k,"x",x),V+=ci(e,k,"y",x),ln(G,V)&&this.drawDataLabel(e,k,B,G,V)}})})}drawEmptyLabel(e){const n=e.config.data_empty_label_text,r=e.filterTargetsToShow();if(!n||r.length)return;const{margin:a,width:s,height:o}=e.state,{style:l}=this.theme;this.painter.text(String(n),a.left+s/2,a.top+o/2,{fill:l.emptyLabel.color,font:l.emptyLabel.font,textAlign:"center",textBaseline:"middle"})}drawZoomBrush(e,n,r){const{axis_rotated:a}=e.config,{height:s,margin:o,width:l}=e.state,c=Math.min(n,r),u=Math.abs(r-n),f=a?{x:o.left,y:o.top+c,w:l,h:u}:{x:o.left+c,y:o.top,w:u,h:s};u<=0||this.painter.fillRect(f,{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawFocus(e,n){var r,a;if(!(n!=null&&n.length)||e.state.customType)return;const{painter:s}=this,{style:o}=this.theme,{margin:l}=e.state,c=n.find(u=>u&&gn(e,u));e.config.subchart_grid_focus!==!1&&!O(e)&&((a=(r=e.getCanvasFeature)==null?void 0:r.call(e,"subchart"))==null||a.drawFocus.call(e,this,n)),s.withTranslation(l.left,l.top,()=>{if(e.config.tooltip_show&&e.config.grid_focus_show!==!1&&!e.config.axis_tooltip&&c){const{x:u,y:f}=T(e,c),d=o.axis.lineWidth,h=e.config.axis_rotated,v=Number.isFinite(h?f:u),b=Number.isFinite(h?u:f),x=G=>s.crisp(l.left+G,d)-l.left,E=G=>s.crisp(l.top+G,d)-l.top,w=e.config.grid_focus_edge&&!e.config.tooltip_grouped,N=O(e),k=N?e.state.margin2.left-l.left+e.state.width2:e.state.width,B=N?e.state.margin2.top-l.top+e.state.height2:e.state.height;v&&s.strokePath(()=>{var G,V;if(h){if(s.traceLine(x(0),f,w&&b?u:x(k),f),b&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const Z=((G=e.axis)==null?void 0:G.getId(c.id))==="y2";s.traceLine(u,w&&!Z?f:E(0),u,w&&Z?f:E(e.state.height))}}else if(s.traceLine(u,w&&b?f:E(0),u,E(B)),b&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const Z=((V=e.axis)==null?void 0:V.getId(c.id))==="y2";s.traceLine(w&&Z?u:x(0),f,w&&!Z?u:x(e.state.width),f)}},{lineDash:o.focusGrid.dashArray,lineWidth:o.focusGrid.lineWidth,stroke:o.focusGrid.lineColor})}e.config.point_show&&!e.state.canvasFocusMainRedraw&&n.filter(u=>u&&gn(e,u)&&mr(e,u)&&Mr(e,{id:u.id})).forEach(u=>{var f,d,h,v;const b=sc(e,{id:u.id}),{x,y:E}=T(e,u),w=(d=(f=e.pointR)==null?void 0:f.call(e,u))!=null?d:2.5,N=(v=(h=e.pointExpandedR)==null?void 0:h.call(e,u))!=null?v:w*1.75,k=ss(e,u),B=k||e.color(u.id),G=k||o.focusPoint.fill||o.shape.pointFillColor||B,V=k||o.focusPoint.stroke||B,Z=o.focusPoint.lineWidth,Y=ho(e,u),et=!!V&&(Z!=null?Z:0)>0,it=b==="circle"&&et&&D(Y)&&Y<1&&G===V;ln(x,E)&&is(s,b,x,E,it?N+(Z||0)/2:N,et&&!it?{fill:G,lineWidth:Z,stroke:V,alpha:Y}:{fill:G,alpha:Y},w)}),this.drawFocusLabels(e,n)})}}const n1={section:"boxplot",probe({probeIn:t,toColor:e,toNumber:n}){const r=t("bb-chart-boxplot","path","bb-boxplot-box",["stroke","stroke-width","fill-opacity"]),a=t("bb-chart-boxplot","path","bb-boxplot-whisker",["stroke-width"]),s=t("bb-chart-boxplot","path","bb-boxplot-median",["stroke-width"]),o=t("bb-chart-boxplot","path","bb-boxplot-outlier",["stroke-width"]),l=t("bb-chart-boxplot","path","bb-boxplot-mean",["fill"]);return{stroke:e(r.stroke,"#000"),boxLineWidth:n(r["stroke-width"],1),boxOpacity:n(r["fill-opacity"],.7),whiskerLineWidth:n(a["stroke-width"],1),medianLineWidth:n(s["stroke-width"],2),outlierLineWidth:n(o["stroke-width"],1),meanFill:e(l.fill,"#fff")}},selectors:{".bb-boxplot-box":(t,{readColorValue:e,readNumberValue:n})=>({stroke:e(t,"stroke"),boxLineWidth:n(t,"stroke-width"),boxOpacity:n(t,"fill-opacity")}),".bb-boxplot-whisker":(t,{readNumberValue:e})=>({whiskerLineWidth:e(t,"stroke-width")}),".bb-boxplot-median":(t,{readNumberValue:e})=>({medianLineWidth:e(t,"stroke-width")}),".bb-boxplot-outlier":(t,{readNumberValue:e})=>({outlierLineWidth:e(t,"stroke-width")}),".bb-boxplot-mean":(t,{readColorValue:e})=>({meanFill:e(t,"fill")})}};function oh(t,e,n,r){const a=e(n,r);if(!a)return null;const[[s,o],[l,c],[u,f,d],[h],v,b]=a,x=(N,k)=>m(t,[N,k]),E=(l-s)*t.config.boxplot_whisker_width/2,w=t.config.boxplot_mean_r;return{box:y(t,[[s,o],[l,c]]),median:[x(s,h),x(l,h)],whisker:[[x(u,d),x(u,c)],[x(u,o),x(u,f)],...E>0?[[x(u-E,d),x(u+E,d)],[x(u-E,f),x(u+E,f)]]:[]],outliers:v.map(N=>x(u,N)),mean:b.map(N=>[x(u-w,N),x(u,N-w),x(u+w,N),x(u,N+w)])}}var r1={theme:n1,draw(t,e){const n=this,{ctx:r,painter:a,theme:{style:{boxplot:s}}}=t,{margin:o}=n.state,l=n.config.boxplot_outlier_r,c=n.isBoxplotType.bind(n),u=n.generateGetBoxplotPoints(Pn(n,e,"boxplot",c),!1);a.withTranslation(o.left,o.top,()=>{n.filterTargetsToShow().filter(c).filter(f=>Mr(n,f)).forEach(f=>{const d=pr(n,f),h=ir(n,f);for(let v=d.start;v<d.end;v++){const b=f.values[v],x=oh(n,u,b,v);if(!x)continue;const E=s.stroke;r.strokeStyle=E,r.globalAlpha=h,s.whiskerLineWidth>0&&a.strokePath(()=>{x.whisker.forEach(([k,B])=>a.traceLine(k[0],k[1],B[0],B[1]))},{lineWidth:s.whiskerLineWidth,stroke:E,alpha:h}),a.fillRect(x.box,{fill:n.color(b),alpha:s.boxOpacity*h}),s.boxLineWidth>0&&a.strokeRect(x.box,{stroke:E,lineWidth:s.boxLineWidth,alpha:h});const[w,N]=x.median;a.strokePath(()=>a.traceLine(w[0],w[1],N[0],N[1]),{lineWidth:s.medianLineWidth,stroke:E,alpha:h}),x.outliers.length&&a.strokePath(()=>{x.outliers.forEach(([k,B])=>{r.moveTo(k+l,B),r.arc(k,B,l,0,Math.PI*2)})},{lineWidth:s.outlierLineWidth,stroke:E,alpha:h}),x.mean.forEach(([k,B,G,V])=>{r.beginPath(),r.moveTo(k[0],k[1]),[B,G,V].forEach(Z=>r.lineTo(Z[0],Z[1])),r.closePath(),r.globalAlpha=h,r.fillStyle=s.meanFill,r.fill(),r.strokeStyle=E,r.lineWidth=s.boxLineWidth,r.stroke()})}r.globalAlpha=1})})},hits(t,{shape:e,targets:n,margin:r,addIndex:a}){const s=this,o=s.isBoxplotType.bind(s),l=s.generateGetBoxplotPoints(Pn(s,e,"boxplot",o),!1);n.filter(o).forEach(c=>{const u=pr(s,c);for(let f=u.start;f<u.end;f++){const d=c.values[f],h=oh(s,l,d,f);if(!h)continue;const{x:v,y:b,w:x,h:E}=h.box;t.addBar({x:r.left+v,y:r.top+b,w:x,h:E,data:d}),a(r.left+v+x/2,r.top+b+E/2,d)}})}};function a1(t,e,n){const{scale:r,ticks:a,format:s,rotated:o,x:l,y:c}=e,[u,f]=r.range(),d=6,h={fill:n.axisColor,font:n.axisFont,textAlign:o?"right":"center",textBaseline:o?"middle":"top"};t.withTranslation(l,c,()=>{t.strokePath(()=>{o?t.traceLine(0,u,0,f):t.traceLine(u,0,f,0),a.forEach(v=>{const b=r(v);o?t.traceLine(0,b,-d,b):t.traceLine(b,0,b,d)})},{stroke:n.axisColor,lineWidth:1}),a.forEach(v=>{const b=r(v);o?t.text(s(v),-(d+3),b,h):t.text(s(v),b,d+3,h)})})}var i1={theme:{section:"bullet",probe({probeIn:t,probeInNested:e,axisFont:n,toColor:r,toNumber:a}){const s=t("bb-chart-bullets","line","bb-bullet-target",["stroke","stroke-width"]),o=t("bb-chart-bullets","text","bb-bullet-title",["fill","font"]),l=t("bb-chart-bullets","rect","bb-bullet-range",["--bb-bullet-range-min","--bb-bullet-range-max"]),c=e("bb-chart-bullets","bb-bullet-axis","text","",["fill","font"]);return{targetStroke:r(s.stroke,"#000"),targetLineWidth:a(s["stroke-width"],2),rangeMin:a(l["--bb-bullet-range-min"],55),rangeMax:a(l["--bb-bullet-range-max"],90),axisFont:c.font||n,axisColor:r(c.fill,"#000"),titleFont:o.font||c.font||n,titleColor:r(o.fill,"#000")}},selectors:{".bb-chart-bullets .bb-bullet-target":(t,{readColorValue:e,readNumberValue:n})=>({targetStroke:e(t,"stroke"),targetLineWidth:n(t,"stroke-width")}),".bb-bullet-target":(t,{readColorValue:e,readNumberValue:n})=>({targetStroke:e(t,"stroke"),targetLineWidth:n(t,"stroke-width")}),".bb-chart-bullets .bb-bullet-axis text":(t,{readColorValue:e,readFontValue:n})=>({axisColor:e(t,"fill"),axisFont:n(t)}),".bb-bullet-axis text":(t,{readColorValue:e,readFontValue:n})=>({axisColor:e(t,"fill"),axisFont:n(t)}),".bb-chart-bullets .bb-bullet-title":(t,{readColorValue:e,readFontValue:n})=>({titleColor:e(t,"fill"),titleFont:n(t)}),".bb-bullet-title":(t,{readColorValue:e,readFontValue:n})=>({titleColor:e(t,"fill"),titleFont:n(t)})},normalize(t,{toNumber:e}){t.targetLineWidth=e(t.targetLineWidth,2)}},draw(t){const e=this,{ctx:n,painter:r,theme:{style:a}}=t,{bullet:s}=a,{config:o}=e,l=e.getBulletLayout(),c=e.hasDataLabel()&&o.bullet_label_show?new Map(e.data.targets.filter(e.isBulletType,e).map(f=>[f.id,f.values[f.values.length-1]])):null,u={size:()=>l.rows.length};for(const f of l.rows){if(!e.isTargetToShow(f.id))continue;const{area:d,offset:h,ranges:v,isDot:b,measure:x,color:E,targets:w,axis:N,label:k,title:B}=e.getBulletRowGeometry(f,l);r.withState(()=>{n.globalAlpha=ir(e,f),n.translate(d.left+h.x,d.top+h.y),v.forEach(({x:Z,y:Y,width:et,height:it,fill:at,t:ot})=>{r.fillRect({x:Z,y:Y,w:et,h:it},{fill:at!=null?at:`hsl(0, 0%, ${s.rangeMin+ot*(s.rangeMax-s.rangeMin)}%)`})}),b?r.fillPath(()=>r.traceCircle(x.cx,x.cy,x.r),{fill:E}):r.fillRect({x:x.x,y:x.y,w:x.width,h:x.height},{fill:E}),w.forEach(Z=>{r.strokePath(()=>r.traceLine(Z.x1,Z.y1,Z.x2,Z.y2),{stroke:s.targetStroke,lineWidth:s.targetLineWidth})}),N&&a1(r,N,s),B&&r.text(B.text,B.x,B.y,{fill:s.titleColor,font:s.titleFont,textAlign:B.anchor==="end"?"right":"center",textBaseline:B.anchor==="end"?"middle":"alphabetic"});const G=c==null?void 0:c.get(f.id),V=G&&(D(G.value)||G.value)?ql(e,G):null;if(V){const Z=o.data_labels.centered,Y=Z?k.center:k,et=o.bullet_rotated;n.font=a.label.font,n.textAlign=Z||et?"center":"left",n.textBaseline=Z||!et?"middle":"alphabetic",t.drawDataLabel(e,G,V,Y.x+ci(e,G,"x",u),Y.y+ci(e,G,"y",u))}})}},hits(t){const e=this,n=e.getBulletLayout(),r=4;n.rows.forEach(a=>{if(!e.isTargetToShow(a.id))return;const{area:s,offset:o,isDot:l,measure:c,targets:u}=e.getBulletRowGeometry(a,n),f=s.left+o.x,d=s.top+o.y,h=l?{x:c.cx-c.r,y:c.cy-c.r,w:c.r*2,h:c.r*2}:{x:c.x,y:c.y,w:c.width,h:c.height};t.addBar({x:f+h.x,y:d+h.y,w:h.w,h:h.h,data:a}),u.forEach(v=>{t.addBar({x:f+Math.min(v.x1,v.x2)-r,y:d+Math.min(v.y1,v.y2)-r,w:Math.abs(v.x2-v.x1)+r*2,h:Math.abs(v.y2-v.y1)+r*2,data:a})})})}};const s1=1e5;function o1(){var t,e,n;return(n=(e=(t=yt.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function lh(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function l1(t,e,n,r=!1){return t.slice(0,2).map((a,s)=>{const o=r?Math.exp(Math.log(+a)+(Math.log(+e[s])-Math.log(+a))*n):+a+(+e[s]-+a)*n;return a instanceof Date||e[s]instanceof Date?new Date(o):o})}function c1(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function u1(t){const{scale:e}=t,n=t.filterTargetsToShow(t.data.targets);["y","y2"].forEach(r=>{var a;(a=e[r])==null||a.domain(t.getYDomain(n,r))}),t.withSubchartTypeContext(()=>{var r,a;(r=e.subY)==null||r.domain(t.getYDomain(n,"y")),(a=e.subY2)==null||a.domain(t.getYDomain(n,"y2"))})}var f1={updateCanvasFlowFocus(){var t;const e=this,{state:n}=e;n.canvasFocusKey=null,((t=e.$el.tooltip)==null?void 0:t.style("display"))==="block"&&n.event&&e.onCanvasMouseMove(n.event)},flushCanvasFlow(){var t,e;const{state:n}=this;n.canvasFlowFinish&&(n.canvasFlowFrame!==null&&((e=(t=yt).cancelAnimationFrame)==null||e.call(t,n.canvasFlowFrame)),n.canvasFlowFrame=null,n.canvasFlowFinish())},animateCanvasFlow(t){var e,n,r,a,s,o,l,c,u,f;const d=this,{axis:h,data:v,org:b,scale:x,state:E}=d,{done:w=()=>{},duration:N,length:k,orgDataCount:B}=t,G=(e=yt.requestAnimationFrame)==null?void 0:e.bind(yt),V=!!((n=h.isLog)!=null&&n.call(h,"x"));if(!G||!N||!k||!B||c1(d)>s1)return!1;const Z=x.x.domain().slice(0,2),Y=(a=(r=b.xDomain)==null?void 0:r.slice)==null?void 0:a.call(r),et=(c=(o=(s=x.subX)==null?void 0:s.domain)==null?void 0:(l=o.call(s)).slice)==null?void 0:c.call(l),it=E.canvasFocusKey?E.canvasFocusData:null;if(!lh(Z,V))return!1;const at=v.targets.map(bt=>bt.values.splice(0,k));d.updateXDomain(d.filterTargetsToShow(v.targets),!0,!0);const ot=x.x.domain().slice(0,2),st=(f=(u=b.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(v.targets.forEach((bt,At)=>{bt.values.unshift(...at[At])}),!lh(ot,V))return Y&&(b.xDomain=Y),x.x.domain(Z),et&&x.subX.domain(et),h.x.scale(x.x),!1;u1(d);let _=!1;const lt=o1(),nt=()=>{var bt,At;_||(_=!0,v.targets.forEach(Et=>{Et.values.splice(0,k)}),st&&(b.xDomain=st),x.x.domain(ot),(At=(bt=x.subX)==null?void 0:bt.domain)==null||At.call(bt,st!=null?st:ot),h.x.scale(x.x),E.dirty.data=!0,E._eventRectFingerprint=null,E.canvasShape=null,E._cachedDrawShape=null,d.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),d.updateTypesElements(),E.canvasFlowFrame=null,E.canvasFlowFinish=null,E.flowing=!1,d.updateCanvasFlowFocus(),w.call(d.api))},dt=bt=>{const At=Math.min(1,Math.max(0,(bt-lt)/N)),Et=l1(Z,ot,At,V);x.x.domain(Et),h.x.scale(x.x),E.canvasShape=null,E._cachedDrawShape=null,E._canvasVisibleRangeCache=null,E._canvasXTickValuesCache=null,d.renderCanvasFrame(void 0,it,!1),At<1?E.canvasFlowFrame=G(dt):nt()};return Y&&(b.xDomain=Y),x.x.domain(Z),et&&x.subX.domain(et),h.x.scale(x.x),E.flowing=!0,E.cancelClick=!0,E.canvasFlowFinish=nt,E.canvasFlowFrame=G(dt),!0}};class ch extends Map{constructor(e,n=dh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,a]of e)this.set(r,a)}get(e){return super.get(oc(this,e))}has(e){return super.has(oc(this,e))}set(e,n){return super.set(uh(this,e),n)}delete(e){return super.delete(fh(this,e))}}class N3 extends Set{constructor(e,n=dh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(oc(this,e))}add(e){return super.add(uh(this,e))}delete(e){return super.delete(fh(this,e))}}function oc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function uh({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function fh({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function dh(t){return t!==null&&typeof t=="object"?t.valueOf():t}function d1(t,e,n){t=+t,e=+e,n=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((e-t)/n))|0,s=new Array(a);++r<a;)s[r]=t+r*n;return s}function yr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function h1(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function lc(t){let e,n,r;t.length!==2?(e=yr,n=(l,c)=>yr(t(l),c),r=(l,c)=>t(l)-c):(e=t===yr||t===h1?t:g1,n=t,r=t);function a(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){const d=a(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:a,center:o,right:s}}function g1(){return 0}function go(t){return t===null?NaN:+t}function*v1(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const hh=lc(yr),p1=hh.right,$3=hh.left,B3=lc(go).center;var ls=p1;const m1=Math.sqrt(50),y1=Math.sqrt(10),x1=Math.sqrt(2);function vo(t,e,n){const r=(e-t)/Math.max(0,n),a=Math.floor(Math.log10(r)),s=r/Math.pow(10,a),o=s>=m1?10:s>=y1?5:s>=x1?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/o,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,a)*o,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=n&&n<2?vo(t,e,n*2):[l,c,u]}function cc(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[a,s,o]=r?vo(e,t,n):vo(t,e,n);if(!(s>=a))return[];const l=s-a+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(s-u)/-o;else for(let u=0;u<l;++u)c[u]=(s-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(a+u)/-o;else for(let u=0;u<l;++u)c[u]=(a+u)*o;return c}function uc(t,e,n){return e=+e,t=+t,n=+n,vo(t,e,n)[2]}function fc(t,e,n){e=+e,t=+t,n=+n;const r=e<t,a=r?uc(e,t,n):uc(t,e,n);return(r?-1:1)*(a<0?1/-a:a)}function gh(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n<a||n===void 0&&a>=a)&&(n=a)}return n}function b1(t,e){let n,r=-1,a=-1;if(e===void 0)for(const s of t)++a,s!=null&&(n<s||n===void 0&&s>=s)&&(n=s,r=a);else for(let s of t)(s=e(s,++a,t))!=null&&(n<s||n===void 0&&s>=s)&&(n=s,r=a);return r}function vh(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}function T1(t,e){let n,r=-1,a=-1;if(e===void 0)for(const s of t)++a,s!=null&&(n>s||n===void 0&&s>=s)&&(n=s,r=a);else for(let s of t)(s=e(s,++a,t))!=null&&(n>s||n===void 0&&s>=s)&&(n=s,r=a);return r}function S1(t,e){return Array.from(e,n=>t[n])}function k3(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(a,s)=>s);return e.length>1?(e=e.map(a=>t.map(a)),r.sort((a,s)=>{for(const o of e){const l=cs(o[a],o[s]);if(l)return l}})):(n=t.map(n),r.sort((a,s)=>cs(n[a],n[s]))),S1(t,r)}return t.sort(ph(n))}function ph(t=yr){if(t===yr)return cs;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function cs(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function dc(t,e,n=0,r=1/0,a){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(a=a===void 0?cs:ph(a);r>n;){if(r-n>600){const c=r-n+1,u=e-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),v=Math.max(n,Math.floor(e-u*d/c+h)),b=Math.min(r,Math.floor(e+(c-u)*d/c+h));dc(t,e,v,b,a)}const s=t[e];let o=n,l=r;for(us(t,n,e),a(t[r],s)>0&&us(t,n,r);o<l;){for(us(t,o,l),++o,--l;a(t[o],s)<0;)++o;for(;a(t[l],s)>0;)--l}a(t[n],s)===0?us(t,n,l):(++l,us(t,l,r)),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function us(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function A1(t,e=yr){let n,r=!1;if(e.length===1){let a;for(const s of t){const o=e(s);(r?yr(o,a)>0:yr(o,o)===0)&&(n=s,a=o,r=!0)}}else for(const a of t)(r?e(a,n)>0:e(a,a)===0)&&(n=a,r=!0);return n}function E1(t,e,n){if(t=Float64Array.from(v1(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return vh(t);if(e>=1)return gh(t);var r,a=(r-1)*e,s=Math.floor(a),o=gh(dc(t,s).subarray(0,s+1)),l=vh(t.subarray(s+1));return o+(l-o)*(a-s)}}function C1(t,e,n=go){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,a=(r-1)*e,s=Math.floor(a),o=+n(t[s],s,t),l=+n(t[s+1],s+1,t);return o+(l-o)*(a-s)}}function z3(t,e,n=go){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(l,c)=>go(n(t[c],c,t))),e<=0)return T1(r);if(e>=1)return b1(r);var r,a=Uint32Array.from(t,(l,c)=>c),s=r.length-1,o=Math.floor(s*e);return dc(a,o,0,s,(l,c)=>cs(r[l],r[c])),o=A1(a.subarray(0,o+1),l=>r[l]),o>=0?o:-1}}function fi(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function fs(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ga(){}var La=.7,di=1/La,hi="\\s*([+-]?\\d+)\\s*",ds="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w1=/^#([0-9a-f]{3,8})$/,I1=new RegExp(`^rgb\\(${hi},${hi},${hi}\\)$`),R1=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),O1=new RegExp(`^rgba\\(${hi},${hi},${hi},${ds}\\)$`),P1=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${ds}\\)$`),M1=new RegExp(`^hsl\\(${ds},${Lr},${Lr}\\)$`),L1=new RegExp(`^hsla\\(${ds},${Lr},${Lr},${ds}\\)$`),mh={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};fi(ga,Da,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:yh,formatHex:yh,formatHex8:D1,formatHsl:F1,formatRgb:xh,toString:xh});function yh(){return this.rgb().formatHex()}function D1(){return this.rgb().formatHex8()}function F1(){return Eh(this).formatHsl()}function xh(){return this.rgb().formatRgb()}function Da(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=w1.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?bh(e):n===3?new Sn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?po(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?po(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=I1.exec(t))?new Sn(e[1],e[2],e[3],1):(e=R1.exec(t))?new Sn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=O1.exec(t))?po(e[1],e[2],e[3],e[4]):(e=P1.exec(t))?po(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=M1.exec(t))?Ah(e[1],e[2]/100,e[3]/100,1):(e=L1.exec(t))?Ah(e[1],e[2]/100,e[3]/100,e[4]):mh.hasOwnProperty(t)?bh(mh[t]):t==="transparent"?new Sn(NaN,NaN,NaN,0):null}function bh(t){return new Sn(t>>16&255,t>>8&255,t&255,1)}function po(t,e,n,r){return r<=0&&(t=e=n=NaN),new Sn(t,e,n,r)}function hc(t){return t instanceof ga||(t=Da(t)),t?(t=t.rgb(),new Sn(t.r,t.g,t.b,t.opacity)):new Sn}function mo(t,e,n,r){return arguments.length===1?hc(t):new Sn(t,e,n,r==null?1:r)}function Sn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}fi(Sn,mo,fs(ga,{brighter(t){return t=t==null?di:Math.pow(di,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?La:Math.pow(La,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Sn(Fa(this.r),Fa(this.g),Fa(this.b),yo(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:Th,formatHex:Th,formatHex8:N1,formatRgb:Sh,toString:Sh}));function Th(){return`#${Na(this.r)}${Na(this.g)}${Na(this.b)}`}function N1(){return`#${Na(this.r)}${Na(this.g)}${Na(this.b)}${Na((isNaN(this.opacity)?1:this.opacity)*255)}`}function Sh(){const t=yo(this.opacity);return`${t===1?"rgb(":"rgba("}${Fa(this.r)}, ${Fa(this.g)}, ${Fa(this.b)}${t===1?")":`, ${t})`}`}function yo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Fa(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Na(t){return t=Fa(t),(t<16?"0":"")+t.toString(16)}function Ah(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xr(t,e,n,r)}function Eh(t){if(t instanceof xr)return new xr(t.h,t.s,t.l,t.opacity);if(t instanceof ga||(t=Da(t)),!t)return new xr;if(t instanceof xr)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,l=s-a,c=(s+a)/2;return l?(e===s?o=(n-r)/l+(n<r)*6:n===s?o=(r-e)/l+2:o=(e-n)/l+4,l/=c<.5?s+a:2-s-a,o*=60):l=c>0&&c<1?0:o,new xr(o,l,c,t.opacity)}function gc(t,e,n,r){return arguments.length===1?Eh(t):new xr(t,e,n,r==null?1:r)}function xr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fi(xr,gc,fs(ga,{brighter(t){return t=t==null?di:Math.pow(di,t),new xr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?La:Math.pow(La,t),new xr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,a=2*n-r;return new Sn(vc(t>=240?t-240:t+120,a,r),vc(t,a,r),vc(t<120?t+240:t-120,a,r),this.opacity)},clamp(){return new xr(Ch(this.h),xo(this.s),xo(this.l),yo(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=yo(this.opacity);return`${t===1?"hsl(":"hsla("}${Ch(this.h)}, ${xo(this.s)*100}%, ${xo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ch(t){return t=(t||0)%360,t<0?t+360:t}function xo(t){return Math.max(0,Math.min(1,t||0))}function vc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const wh=Math.PI/180,Ih=180/Math.PI,bo=18,Rh=.96422,Oh=1,Ph=.82521,Mh=4/29,gi=6/29,Lh=3*gi*gi,$1=gi*gi*gi;function Dh(t){if(t instanceof br)return new br(t.l,t.a,t.b,t.opacity);if(t instanceof Dr)return Nh(t);t instanceof Sn||(t=hc(t));var e=bc(t.r),n=bc(t.g),r=bc(t.b),a=mc((.2225045*e+.7168786*n+.0606169*r)/Oh),s,o;return e===n&&n===r?s=o=a:(s=mc((.4360747*e+.3850649*n+.1430804*r)/Rh),o=mc((.0139322*e+.0971045*n+.7141733*r)/Ph)),new br(116*a-16,500*(s-a),200*(a-o),t.opacity)}function U3(t,e){return new br(t,0,0,e==null?1:e)}function pc(t,e,n,r){return arguments.length===1?Dh(t):new br(t,e,n,r==null?1:r)}function br(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}fi(br,pc,fs(ga,{brighter(t){return new br(this.l+bo*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new br(this.l-bo*(t==null?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Rh*yc(e),t=Oh*yc(t),n=Ph*yc(n),new Sn(xc(3.1338561*e-1.6168667*t-.4906146*n),xc(-.9787684*e+1.9161415*t+.033454*n),xc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function mc(t){return t>$1?Math.pow(t,.3333333333333333):t/Lh+Mh}function yc(t){return t>gi?t*t*t:Lh*(t-Mh)}function xc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,.4166666666666667)-.055)}function bc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Fh(t){if(t instanceof Dr)return new Dr(t.h,t.c,t.l,t.opacity);if(t instanceof br||(t=Dh(t)),t.a===0&&t.b===0)return new Dr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ih;return new Dr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function W3(t,e,n,r){return arguments.length===1?Fh(t):new Dr(n,e,t,r==null?1:r)}function Tc(t,e,n,r){return arguments.length===1?Fh(t):new Dr(t,e,n,r==null?1:r)}function Dr(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Nh(t){if(isNaN(t.h))return new br(t.l,0,0,t.opacity);var e=t.h*wh;return new br(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}fi(Dr,Tc,fs(ga,{brighter(t){return new Dr(this.h,this.c,this.l+bo*(t==null?1:t),this.opacity)},darker(t){return new Dr(this.h,this.c,this.l-bo*(t==null?1:t),this.opacity)},rgb(){return Nh(this).rgb()}}));var $h=-.14861,Sc=1.78277,Ac=-.29227,To=-.90649,hs=1.97294,Bh=hs*To,kh=hs*Sc,zh=Sc*Ac-To*$h;function B1(t){if(t instanceof $a)return new $a(t.h,t.s,t.l,t.opacity);t instanceof Sn||(t=hc(t));var e=t.r/255,n=t.g/255,r=t.b/255,a=(zh*r+Bh*e-kh*n)/(zh+Bh-kh),s=r-a,o=(hs*(n-a)-Ac*s)/To,l=Math.sqrt(o*o+s*s)/(hs*a*(1-a)),c=l?Math.atan2(o,s)*Ih-120:NaN;return new $a(c<0?c+360:c,l,a,t.opacity)}function Ec(t,e,n,r){return arguments.length===1?B1(t):new $a(t,e,n,r==null?1:r)}function $a(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fi($a,Ec,fs(ga,{brighter(t){return t=t==null?di:Math.pow(di,t),new $a(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?La:Math.pow(La,t),new $a(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*wh,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),a=Math.sin(t);return new Sn(255*(e+n*($h*r+Sc*a)),255*(e+n*(Ac*r+To*a)),255*(e+n*(hs*r)),this.opacity)}}));function Uh(t,e,n,r,a){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*r+o*a)/6}function k1(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[r],s=t[r+1],o=r>0?t[r-1]:2*a-s,l=r<e-1?t[r+2]:2*s-a;return Uh((n-r/e)*e,o,a,s,l)}}function z1(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),a=t[(r+e-1)%e],s=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return Uh((n-r/e)*e,a,s,o,l)}}var So=t=>()=>t;function Wh(t,e){return function(n){return t+n*e}}function U1(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Ao(t,e){var n=e-t;return n?Wh(t,n>180||n<-180?n-360*Math.round(n/360):n):So(isNaN(t)?e:t)}function W1(t){return(t=+t)==1?An:function(e,n){return n-e?U1(e,n,t):So(isNaN(e)?n:e)}}function An(t,e){var n=e-t;return n?Wh(t,n):So(isNaN(t)?e:t)}var gs=(function t(e){var n=W1(e);function r(a,s){var o=n((a=mo(a)).r,(s=mo(s)).r),l=n(a.g,s.g),c=n(a.b,s.b),u=An(a.opacity,s.opacity);return function(f){return a.r=o(f),a.g=l(f),a.b=c(f),a.opacity=u(f),a+""}}return r.gamma=t,r})(1);function Gh(t){return function(e){var n=e.length,r=new Array(n),a=new Array(n),s=new Array(n),o,l;for(o=0;o<n;++o)l=mo(e[o]),r[o]=l.r||0,a[o]=l.g||0,s[o]=l.b||0;return r=t(r),a=t(a),s=t(s),l.opacity=1,function(c){return l.r=r(c),l.g=a(c),l.b=s(c),l+""}}}var G3=Gh(k1),H3=Gh(z1);function Hh(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),a;return function(s){for(a=0;a<n;++a)r[a]=t[a]*(1-s)+e[a]*s;return r}}function Xh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function X3(t,e){return(Xh(e)?Hh:Vh)(t,e)}function Vh(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,a=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)a[o]=Hr(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(l){for(o=0;o<r;++o)s[o]=a[o](l);return s}}function G1(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Tr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function H1(t,e){var n={},r={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?n[a]=Hr(t[a],e[a]):r[a]=e[a];return function(s){for(a in n)r[a]=n[a](s);return r}}var Cc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wc=new RegExp(Cc.source,"g");function X1(t){return function(){return t}}function V1(t){return function(e){return t(e)+""}}function jh(t,e){var n=Cc.lastIndex=wc.lastIndex=0,r,a,s,o=-1,l=[],c=[];for(t=t+"",e=e+"";(r=Cc.exec(t))&&(a=wc.exec(e));)(s=a.index)>n&&(s=e.slice(n,s),l[o]?l[o]+=s:l[++o]=s),(r=r[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:Tr(r,a)})),n=wc.lastIndex;return n<e.length&&(s=e.slice(n),l[o]?l[o]+=s:l[++o]=s),l.length<2?c[0]?V1(c[0].x):X1(e):(e=c.length,function(u){for(var f=0,d;f<e;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Hr(t,e){var n=typeof e,r;return e==null||n==="boolean"?So(e):(n==="number"?Tr:n==="string"?(r=Da(e))?(e=r,gs):jh:e instanceof Da?gs:e instanceof Date?G1:Xh(e)?Hh:Array.isArray(e)?Vh:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?H1:Tr)(t,e)}function V3(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function j3(t,e){var n=Ao(+t,+e);return function(r){var a=n(r);return a-360*Math.floor(a/360)}}function Ic(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Yh=180/Math.PI,Rc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kh(t,e,n,r,a,s){var o,l,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:a,translateY:s,rotate:Math.atan2(e,t)*Yh,skewX:Math.atan(c)*Yh,scaleX:o,scaleY:l}}var Eo;function j1(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rc:Kh(e.a,e.b,e.c,e.d,e.e,e.f)}function Y1(t){return t==null||(Eo||(Eo=document.createElementNS("http://www.w3.org/2000/svg","g")),Eo.setAttribute("transform",t),!(t=Eo.transform.baseVal.consolidate()))?Rc:(t=t.matrix,Kh(t.a,t.b,t.c,t.d,t.e,t.f))}function Zh(t,e,n,r){function a(u){return u.length?u.pop()+" ":""}function s(u,f,d,h,v,b){if(u!==d||f!==h){var x=v.push("translate(",null,e,null,n);b.push({i:x-4,x:Tr(u,d)},{i:x-2,x:Tr(f,h)})}else(d||h)&&v.push("translate("+d+e+h+n)}function o(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(a(d)+"rotate(",null,r)-2,x:Tr(u,f)})):f&&d.push(a(d)+"rotate("+f+r)}function l(u,f,d,h){u!==f?h.push({i:d.push(a(d)+"skewX(",null,r)-2,x:Tr(u,f)}):f&&d.push(a(d)+"skewX("+f+r)}function c(u,f,d,h,v,b){if(u!==d||f!==h){var x=v.push(a(v)+"scale(",null,",",null,")");b.push({i:x-4,x:Tr(u,d)},{i:x-2,x:Tr(f,h)})}else(d!==1||h!==1)&&v.push(a(v)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),s(u.translateX,u.translateY,f.translateX,f.translateY,d,h),o(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(v){for(var b=-1,x=h.length,E;++b<x;)d[(E=h[b]).i]=E.x(v);return d.join("")}}}var K1=Zh(j1,"px, ","px)","deg)"),Z1=Zh(Y1,", ",")",")"),J1=1e-12;function Jh(t){return((t=Math.exp(t))+1/t)/2}function Q1(t){return((t=Math.exp(t))-1/t)/2}function _1(t){return((t=Math.exp(2*t))-1)/(t+1)}var q1=(function t(e,n,r){function a(s,o){var l=s[0],c=s[1],u=s[2],f=o[0],d=o[1],h=o[2],v=f-l,b=d-c,x=v*v+b*b,E,w;if(x<J1)w=Math.log(h/u)/e,E=function(Z){return[l+Z*v,c+Z*b,u*Math.exp(e*Z*w)]};else{var N=Math.sqrt(x),k=(h*h-u*u+r*x)/(2*u*n*N),B=(h*h-u*u-r*x)/(2*h*n*N),G=Math.log(Math.sqrt(k*k+1)-k),V=Math.log(Math.sqrt(B*B+1)-B);w=(V-G)/e,E=function(Z){var Y=Z*w,et=Jh(G),it=u/(n*N)*(et*_1(e*Y+G)-Q1(G));return[l+it*v,c+it*b,u*et/Jh(e*Y+G)]}}return E.duration=Math.abs(w)*1e3*e/Math.SQRT2,E}return a.rho=function(s){var o=Math.max(.001,+s),l=o*o,c=l*l;return t(o,l,c)},a})(Math.SQRT2,2,4);function Qh(t){return function(e,n){var r=t((e=gc(e)).h,(n=gc(n)).h),a=An(e.s,n.s),s=An(e.l,n.l),o=An(e.opacity,n.opacity);return function(l){return e.h=r(l),e.s=a(l),e.l=s(l),e.opacity=o(l),e+""}}}var Y3=Qh(Ao),K3=Qh(An);function Z3(t,e){var n=An((t=pc(t)).l,(e=pc(e)).l),r=An(t.a,e.a),a=An(t.b,e.b),s=An(t.opacity,e.opacity);return function(o){return t.l=n(o),t.a=r(o),t.b=a(o),t.opacity=s(o),t+""}}function _h(t){return function(e,n){var r=t((e=Tc(e)).h,(n=Tc(n)).h),a=An(e.c,n.c),s=An(e.l,n.l),o=An(e.opacity,n.opacity);return function(l){return e.h=r(l),e.c=a(l),e.l=s(l),e.opacity=o(l),e+""}}}var J3=_h(Ao),Q3=_h(An);function qh(t){return(function e(n){n=+n;function r(a,s){var o=t((a=Ec(a)).h,(s=Ec(s)).h),l=An(a.s,s.s),c=An(a.l,s.l),u=An(a.opacity,s.opacity);return function(f){return a.h=o(f),a.s=l(f),a.l=c(Math.pow(f,n)),a.opacity=u(f),a+""}}return r.gamma=e,r})(1)}var _3=qh(Ao),q3=qh(An);function tT(t,e){e===void 0&&(e=t,t=Hr);for(var n=0,r=e.length-1,a=e[0],s=new Array(r<0?0:r);n<r;)s[n]=t(a,a=e[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return s[l](o-l)}}function tN(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function eT(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Co(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function vi(t){return t=Co(Math.abs(t)),t?t[1]:NaN}function nT(t,e){return function(n,r){for(var a=n.length,s=[],o=0,l=t[0],c=0;a>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),s.push(n.substring(a-=l,a+l)),!((c+=l+1)>r));)l=t[o=(o+1)%t.length];return s.reverse().join(e)}}function rT(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var aT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vs(t){if(!(e=aT.exec(t)))throw new Error("invalid format: "+t);var e;return new Oc({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]})}vs.prototype=Oc.prototype;function Oc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Oc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function iT(t){t:for(var e=t.length,n=1,r=-1,a;n<e;++n)switch(t[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(a+1):t}var wo;function sT(t,e){var n=Co(t,e);if(!n)return wo=void 0,t.toPrecision(e);var r=n[0],a=n[1],s=a-(wo=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Co(t,Math.max(0,e+s-1))[0]}function tg(t,e){var n=Co(t,e);if(!n)return t+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}var eg={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:eT,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)=>tg(t*100,e),r:tg,s:sT,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ng(t){return t}var rg=Array.prototype.map,ag=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function oT(t){var e=t.grouping===void 0||t.thousands===void 0?ng:nT(rg.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?ng:rT(rg.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=vs(d);var v=d.fill,b=d.align,x=d.sign,E=d.symbol,w=d.zero,N=d.width,k=d.comma,B=d.precision,G=d.trim,V=d.type;V==="n"?(k=!0,V="g"):eg[V]||(B===void 0&&(B=12),G=!0,V="g"),(w||v==="0"&&b==="=")&&(w=!0,v="0",b="=");var Z=(h&&h.prefix!==void 0?h.prefix:"")+(E==="$"?n:E==="#"&&/[boxX]/.test(V)?"0"+V.toLowerCase():""),Y=(E==="$"?r:/[%p]/.test(V)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),et=eg[V],it=/[defgprs%]/.test(V);B=B===void 0?6:/[gprs]/.test(V)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function at(ot){var st=Z,_=Y,lt,nt,dt;if(V==="c")_=et(ot)+_,ot="";else{ot=+ot;var bt=ot<0||1/ot<0;if(ot=isNaN(ot)?c:et(Math.abs(ot),B),G&&(ot=iT(ot)),bt&&+ot==0&&x!=="+"&&(bt=!1),st=(bt?x==="("?x:l:x==="-"||x==="("?"":x)+st,_=(V==="s"&&!isNaN(ot)&&wo!==void 0?ag[8+wo/3]:"")+_+(bt&&x==="("?")":""),it){for(lt=-1,nt=ot.length;++lt<nt;)if(dt=ot.charCodeAt(lt),48>dt||dt>57){_=(dt===46?a+ot.slice(lt+1):ot.slice(lt))+_,ot=ot.slice(0,lt);break}}}k&&!w&&(ot=e(ot,1/0));var At=st.length+ot.length+_.length,Et=At<N?new Array(N-At+1).join(v):"";switch(k&&w&&(ot=e(Et+ot,Et.length?N-_.length:1/0),Et=""),b){case"<":ot=st+ot+_+Et;break;case"=":ot=st+Et+ot+_;break;case"^":ot=Et.slice(0,At=Et.length>>1)+st+ot+_+Et.slice(At);break;default:ot=Et+st+ot+_;break}return s(ot)}return at.toString=function(){return d+""},at}function f(d,h){var v=Math.max(-8,Math.min(8,Math.floor(vi(h)/3)))*3,b=Math.pow(10,-v),x=u((d=vs(d),d.type="f",d),{suffix:ag[8+v/3]});return function(E){return x(b*E)}}return{format:u,formatPrefix:f}}var Io,Pc,ig;lT({thousands:",",grouping:[3],currency:["$",""]});function lT(t){return Io=oT(t),Pc=Io.format,ig=Io.formatPrefix,Io}function cT(t){return Math.max(0,-vi(Math.abs(t)))}function uT(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vi(e)/3)))*3-vi(Math.abs(t)))}function fT(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,vi(e)-vi(t))+1}const Mc=new Date,Lc=new Date;function pn(t,e,n,r){function a(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(t(s=new Date(+s)),s),a.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),a.round=s=>{const o=a(s),l=a.ceil(s);return s-o<l-s?o:l},a.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),a.range=(s,o,l)=>{const c=[];if(s=a.ceil(s),l=l==null?1:Math.floor(l),!(s<o)||!(l>0))return c;let u;do c.push(u=new Date(+s)),e(s,l),t(s);while(u<s&&s<o);return c},a.filter=s=>pn(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;e(o,-1),!s(o););else for(;--l>=0;)for(;e(o,1),!s(o););}),n&&(a.count=(s,o)=>(Mc.setTime(+s),Lc.setTime(+o),t(Mc),t(Lc),Math.floor(n(Mc,Lc))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(r?o=>r(o)%s===0:o=>a.count(0,o)%s===0):a)),a}const Ro=pn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ro.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?pn(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ro);const eN=Ro.range,Xr=1e3,sr=Xr*60,Vr=sr*60,jr=Vr*24,Dc=jr*7,sg=jr*30,Fc=jr*365,Ba=pn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Xr)},(t,e)=>(e-t)/Xr,t=>t.getUTCSeconds()),nN=Ba.range,Nc=pn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xr)},(t,e)=>{t.setTime(+t+e*sr)},(t,e)=>(e-t)/sr,t=>t.getMinutes()),rN=Nc.range,$c=pn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*sr)},(t,e)=>(e-t)/sr,t=>t.getUTCMinutes()),aN=$c.range,Bc=pn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xr-t.getMinutes()*sr)},(t,e)=>{t.setTime(+t+e*Vr)},(t,e)=>(e-t)/Vr,t=>t.getHours()),iN=Bc.range,kc=pn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Vr)},(t,e)=>(e-t)/Vr,t=>t.getUTCHours()),sN=kc.range,ps=pn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*sr)/jr,t=>t.getDate()-1),oN=ps.range,Oo=pn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/jr,t=>t.getUTCDate()-1),lN=Oo.range,og=pn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/jr,t=>Math.floor(t/jr)),cN=og.range;function ka(t){return pn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*sr)/Dc)}const Po=ka(0),Mo=ka(1),dT=ka(2),hT=ka(3),pi=ka(4),gT=ka(5),vT=ka(6),uN=Po.range,fN=Mo.range,dN=dT.range,hN=hT.range,gN=pi.range,vN=gT.range,pN=vT.range;function za(t){return pn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Dc)}const Lo=za(0),Do=za(1),pT=za(2),mT=za(3),mi=za(4),yT=za(5),xT=za(6),mN=Lo.range,yN=Do.range,xN=pT.range,bN=mT.range,TN=mi.range,SN=yT.range,AN=xT.range,zc=pn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),EN=zc.range,Uc=pn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),CN=Uc.range,Yr=pn(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());Yr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:pn(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)});const wN=Yr.range,Kr=pn(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());Kr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:pn(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)});const IN=Kr.range;function lg(t,e,n,r,a,s){const o=[[Ba,1,Xr],[Ba,5,5*Xr],[Ba,15,15*Xr],[Ba,30,30*Xr],[s,1,sr],[s,5,5*sr],[s,15,15*sr],[s,30,30*sr],[a,1,Vr],[a,3,3*Vr],[a,6,6*Vr],[a,12,12*Vr],[r,1,jr],[r,2,2*jr],[n,1,Dc],[e,1,sg],[e,3,3*sg],[t,1,Fc]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const v=d&&typeof d.range=="function"?d:c(u,f,d),b=v?v.range(u,+f+1):[];return h?b.reverse():b}function c(u,f,d){const h=Math.abs(f-u)/d,v=lc(([,,E])=>E).right(o,h);if(v===o.length)return t.every(fc(u/Fc,f/Fc,d));if(v===0)return Ro.every(Math.max(fc(u,f,d),1));const[b,x]=o[h/o[v-1][2]<o[v][2]/h?v-1:v];return b.every(x)}return[l,c]}const[bT,TT]=lg(Kr,Uc,Lo,og,kc,$c),[ST,AT]=lg(Yr,zc,Po,ps,Bc,Nc);function Wc(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 Gc(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 ms(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function ET(t){var e=t.dateTime,n=t.date,r=t.time,a=t.periods,s=t.days,o=t.shortDays,l=t.months,c=t.shortMonths,u=ys(a),f=xs(a),d=ys(s),h=xs(s),v=ys(o),b=xs(o),x=ys(l),E=xs(l),w=ys(c),N=xs(c),k={a:dt,A:bt,b:At,B:Et,c:null,d:gg,e:gg,f:YT,g:rS,G:iS,H:XT,I:VT,j:jT,L:vg,m:KT,M:ZT,p:Rt,q:Vt,Q:Tg,s:Sg,S:JT,u:QT,U:_T,V:qT,w:tS,W:eS,x:null,X:null,y:nS,Y:aS,Z:sS,"%":bg},B={a:ae,A:re,b:ve,B:xe,c:null,d:mg,e:mg,f:uS,g:bS,G:SS,H:oS,I:lS,j:cS,L:yg,m:fS,M:dS,p:ge,q:Le,Q:Tg,s:Sg,S:hS,u:gS,U:vS,V:pS,w:mS,W:yS,x:null,X:null,y:xS,Y:TS,Z:AS,"%":bg},G={a:it,A:at,b:ot,B:st,c:_,d:dg,e:dg,f:UT,g:fg,G:ug,H:hg,I:hg,j:$T,L:zT,m:NT,M:BT,p:et,q:FT,Q:GT,s:HT,S:kT,u:OT,U:PT,V:MT,w:RT,W:LT,x:lt,X:nt,y:fg,Y:ug,Z:DT,"%":WT};k.x=V(n,k),k.X=V(r,k),k.c=V(e,k),B.x=V(n,B),B.X=V(r,B),B.c=V(e,B);function V(Yt,pe){return function(be){var Gt=[],We=-1,Be=0,cn=Yt.length,hn,Ae,an;for(be instanceof Date||(be=new Date(+be));++We<cn;)Yt.charCodeAt(We)===37&&(Gt.push(Yt.slice(Be,We)),(Ae=cg[hn=Yt.charAt(++We)])!=null?hn=Yt.charAt(++We):Ae=hn==="e"?" ":"0",(an=pe[hn])&&(hn=an(be,Ae)),Gt.push(hn),Be=We+1);return Gt.push(Yt.slice(Be,We)),Gt.join("")}}function Z(Yt,pe){return function(be){var Gt=ms(1900,void 0,1),We=Y(Gt,Yt,be+="",0),Be,cn;if(We!=be.length)return null;if("Q"in Gt)return new Date(Gt.Q);if("s"in Gt)return new Date(Gt.s*1e3+("L"in Gt?Gt.L:0));if(pe&&!("Z"in Gt)&&(Gt.Z=0),"p"in Gt&&(Gt.H=Gt.H%12+Gt.p*12),Gt.m===void 0&&(Gt.m="q"in Gt?Gt.q:0),"V"in Gt){if(Gt.V<1||Gt.V>53)return null;"w"in Gt||(Gt.w=1),"Z"in Gt?(Be=Gc(ms(Gt.y,0,1)),cn=Be.getUTCDay(),Be=cn>4||cn===0?Do.ceil(Be):Do(Be),Be=Oo.offset(Be,(Gt.V-1)*7),Gt.y=Be.getUTCFullYear(),Gt.m=Be.getUTCMonth(),Gt.d=Be.getUTCDate()+(Gt.w+6)%7):(Be=Wc(ms(Gt.y,0,1)),cn=Be.getDay(),Be=cn>4||cn===0?Mo.ceil(Be):Mo(Be),Be=ps.offset(Be,(Gt.V-1)*7),Gt.y=Be.getFullYear(),Gt.m=Be.getMonth(),Gt.d=Be.getDate()+(Gt.w+6)%7)}else("W"in Gt||"U"in Gt)&&("w"in Gt||(Gt.w="u"in Gt?Gt.u%7:"W"in Gt?1:0),cn="Z"in Gt?Gc(ms(Gt.y,0,1)).getUTCDay():Wc(ms(Gt.y,0,1)).getDay(),Gt.m=0,Gt.d="W"in Gt?(Gt.w+6)%7+Gt.W*7-(cn+5)%7:Gt.w+Gt.U*7-(cn+6)%7);return"Z"in Gt?(Gt.H+=Gt.Z/100|0,Gt.M+=Gt.Z%100,Gc(Gt)):Wc(Gt)}}function Y(Yt,pe,be,Gt){for(var We=0,Be=pe.length,cn=be.length,hn,Ae;We<Be;){if(Gt>=cn)return-1;if(hn=pe.charCodeAt(We++),hn===37){if(hn=pe.charAt(We++),Ae=G[hn in cg?pe.charAt(We++):hn],!Ae||(Gt=Ae(Yt,be,Gt))<0)return-1}else if(hn!=be.charCodeAt(Gt++))return-1}return Gt}function et(Yt,pe,be){var Gt=u.exec(pe.slice(be));return Gt?(Yt.p=f.get(Gt[0].toLowerCase()),be+Gt[0].length):-1}function it(Yt,pe,be){var Gt=v.exec(pe.slice(be));return Gt?(Yt.w=b.get(Gt[0].toLowerCase()),be+Gt[0].length):-1}function at(Yt,pe,be){var Gt=d.exec(pe.slice(be));return Gt?(Yt.w=h.get(Gt[0].toLowerCase()),be+Gt[0].length):-1}function ot(Yt,pe,be){var Gt=w.exec(pe.slice(be));return Gt?(Yt.m=N.get(Gt[0].toLowerCase()),be+Gt[0].length):-1}function st(Yt,pe,be){var Gt=x.exec(pe.slice(be));return Gt?(Yt.m=E.get(Gt[0].toLowerCase()),be+Gt[0].length):-1}function _(Yt,pe,be){return Y(Yt,e,pe,be)}function lt(Yt,pe,be){return Y(Yt,n,pe,be)}function nt(Yt,pe,be){return Y(Yt,r,pe,be)}function dt(Yt){return o[Yt.getDay()]}function bt(Yt){return s[Yt.getDay()]}function At(Yt){return c[Yt.getMonth()]}function Et(Yt){return l[Yt.getMonth()]}function Rt(Yt){return a[+(Yt.getHours()>=12)]}function Vt(Yt){return 1+~~(Yt.getMonth()/3)}function ae(Yt){return o[Yt.getUTCDay()]}function re(Yt){return s[Yt.getUTCDay()]}function ve(Yt){return c[Yt.getUTCMonth()]}function xe(Yt){return l[Yt.getUTCMonth()]}function ge(Yt){return a[+(Yt.getUTCHours()>=12)]}function Le(Yt){return 1+~~(Yt.getUTCMonth()/3)}return{format:function(Yt){var pe=V(Yt+="",k);return pe.toString=function(){return Yt},pe},parse:function(Yt){var pe=Z(Yt+="",!1);return pe.toString=function(){return Yt},pe},utcFormat:function(Yt){var pe=V(Yt+="",B);return pe.toString=function(){return Yt},pe},utcParse:function(Yt){var pe=Z(Yt+="",!0);return pe.toString=function(){return Yt},pe}}}var cg={"-":"",_:" ",0:"0"},En=/^\s*\d+/,CT=/^%/,wT=/[\\^$*+?|[\]().{}]/g;function Je(t,e,n){var r=t<0?"-":"",a=(r?-t:t)+"",s=a.length;return r+(s<n?new Array(n-s+1).join(e)+a:a)}function IT(t){return t.replace(wT,"\\$&")}function ys(t){return new RegExp("^(?:"+t.map(IT).join("|")+")","i")}function xs(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function RT(t,e,n){var r=En.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function OT(t,e,n){var r=En.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function PT(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function MT(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function LT(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ug(t,e,n){var r=En.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function fg(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function DT(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 FT(t,e,n){var r=En.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function NT(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function dg(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $T(t,e,n){var r=En.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function hg(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function BT(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function kT(t,e,n){var r=En.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function zT(t,e,n){var r=En.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function UT(t,e,n){var r=En.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function WT(t,e,n){var r=CT.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function GT(t,e,n){var r=En.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function HT(t,e,n){var r=En.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gg(t,e){return Je(t.getDate(),e,2)}function XT(t,e){return Je(t.getHours(),e,2)}function VT(t,e){return Je(t.getHours()%12||12,e,2)}function jT(t,e){return Je(1+ps.count(Yr(t),t),e,3)}function vg(t,e){return Je(t.getMilliseconds(),e,3)}function YT(t,e){return vg(t,e)+"000"}function KT(t,e){return Je(t.getMonth()+1,e,2)}function ZT(t,e){return Je(t.getMinutes(),e,2)}function JT(t,e){return Je(t.getSeconds(),e,2)}function QT(t){var e=t.getDay();return e===0?7:e}function _T(t,e){return Je(Po.count(Yr(t)-1,t),e,2)}function pg(t){var e=t.getDay();return e>=4||e===0?pi(t):pi.ceil(t)}function qT(t,e){return t=pg(t),Je(pi.count(Yr(t),t)+(Yr(t).getDay()===4),e,2)}function tS(t){return t.getDay()}function eS(t,e){return Je(Mo.count(Yr(t)-1,t),e,2)}function nS(t,e){return Je(t.getFullYear()%100,e,2)}function rS(t,e){return t=pg(t),Je(t.getFullYear()%100,e,2)}function aS(t,e){return Je(t.getFullYear()%1e4,e,4)}function iS(t,e){var n=t.getDay();return t=n>=4||n===0?pi(t):pi.ceil(t),Je(t.getFullYear()%1e4,e,4)}function sS(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Je(e/60|0,"0",2)+Je(e%60,"0",2)}function mg(t,e){return Je(t.getUTCDate(),e,2)}function oS(t,e){return Je(t.getUTCHours(),e,2)}function lS(t,e){return Je(t.getUTCHours()%12||12,e,2)}function cS(t,e){return Je(1+Oo.count(Kr(t),t),e,3)}function yg(t,e){return Je(t.getUTCMilliseconds(),e,3)}function uS(t,e){return yg(t,e)+"000"}function fS(t,e){return Je(t.getUTCMonth()+1,e,2)}function dS(t,e){return Je(t.getUTCMinutes(),e,2)}function hS(t,e){return Je(t.getUTCSeconds(),e,2)}function gS(t){var e=t.getUTCDay();return e===0?7:e}function vS(t,e){return Je(Lo.count(Kr(t)-1,t),e,2)}function xg(t){var e=t.getUTCDay();return e>=4||e===0?mi(t):mi.ceil(t)}function pS(t,e){return t=xg(t),Je(mi.count(Kr(t),t)+(Kr(t).getUTCDay()===4),e,2)}function mS(t){return t.getUTCDay()}function yS(t,e){return Je(Do.count(Kr(t)-1,t),e,2)}function xS(t,e){return Je(t.getUTCFullYear()%100,e,2)}function bS(t,e){return t=xg(t),Je(t.getUTCFullYear()%100,e,2)}function TS(t,e){return Je(t.getUTCFullYear()%1e4,e,4)}function SS(t,e){var n=t.getUTCDay();return t=n>=4||n===0?mi(t):mi.ceil(t),Je(t.getUTCFullYear()%1e4,e,4)}function AS(){return"+0000"}function bg(){return"%"}function Tg(t){return+t}function Sg(t){return Math.floor(+t/1e3)}var yi,Hc,Ag,Fo,Xc;ES({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ES(t){return yi=ET(t),Hc=yi.format,Ag=yi.parse,Fo=yi.utcFormat,Xc=yi.utcParse,yi}var Eg="%Y-%m-%dT%H:%M:%S.%LZ";function CS(t){return t.toISOString()}var RN=Date.prototype.toISOString?CS:Fo(Eg);function wS(t){var e=new Date(t);return isNaN(e)?null:e}var ON=+new Date("2000-01-01T00:00:00.000Z")?wS:Xc(Eg);function or(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Zr(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Cg=Symbol("implicit");function wg(){var t=new ch,e=[],n=[],r=Cg;function a(s){let o=t.get(s);if(o===void 0){if(r!==Cg)return r;t.set(s,o=e.push(s)-1)}return n[o%n.length]}return a.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new ch;for(const o of s)t.has(o)||t.set(o,e.push(o)-1);return a},a.range=function(s){return arguments.length?(n=Array.from(s),a):n.slice()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return wg(e,n).unknown(r)},or.apply(a,arguments),a}function Ig(){var t=wg().unknown(void 0),e=t.domain,n=t.range,r=0,a=1,s,o,l=!1,c=0,u=0,f=.5;delete t.unknown;function d(){var h=e().length,v=a<r,b=v?a:r,x=v?r:a;s=(x-b)/Math.max(1,h-c+u*2),l&&(s=Math.floor(s)),b+=(x-b-s*(h-c))*f,o=s*(1-c),l&&(b=Math.round(b),o=Math.round(o));var E=d1(h).map(function(w){return b+s*w});return n(v?E.reverse():E)}return t.domain=function(h){return arguments.length?(e(h),d()):e()},t.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,d()):[r,a]},t.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,l=!0,d()},t.bandwidth=function(){return o},t.step=function(){return s},t.round=function(h){return arguments.length?(l=!!h,d()):l},t.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},t.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},t.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},t.copy=function(){return Ig(e(),[r,a]).round(l).paddingInner(c).paddingOuter(u).align(f)},or.apply(d(),arguments)}function Rg(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Rg(e())},t}function PN(){return Rg(Ig.apply(null,arguments).paddingInner(1))}function IS(t){return function(){return t}}function No(t){return+t}var Og=[0,1];function Un(t){return t}function Vc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:IS(isNaN(e)?NaN:.5)}function RS(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function OS(t,e,n){var r=t[0],a=t[1],s=e[0],o=e[1];return a<r?(r=Vc(a,r),s=n(o,s)):(r=Vc(r,a),s=n(s,o)),function(l){return s(r(l))}}function PS(t,e,n){var r=Math.min(t.length,e.length)-1,a=new Array(r),s=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)a[o]=Vc(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(l){var c=ls(t,l,1,r)-1;return s[c](a[c](l))}}function bs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $o(){var t=Og,e=Og,n=Hr,r,a,s,o=Un,l,c,u;function f(){var h=Math.min(t.length,e.length);return o!==Un&&(o=RS(t[0],t[h-1])),l=h>2?PS:OS,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?s:(c||(c=l(t.map(r),e,n)))(r(o(h)))}return d.invert=function(h){return o(a((u||(u=l(e,t.map(r),Tr)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,No),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=Ic,f()},d.clamp=function(h){return arguments.length?(o=h?!0:Un,f()):o!==Un},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,v){return r=h,a=v,f()}}function jc(){return $o()(Un,Un)}function MS(t,e,n,r){var a=fc(t,e,n),s;switch(r=vs(r==null?",f":r),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(s=uT(a,o))&&(r.precision=s),ig(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=fT(a,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=cT(a))&&(r.precision=s-(r.type==="%")*2);break}}return Pc(r)}function va(t){var e=t.domain;return t.ticks=function(n){var r=e();return cc(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var a=e();return MS(a[0],a[a.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),a=0,s=r.length-1,o=r[a],l=r[s],c,u,f=10;for(l<o&&(u=o,o=l,l=u,u=a,a=s,s=u);f-- >0;){if(u=uc(o,l,n),u===c)return r[a]=o,r[s]=l,e(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function xi(){var t=jc();return t.copy=function(){return bs(t,xi())},or.apply(t,arguments),va(t)}function LS(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,No),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return LS(t).unknown(e)},t=arguments.length?Array.from(t,No):[0,1],va(n)}function Pg(t,e){t=t.slice();var n=0,r=t.length-1,a=t[n],s=t[r],o;return s<a&&(o=n,n=r,r=o,o=a,a=s,s=o),t[n]=e.floor(a),t[r]=e.ceil(s),t}function Mg(t){return Math.log(t)}function Lg(t){return Math.exp(t)}function DS(t){return-Math.log(-t)}function FS(t){return-Math.exp(-t)}function NS(t){return isFinite(t)?+("1e"+t):t<0?0:t}function $S(t){return t===10?NS:t===Math.E?Math.exp:e=>Math.pow(t,e)}function BS(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Dg(t){return(e,n)=>-t(-e,n)}function Yc(t){const e=t(Mg,Lg),n=e.domain;let r=10,a,s;function o(){return a=BS(r),s=$S(r),n()[0]<0?(a=Dg(a),s=Dg(s),t(DS,FS)):t(Mg,Lg),e}return e.base=function(l){return arguments.length?(r=+l,o()):r},e.domain=function(l){return arguments.length?(n(l),o()):n()},e.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=a(u),v=a(f),b,x;const E=l==null?10:+l;let w=[];if(!(r%1)&&v-h<E){if(h=Math.floor(h),v=Math.ceil(v),u>0){for(;h<=v;++h)for(b=1;b<r;++b)if(x=h<0?b/s(-h):b*s(h),!(x<u)){if(x>f)break;w.push(x)}}else for(;h<=v;++h)for(b=r-1;b>=1;--b)if(x=h>0?b/s(-h):b*s(h),!(x<u)){if(x>f)break;w.push(x)}w.length*2<E&&(w=cc(u,f,E))}else w=cc(h,v,Math.min(v-h,E)).map(s);return d?w.reverse():w},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=vs(c)).precision==null&&(c.trim=!0),c=Pc(c)),l===1/0)return c;const u=Math.max(1,r*l/e.ticks().length);return f=>{let d=f/s(Math.round(a(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},e.nice=()=>n(Pg(n(),{floor:l=>s(Math.floor(a(l))),ceil:l=>s(Math.ceil(a(l)))})),e}function Fg(){const t=Yc($o()).domain([1,10]);return t.copy=()=>bs(t,Fg()).base(t.base()),or.apply(t,arguments),t}function Ng(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function $g(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Kc(t){var e=1,n=t(Ng(e),$g(e));return n.constant=function(r){return arguments.length?t(Ng(e=+r),$g(e)):e},va(n)}function Bg(){var t=Kc($o());return t.copy=function(){return bs(t,Bg()).constant(t.constant())},or.apply(t,arguments)}function kg(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function kS(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function zS(t){return t<0?-t*t:t*t}function Zc(t){var e=t(Un,Un),n=1;function r(){return n===1?t(Un,Un):n===.5?t(kS,zS):t(kg(n),kg(1/n))}return e.exponent=function(a){return arguments.length?(n=+a,r()):n},va(e)}function zg(){var t=Zc($o());return t.copy=function(){return bs(t,zg()).exponent(t.exponent())},or.apply(t,arguments),t}function MN(){return zg.apply(null,arguments).exponent(.5)}function Ug(t){return Math.sign(t)*t*t}function US(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function WS(){var t=jc(),e=[0,1],n=!1,r;function a(s){var o=US(t(s));return isNaN(o)?r:n?Math.round(o):o}return a.invert=function(s){return t.invert(Ug(s))},a.domain=function(s){return arguments.length?(t.domain(s),a):t.domain()},a.range=function(s){return arguments.length?(t.range((e=Array.from(s,No)).map(Ug)),a):e.slice()},a.rangeRound=function(s){return a.range(s).round(!0)},a.round=function(s){return arguments.length?(n=!!s,a):n},a.clamp=function(s){return arguments.length?(t.clamp(s),a):t.clamp()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return WS(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},or.apply(a,arguments),va(a)}function GS(){var t=[],e=[],n=[],r;function a(){var o=0,l=Math.max(1,e.length);for(n=new Array(l-1);++o<l;)n[o-1]=C1(t,o/l);return s}function s(o){return o==null||isNaN(o=+o)?r:e[ls(n,o)]}return s.invertExtent=function(o){var l=e.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:t[0],l<n.length?n[l]:t[t.length-1]]},s.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let l of o)l!=null&&!isNaN(l=+l)&&t.push(l);return t.sort(yr),a()},s.range=function(o){return arguments.length?(e=Array.from(o),a()):e.slice()},s.unknown=function(o){return arguments.length?(r=o,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return GS().domain(t).range(e).unknown(r)},or.apply(s,arguments)}function HS(){var t=0,e=1,n=1,r=[.5],a=[0,1],s;function o(c){return c!=null&&c<=c?a[ls(r,c,0,n)]:s}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return o}return o.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,l()):[t,e]},o.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,l()):a.slice()},o.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(s=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return HS().domain([t,e]).range(a).unknown(s)},or.apply(va(o),arguments)}function XS(){var t=[.5],e=[0,1],n,r=1;function a(s){return s!=null&&s<=s?e[ls(t,s,0,r)]:n}return a.domain=function(s){return arguments.length?(t=Array.from(s),r=Math.min(t.length,e.length-1),a):t.slice()},a.range=function(s){return arguments.length?(e=Array.from(s),r=Math.min(t.length,e.length-1),a):e.slice()},a.invertExtent=function(s){var o=e.indexOf(s);return[t[o-1],t[o]]},a.unknown=function(s){return arguments.length?(n=s,a):n},a.copy=function(){return XS().domain(t).range(e).unknown(n)},or.apply(a,arguments)}function VS(t){return new Date(t)}function jS(t){return t instanceof Date?+t:Math.round(t)}function Jc(t,e,n,r,a,s,o,l,c,u){var f=jc(),d=f.invert,h=f.domain,v=u(".%L"),b=u(":%S"),x=u("%I:%M"),E=u("%I %p"),w=u("%a %d"),N=u("%b %d"),k=u("%B"),B=u("%Y");function G(V){return(c(V)<V?v:l(V)<V?b:o(V)<V?x:s(V)<V?E:r(V)<V?a(V)<V?w:N:n(V)<V?k:B)(V)}return f.invert=function(V){return new Date(Math.round(d(V)))},f.domain=function(V){return arguments.length?h(Array.from(V,jS)):h().map(VS)},f.ticks=function(V){var Z=h();return t(Z[0],Z[Z.length-1],V==null?10:V)},f.tickFormat=function(V,Z){return Z==null?G:u(Z)},f.nice=function(V){var Z=h();return(!V||typeof V.range!="function")&&(V=e(Z[0],Z[Z.length-1],V==null?10:V)),V?h(Pg(Z,V)):f},f.copy=function(){return bs(f,Jc(t,e,n,r,a,s,o,l,c,u))},f}function YS(){return or.apply(Jc(ST,AT,Yr,zc,Po,ps,Bc,Nc,Ba,Hc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function KS(){return or.apply(Jc(bT,TT,Kr,Uc,Lo,Oo,kc,$c,Ba,Fo).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Bo(){var t=0,e=1,n,r,a,s,o=Un,l=!1,c;function u(d){return d==null||isNaN(d=+d)?c:o(a===0?.5:(d=(s(d)-n)*a,l?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([t,e]=d,n=s(t=+t),r=s(e=+e),a=n===r?0:1/(r-n),u):[t,e]},u.clamp=function(d){return arguments.length?(l=!!d,u):l},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(h){var v,b;return arguments.length?([v,b]=h,o=d(v,b),u):[o(0),o(1)]}}return u.range=f(Hr),u.rangeRound=f(Ic),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return s=d,n=d(t),r=d(e),a=n===r?0:1/(r-n),u}}function pa(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function ZS(){var t=va(Bo()(Un));return t.copy=function(){return pa(t,ZS())},Zr.apply(t,arguments)}function JS(){var t=Yc(Bo()).domain([1,10]);return t.copy=function(){return pa(t,JS()).base(t.base())},Zr.apply(t,arguments)}function QS(){var t=Kc(Bo());return t.copy=function(){return pa(t,QS()).constant(t.constant())},Zr.apply(t,arguments)}function Wg(){var t=Zc(Bo());return t.copy=function(){return pa(t,Wg()).exponent(t.exponent())},Zr.apply(t,arguments)}function LN(){return Wg.apply(null,arguments).exponent(.5)}function _S(){var t=[],e=Un;function n(r){if(r!=null&&!isNaN(r=+r))return e((ls(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let a of r)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(yr),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,a)=>e(a/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,s)=>E1(t,s/r))},n.copy=function(){return _S(e).domain(t)},Zr.apply(n,arguments)}function ko(){var t=0,e=.5,n=1,r=1,a,s,o,l,c,u=Un,f,d=!1,h;function v(x){return x==null||isNaN(x=+x)?h:(x=.5+((x=+f(x))-s)*(r*x<r*s?l:c),u(d?Math.max(0,Math.min(1,x)):x))}v.domain=function(x){return arguments.length?([t,e,n]=x,a=f(t=+t),s=f(e=+e),o=f(n=+n),l=a===s?0:.5/(s-a),c=s===o?0:.5/(o-s),r=s<a?-1:1,v):[t,e,n]},v.clamp=function(x){return arguments.length?(d=!!x,v):d},v.interpolator=function(x){return arguments.length?(u=x,v):u};function b(x){return function(E){var w,N,k;return arguments.length?([w,N,k]=E,u=tT(x,[w,N,k]),v):[u(0),u(.5),u(1)]}}return v.range=b(Hr),v.rangeRound=b(Ic),v.unknown=function(x){return arguments.length?(h=x,v):h},function(x){return f=x,a=x(t),s=x(e),o=x(n),l=a===s?0:.5/(s-a),c=s===o?0:.5/(o-s),r=s<a?-1:1,v}}function qS(){var t=va(ko()(Un));return t.copy=function(){return pa(t,qS())},Zr.apply(t,arguments)}function tA(){var t=Yc(ko()).domain([.1,1,10]);return t.copy=function(){return pa(t,tA()).base(t.base())},Zr.apply(t,arguments)}function eA(){var t=Kc(ko());return t.copy=function(){return pa(t,eA()).constant(t.constant())},Zr.apply(t,arguments)}function Gg(){var t=Zc(ko());return t.copy=function(){return pa(t,Gg()).exponent(t.exponent())},Zr.apply(t,arguments)}function DN(){return Gg.apply(null,arguments).exponent(.5)}function ma(t="linear",e,n){const r={linear:xi,log:Bg,_log:Fg,time:YS,utc:KS}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var nA={getXScale(t,e,n,r){const a=this,s=a.state.loading!=="append"&&a.scale.zoom||ma(a.axis.getAxisType("x"),t,e);return a.getCustomizedXScale(n?s.domain(n):s,r)},getYScale(t,e,n,r,a){const o=this.axis.getAxisType(t);if(a&&a.type===o)return a.range([e,n]),r&&a.domain(r),a;const l=ma(o,e,n);return r&&l.domain(r),l},getYScaleById(t,e=!1){var n;const r=((n=this.axis)==null?void 0:n.getId(t))==="y2",a=e?r?"subY2":"subY":r?"y2":"y";return this.scale[a]},getCustomizedXScale(t,e){const n=this,r=()=>(e?e():n.axis.x.tickOffset())||(n.axis.isCategorized()?(t(1)-t(0))/2:0),a=n.config.axis_x_inverted,s=function(o){return t(o)+r()};for(const o in t)s[o]=t[o];return s.orgDomain=()=>t.domain(),s.orgScale=()=>t,n.axis.isCategorized()&&(s.domain=function(o){let l=o;return arguments.length?(t.domain(l),s):(l=this.orgDomain(),a?[l[0]+1,l[1]]:[l[0],l[1]+1])}),s},updateScales(t,e=!0){var n,r,a,s,o,l,c,u,f;const d=this,{axis:h,config:v,format:b,org:x,scale:E,state:{current:w,width:N,height:k,width2:B,height2:G,hasAxis:V,hasTreemap:Z}}=d;if(V){const Y=v.axis_rotated,et=d.getResettedPadding(1),it={x:Y?et:0,y:Y?0:k,subX:Y?1:0,subY:Y?0:G},at={x:Y?k:N,y:Y?N:et,subX:Y?k:N,subY:Y?B:1},ot=e?(n=E.x)==null?void 0:n.orgDomain():E.zoom||(a=(r=E.x)==null?void 0:r.domain)==null?void 0:a.call(r),st=e?x.xDomain:E.zoom||(o=(s=E.subX)==null?void 0:s.domain)==null?void 0:o.call(s);E.x=d.getXScale(it.x,at.x,ot,()=>h.x.tickOffset()),E.subX=d.getXScale(it.x,at.x,st,_=>{var lt;return _%1?0:((lt=h.subX)!=null?lt:h.x).tickOffset()}),b.xAxisTick=h.getXAxisTickFormat(),b.subXAxisTick=h.getXAxisTickFormat(!0),h.setAxis("x",E.x,v.axis_x_tick_outer,t),v.subchart_show&&h.setAxis("subX",E.subX,(l=v.subchart_axis_x_tick_outer)!=null?l:v.axis_x_tick_outer,t),E.y=d.getYScale("y",it.y,at.y,E.y?E.y.domain():v.axis_y_default,E.y),E.subY=d.getYScale("y",it.subY,at.subY,E.subY?E.subY.domain():v.axis_y_default,E.subY),h.setAxis("y",E.y,v.axis_y_tick_outer,t),v.subchart_show&&v.subchart_axis_y_show&&h.setAxis("subY",E.subY,(c=v.subchart_axis_y_tick_outer)!=null?c:v.axis_y_tick_outer,t),(v.axis_y2_show||v.subchart_axis_y2_show)&&(E.y2=d.getYScale("y2",it.y,at.y,E.y2?E.y2.domain():v.axis_y2_default,E.y2),E.subY2=d.getYScale("y2",it.subY,at.subY,E.subY2?E.subY2.domain():v.axis_y2_default,E.subY2),h.setAxis("y2",E.y2,v.axis_y2_tick_outer,t),v.subchart_show&&v.subchart_axis_y2_show&&h.setAxis("subY2",E.subY2,(u=v.subchart_axis_y2_tick_outer)!=null?u:v.axis_y2_tick_outer,t))}else if(Z){const Y=d.getCurrentPadding();E.x=xi().rangeRound([Y.left,w.width-Y.right]),E.y=xi().rangeRound([Y.top,w.height-Y.bottom])}else(f=d.updateArc)==null||f.call(d)},xx(t){const e=this,{config:n,scale:{x:r,zoom:a}}=e,s=n.zoom_enabled&&a?a:r;return t?s(L(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:r,scale:{x:a,zoom:s}}=e,o=r.zoom_enabled&&s?s:a;let l=e.getBaseValue(t);return n.isTimeSeries()?l=bn.call(e,l):n.isCategorized()&&$(l)&&(l=r.axis_x_categories.indexOf(l)),o(l)},yv(t){const e=this,{scale:{y:n,y2:r}}=e;return(t.axis&&t.axis==="y2"?r:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}};function Mn(t,e,n,r=`axis_${e}`){const a=t[`${r}_tick_${n}`];return a!==void 0?a:t[`axis_${e}_tick_${n}`]}function zo(t,e){const n=typeof t=="function"?t.call(e):t;return n!=null&&n.length?n:void 0}function Hg(t,e,n){var r,a,s,o,l,c;if((a=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&a.call(r,n))return e instanceof Date?e:bn.call(t,e);if(n==="x"&&((o=(s=t.axis)==null?void 0:s.isCategorized)!=null&&o.call(s))&&typeof e=="string"){const u=t.config.axis_x_categories.indexOf(e);return u>=0?u:e}return(c=(l=t.axis)==null?void 0:l.isLog)!=null&&c.call(l,n)&&e!==null&&e!==void 0?+e:e}function Jr(t,e){return Hg(t,e,"x")}function Ts(t,e,n="y"){return Hg(t,e,n)}function Xg(t,e,n="y"){return e.map(r=>Ts(t,r,n))}function Qc(t,e){return e.map(n=>Jr(t,n)).filter(n=>{var r,a;return!(typeof n=="string"&&((a=(r=t.axis)==null?void 0:r.isCategorized)!=null&&a.call(r)))})}function Ua(t,e){const n=typeof e=="function"?e():e;return t.ticks?t.ticks(n):t.domain()}function Vg(t,e){const[n,r]=t.domain(),a=+n,s=+r;if(e||!Number.isFinite(a)||!Number.isFinite(s)||s<=0)return Ua(t,e);const o=ma("_log").domain([a>0?a:1,s]).range(t.range());let l=o.ticks();for(let c=s.toFixed().length;l.length>15;c--)l=o.ticks(c);return l.length&&(l.splice(0,1,n),l.splice(l.length-1,1,r)),l}function Ss(t,e){const n=+t,r=+e;return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r)<1e-6:t===e}function rA(t,e){const[n,r]=e,a=t.slice();return n!==void 0&&!a.some(s=>Ss(s,n))&&a.unshift(n),r!==void 0&&!a.some(s=>Ss(s,r))&&a.push(r),a}function jg(t,e){const n=Jr(t,e);return oo(n)}function _c(t){var e,n,r,a,s,o,l,c;const{scale:u}=t,f=(n=(e=u.zoom)==null?void 0:e.domain)==null?void 0:n.call(e),d=((a=(r=u.subX)==null?void 0:r.domain)==null?void 0:a.call(r))||((o=(s=u.x)==null?void 0:s.orgDomain)==null?void 0:o.call(s))||((c=(l=u.x)==null?void 0:l.domain)==null?void 0:c.call(l));return!(f!=null&&f.length)||!(d!=null&&d.length)?!1:!Ss(f[0],d[0])||!Ss(f[1],d[1])}function Yn(t){return _c(t)?t.scale.zoom:t.scale.x}function aA(t,e,n=0){var r,a;const s=(a=(r=Yn(t)).domain)==null?void 0:a.call(r);if(!(s!=null&&s.length))return!0;const o=jg(t,e),l=+s[0],c=+s[1];return o===null||!Number.isFinite(l)||!Number.isFinite(c)?!0:o>=Math.min(l,c)-n&&o<=Math.max(l,c)+n}function iA(t,e){const n=[e>0?Math.abs(t[e]-t[e-1]):1/0,e<t.length-1?Math.abs(t[e+1]-t[e]):1/0].filter(Number.isFinite),r=Math.min(...n);return Number.isFinite(r)?r/2:0}function Yg(t,e){let n=0,r=t.length;for(;n<r;){const a=n+r>>1;t[a]<e?n=a+1:r=a}return n}function sA(t,e){let n=0,r=t.length;for(;n<r;){const a=n+r>>1;t[a]<=e?n=a+1:r=a}return n}function oA(t,e){var n;const{axis:r,state:a}=t,s=[a.dataGeneration,(n=r==null?void 0:r.isTimeSeries)!=null&&n.call(r)?1:0,e.map(u=>`${u.id}:${u.values.length}`).join(",")].join("|"),o=a._canvasXDataTickCache;if((o==null?void 0:o.key)===s)return o;const l=t.mapTargetsToUniqueXs(e),c={key:s,values:l,comparable:l.map(u=>{var f;return(f=jg(t,u))!=null?f:NaN})};return a._canvasXDataTickCache=c,c}function lA(t,e){const{values:n,comparable:r}=e;if(!_c(t))return n;const a=Nd(t);if(!a||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>aA(t,f));const[s,o]=a;let l=Yg(r,s),c=sA(r,o);const u=f=>{const d=Yg(r,f);let h=-1,v=1/0;for(const b of[d-1,d]){const x=r[b],E=Math.abs(x-f);E<v&&(v=E,h=b)}h>-1&&h<r.length&&v<=iA(r,h)+1e-6&&(l=Math.min(l,h),c=Math.max(c,h+1))};return u(s),u(o),n.slice(Math.max(0,l),Math.min(n.length,c))}function cA(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function uA(t,e){var n,r,a;const{config:s,state:o}=t,c=(((r=(n=Yn(t)).domain)==null?void 0:r.call(n))||[]).map(f=>f instanceof Date?+f:String(f)).join(","),u=s.axis_rotated?o.height:o.width;return[e?1:0,o.dataGeneration,c,u,s.axis_x_tick_fit?1:0,s.axis_x_tick_count||"",s.axis_x_tick_culling,s.axis_x_tick_culling_max||"",s.axis_x_tick_culling_reverse?1:0,((a=s.axis_x_categories)==null?void 0:a.length)||0,cA(s.axis_x_tick_values,o.redrawGeneration)].join("|")}function qc(t,e,n,r=!1){var a;return(a=t.axis)!=null&&a.generateTickValues?t.axis.generateTickValues(e,n,r):e}function fA(t,e){const[n,r]=t,a=[];if(!e||!Number.isFinite(e))return a;for(let s=Math.round(n);s<=r;s+=e)a.push(s);return a}function Uo(t,e=!0){var n,r,a,s,o,l,c;const{axis:u,config:f}=t,d=Yn(t),h=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),v=t.state._canvasXTickValuesCache||(t.state._canvasXTickValuesCache=new Map),b=uA(t,e),x=v.get(b);if(x)return x;const E=k=>(v.set(b,k),k);if(!(h!=null&&h.length))return E([]);const w=zo(f.axis_x_tick_values,t.api);if(w){const k=Qc(t,w);return E(e?eu(t,k):k)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const k=oA(t,h),B=lA(t,k),G=qc(t,B,f.axis_x_tick_count,(r=u==null?void 0:u.isTimeSeries)==null?void 0:r.call(u));return E(e?eu(t,G,!0):G)}if(_c(t)&&!((a=u==null?void 0:u.isCategorized)!=null&&a.call(u))){const k=((o=(s=t.zoom)==null?void 0:s.getDomain)==null?void 0:o.call(s))||d.domain(),B=rA(Ua(d,f.axis_x_tick_count||Rr),k);return E(e?Go(B,nu(t)):B)}if((l=u==null?void 0:u.isCategorized)!=null&&l.call(u)&&((c=f.axis_x_categories)!=null&&c.length)){const k=f.axis_x_categories.map((B,G)=>G);return E(e?Go(k,nu(t)):k)}const N=Ua(d,f.axis_x_tick_count||Rr);return E(e?Go(N,nu(t)):N)}function dA(t){const{config:e,state:{height2:n,width2:r}}=t,a=e.axis_rotated?n:r,s=Mn(e,"x","count","subchart_axis_x"),o=Mn(e,"x","culling","subchart_axis_x"),l=Mn(e,"x","culling_max","subchart_axis_x");if(s)return s;if(o!==!1)return Math.min(l||Rr,Math.max(2,Math.floor(a/70)))}function Kg(t,e=!0){var n,r,a,s;const{axis:o,config:l,scale:c}=t,u=c.subX,f=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),d=Mn(l,"x","count","subchart_axis_x"),h=dA(t),v=(E,w=!1)=>e?eu(t,E,w,"subchart_axis_x",h):E;if(!u||!(f!=null&&f.length))return[];const b=zo(Mn(l,"x","values","subchart_axis_x"),t.api);if(b)return v(Qc(t,b));if(l.axis_x_tick_fit&&t.mapTargetsToUniqueXs){const E=qc(t,t.mapTargetsToUniqueXs(f),d,(r=o==null?void 0:o.isTimeSeries)==null?void 0:r.call(o));return v(E,!0)}if((a=o==null?void 0:o.isCategorized)!=null&&a.call(o)&&((s=l.axis_x_categories)!=null&&s.length))return v(l.axis_x_categories.map((E,w)=>w),!0);const x=Ua(u,d||Rr);return v(x,!0)}function Zg(t,e=Yn(t),n=t.config.axis_x_tick_outer){var r,a;const s=e,o=((r=s.orgDomain)==null?void 0:r.call(s))||((a=s.domain)==null?void 0:a.call(s));if(!(o!=null&&o.length))return[];const l=+o[0],c=+o[o.length-1];if(!Number.isFinite(l)||!Number.isFinite(c))return[];const u=Math.ceil(Math.min(l,c)),f=Math.floor(Math.max(l,c)),d=Array.from({length:Math.max(0,f-u+1)},(h,v)=>u+v);return n?d.slice(1,-1):d}function tu(t,e,n=Yn(t)){var r,a,s,o,l;const c=n,u=Jr(t,e);if((a=(r=t.axis)==null?void 0:r.isCategorized)!=null&&a.call(r)){const f=(s=c.orgScale)==null?void 0:s.call(c);if(f)return f(u);const d=((l=(o=t.axis.x)==null?void 0:o.tickOffset)==null?void 0:l.call(o))||(c(1)-c(0))/2;return c(u)-d}return c(u)}function Jg(t,e,n,r=Yn(t)){if(e.length<2)return!1;const a=Math.max(1,n)/2,s=e.map(l=>tu(t,l,r)).filter(Number.isFinite).sort((l,c)=>l-c);if(s.length<2)return!1;let o=s[0]+a;for(let l=1;l<s.length;l++){const c=s[l]-a,u=s[l]+a;if(c<=o+Md)return!0;o=Math.max(o,u)}return!1}function Wo(t,e,n=Yn(t)){const r=new Set;return e.filter(a=>{const s=tu(t,a,n),o=Math.round(s);return!Number.isFinite(s)||r.has(o)?!1:(r.add(o),!0)})}function hA(t,e,n=1){var r;const{axis:a,config:s}=t;if((r=a==null?void 0:a.isCategorized)!=null&&r.call(a)){const l=Zg(t);return Wo(t,l)}if(s.axis_x_tick_culling===!1||s.axis_x_tick_culling_lines===!1)return e;const o=Uo(t,!1);return Jg(t,o,n)?e:Wo(t,o)}function gA(t,e,n=1){var r;const{axis:a,config:s,scale:o}=t,l=o.subX,c=Mn(s,"x","culling","subchart_axis_x"),u=Mn(s,"x","culling_lines","subchart_axis_x"),f=Mn(s,"x","outer","subchart_axis_x");if(!l)return[];if((r=a==null?void 0:a.isCategorized)!=null&&r.call(a)){const h=Zg(t,l,f);return Wo(t,h,l)}if(c===!1||u===!1)return e;const d=Kg(t,!1);return Jg(t,d,n,l)?e:Wo(t,d,l)}function As(t,e="y",n,r=!0,a=t.scale[e],s=`axis_${e}`){var o,l,c;const{axis:u,config:f}=t,d=`axis_${e}`,h=zo(Mn(f,e,"values",s),t.api),v=E=>r?yA(t,e,E,s):E;if(h)return v(Xg(t,h,e));const b=fA(a.domain(),f[`${d}_tick_stepSize`]);if(b.length)return v(b);const x=n!=null?n:Mn(f,e,"count",s);if((o=u==null?void 0:u.isTimeSeries)!=null&&o.call(u,e)&&f[`${d}_tick_time_value`])return v(Ua(a,f[`${d}_tick_time_value`]));if((l=u==null?void 0:u.isLog)!=null&&l.call(u,e))return v(Vg(a,x));if(x){const E=a.domain();return v(qc(t,E,E.every(w=>w===0)?1:x,(c=u==null?void 0:u.isTimeSeries)==null?void 0:c.call(u,e)))}return v(Ua(a,Rr))}function vA(t,e,n){const r=e==="x"?Yn(t):t.scale[e],a=r!=null&&r.copy?r.copy():r;return n.domain&&(a!=null&&a.domain)&&a.domain(n.domain),a}function pA(t,e,n,r){var a,s,o;const l=r.tick||{},c=zo(l.values,t.api);return c?e==="x"?Qc(t,c):Xg(t,c,e):e!=="x"&&((s=(a=t.axis)==null?void 0:a.isLog)!=null&&s.call(a,e))?Vg(n,l.count):Ua(n,(o=l.count)!=null?o:Rr)}function mA(t,e){var n;const r=(n=e.tick)==null?void 0:n.format;return typeof r=="function"?r.bind(t.api):(a=>a)}function Go(t,e){const n=t.length-1;if(e&&n>e){const r=t.length-1;return e<=1?[t[0]]:Array.from({length:e},(a,s)=>t[Math.round(s*r/(e-1))])}return t}function yA(t,e,n,r=`axis_${e}`){const{config:a}=t;if(!Mn(a,e,"culling",r))return n;const o=Mn(a,e,"culling_max",r)||Rr,l=Mn(a,e,"culling_reverse",r),c=n.slice().sort((h,v)=>{const b=+h,x=+v,E=Number.isFinite(b)&&Number.isFinite(x)?b-x:String(h).localeCompare(String(v));return l?-E:E}),u=c.length;let f=0;for(let h=1;h<u;h++)if(u/h<o){f=h;break}if(!f)return n;const d=new Set(c.filter((h,v)=>v%f===0));return n.filter(h=>d.has(h))}function eu(t,e,n=!1,r="axis_x",a){const{config:s}=t;if(Mn(s,"x","culling",r)===!1)return e;const l=a||Mn(s,"x","culling_max",r)||Rr,c=Mn(s,"x","culling_reverse",r),u=n?e:e.slice().sort((v,b)=>{const x=+v,E=+b;return Number.isFinite(x)&&Number.isFinite(E)?c?E-x:x-E:c?String(b).localeCompare(String(v)):String(v).localeCompare(String(b))}),f=u.length;let d=0;for(let v=1;v<f;v++)if(f/v<l){d=v;break}if(!d)return e;if(n)return e.filter((v,b)=>c?(f-1-b)%d===0:b%d===0);const h=new Set(u.filter((v,b)=>b%d===0));return e.filter(v=>h.has(v))}function nu(t){const{config:e,state:{height:n,width:r}}=t,a=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||Rr,Math.max(2,Math.floor(a/70)))}function xA(t){var e,n;const{axis:r,config:a}=t,s=(n=(e=r==null?void 0:r.y)==null?void 0:e.getGeneratedTicks)==null?void 0:n.call(e,a.grid_y_ticks);return s!=null&&s.length?s:a.grid_y_ticks?Go(As(t,"y",void 0,!1),a.grid_y_ticks):As(t,"y",void 0,!1)}var bA=Object.defineProperty,TA=(t,e,n)=>e in t?bA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ru=(t,e,n)=>TA(t,typeof e!="symbol"?e+"":e,n);const Qg=20,_g=15;function au(t){return t?-1:1}function SA(t,e){return t?e?-1:1:e?1:-1}function iu(t,e,n){return{x:t.left-Qg,y:0,w:e+Qg*2,h:n}}function su(t,e,n){return{x:0,y:t.top-_g,w:e,h:n+_g*2}}function AA(t,e){var n,r;const a=(r=(n=t.config.axis_tooltip)==null?void 0:n.backgroundColor)!=null?r:"black";return typeof a=="string"?a:(a==null?void 0:a[e])||null}function EA(t,e,n){var r,a;const s=t.scale[e];if(!(s!=null&&s.invert))return null;const o=s.invert(n);if(o==null)return null;if(e==="x"&&((a=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&a.call(r)))return t.format.xAxisTick(o);const l=Number(o);return Number.isFinite(l)?l.toFixed(2):`${o}`}function CA(t,e){const{config:n,state:{height:r,margin:a,width:s}}=t,o=n.axis_rotated,l={x:a.left,y:a.top};return e==="x"?!o&&(l.y+=r):e==="y"?o&&(l.y+=r):o?l.y-=1:l.x+=s,l}function wA(t,e,n,r){return r?{x:t.x+n,y:t.y-e}:{x:t.x+e,y:t.y+n}}function ou(t,e){const n=t?t(e):e;return n==null?"":String(n)}function Es(t,e){return t[`${e}TickFont`]||t.labelFont}function lu(t,e){const n=t.measureText("0"),r=(n.fontBoundingBoxAscent||0)+(n.fontBoundingBoxDescent||0),a=(n.actualBoundingBoxAscent||0)+(n.actualBoundingBoxDescent||0),s=(e||10)*(11.5/10);return Math.max(e,r,a,s)}function IA(t){return 11.5-2.5*(t/15)*(t>0?1:-1)}function RA(t){return 8*Math.sin(Math.PI*(t/180))}function Ho(t,e){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?/em$/.test(t.trim())?n*e:n:0}return 0}function OA(t,e,n){if(!e)return[t];const r=n.measureText("0").width||5.5,a=[];let s=0;for(;;){let o,l=-1;for(let c=1;s+c<t.length;c++)if(t.charAt(s+c)===" "&&(o=c),e<r*(c+1)){l=c;break}if(l===-1)return a.push(t.slice(s)),a;a.push(t.slice(s,s+(o||l))),s+=o?o+1:l}}function cu(t,e,n,r){var a,s;const o=t.config.axis_x_tick_width;if(o&&o>0)return o;if(n)return 95;if((s=(a=t.axis)==null?void 0:a.isCategorized)!=null&&s.call(a)&&e.length>1){const l=r(Jr(t,e[0])),c=r(Jr(t,e[1]));return Math.max(0,Math.abs(c-l)-12)}return 110}function qg(t,e,n,r,a=[],s=!1,o=Yn(t),l){const c=n?n(r):r;if(c==null)return[""];if(Array.isArray(c))return c.map(f=>String(f));const u=String(c);return u.indexOf(`
|
|
33
35
|
`)>-1?u.split(`
|
|
34
|
-
`):t.config.axis_x_tick_multiline?
|
|
35
|
-
`),f=xr(o.font),d=f*1.5,{x:h,align:m}=P0(l.title_position,c.width),S=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,E=(l.title_padding.top||0)+S;s.withState(()=>{i.font=o.font,i.fillStyle=o.color,i.textAlign=m,i.textBaseline="alphabetic",u.forEach((C,w)=>{i.fillText(C,h,E+(w?f+(w-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:i}}}=this,{axis:s,config:o}=e,l=xr(i.labelFont),c=["x","y","y2"],u={x:i.xLabelColor,y:i.yLabelColor,y2:i.y2LabelColor},f={start:"left",middle:"center",end:"right"};s&&r.withState(()=>{n.font=i.labelFont,n.textBaseline="alphabetic",c.forEach(d=>{const h=s.getLabelText(d);if(!h||!o[`axis_${d}_show`]||d==="y2"&&!e.scale.y2)return;const m=d==="x"&&o.axis_rotated||d!=="x"&&!o.axis_rotated,S=C0(e,d),E=s.xForAxisLabel(d)+ql(s.dxForAxisLabel(d),l),C=ql(s.dyForAxisLabel(d),l),{x:w,y:$}=I0(S,E,C,m),z=s.textAnchorForAxisLabel(d);n.fillStyle=u[d]||i.labelColor,n.textAlign=f[z]||"center",r.text(String(h),w,$,{angle:m?-90:0})})})}drawGrid(e){const{ctx:n,painter:r,theme:{style:{grid:i}}}=this,{config:s,scale:o,state:{height:l,margin:c,width:u}}=e;if(!i.lineColor)return;const f=s.axis_rotated,d=c.left,h=c.left+u,m=c.top,S=c.top+l;r.withState(()=>{n.strokeStyle=i.lineColor,n.lineWidth=i.lineWidth,i.dashArray.length&&n.setLineDash(i.dashArray),s.grid_x_show&&o.x&&r.strokePath(()=>{for(const E of so(e)){const C=nc(e,E);ua(C)&&(f?r.traceCrispLine(d,c.top+C,h,c.top+C,i.lineWidth):r.traceCrispLine(c.left+C,m,c.left+C,S,i.lineWidth))}}),s.grid_y_show&&o.y&&r.strokePath(()=>{for(const E of u0(e)){const C=Hi(e,E),w=o.y(C);ua(w)&&(f?r.traceCrispLine(c.left+w,m,c.left+w,S,i.lineWidth):r.traceCrispLine(d,c.top+w,h,c.top+w,i.lineWidth))}}),!s.grid_lines_front&&this.drawGridLines(e)})}drawRegions(e){const{ctx:n,painter:r,theme:{style:{region:i}}}=this,{config:s,state:{height:o,margin:l,width:c}}=e,u=s.regions||[];u.length&&r.clipRect({x:l.left,y:l.top,w:c,h:o},()=>{var f;n.fillStyle=i.fill,n.font=i.labelFont,n.textBaseline="top";for(const d of u){const h=F0(e,d);if(!h||!ua(h.x)||!ua(h.y)||!h.w||!h.h)continue;const m=l.left+h.x,S=l.top+h.y,E=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:S,w:E,h:C}),(f=d.label)!=null&&f.text){const w=d.label,$=w.center||"",z=String(w.text),B=r.measureText(z).width,W=parseFloat(n.font)||12;let H=m+(w.x||0),Q=S+(w.y||0);$.indexOf("x")>-1&&(H+=(E-B)/2),$.indexOf("y")>-1&&(Q+=(C-W)/2),r.text(z,H,Q,{angle:w.rotated?-90:0,alpha:1,fill:w.color||i.labelColor})}}})}drawGridLines(e){const{ctx:n,painter:r,theme:{style:{axis:i,grid:s}}}=this,{config:o,scale:l,state:{height:c,margin:u,width:f}}=e,d=o.axis_rotated,h=u.left,m=u.left+f,S=u.top,E=u.top+c;s.lineColor&&r.withState(()=>{n.strokeStyle=s.lineColor,n.lineWidth=s.lineWidth,n.font=s.labelFont||i.labelFont,n.fillStyle=s.labelColor,n.textBaseline="middle",n.setLineDash([]);const C=(W,H,Q,q=!1,st)=>{W&&r.text(W,H,Q,ud(cd({},st),{angle:q?-90:0}))},w=(W,H,Q)=>{const q=b0(this.theme.getGridLineStyle(H,W,"line"));r.strokePath(Q,q)},$=(W,H)=>S0(this.theme.getGridLineStyle(W,H,"text")),z=W=>{if(W.value===void 0||!l.x)return;const H=nc(e,W.value);if(ua(H))if(d){const Q=u.top+H;w(W,"x",()=>{r.traceLine(h,Q,m,Q)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,xd(W.position,h,m),Q-5,!1,$("x",W))}else{const Q=u.left+H;w(W,"x",()=>{r.traceLine(Q,S,Q,E)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,Q-5,yd(W.position,S,E),!0,$("x",W))}},B=W=>{const H=W.axis==="y2"?l.y2:l.y,Q=W.axis==="y2"?"y2":"y";if(W.value===void 0||!H)return;const q=Hi(e,W.value,Q),st=H(q);if(ua(st))if(d){const it=u.left+st;w(W,"y",()=>{r.traceLine(it,S,it,E)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,it-5,yd(W.position,S,E),!0,$("y",W))}else{const it=u.top+st;w(W,"y",()=>{r.traceLine(h,it,m,it)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,xd(W.position,h,m),it-5,!1,$("y",W))}};(o.grid_x_lines||[]).forEach(z),(o.grid_y_lines||[]).forEach(B)})}drawAdditionalAxes(e){["x","y","y2"].forEach(n=>{const r=e.config[`axis_${n}_axes`]||[];!r.length||!e.scale[n]||!e.config[`axis_${n}_show`]||r.forEach((i,s)=>{var o;const l=s0(e,n,i);if(!l)return;const c={scale:l,ticks:o0(e,n,l,i),format:l0(e,i),index:s+1,outerTick:((o=i.tick)==null?void 0:o.outer)!==!1};n==="x"?this.drawXAxis(e,c):this.drawYAxis(e,n,c)})})}drawXAxis(e,n){var r;const{ctx:i,painter:s,theme:{style:{axis:o}}}=this,{axis:l,config:c,state:{current:u,margin:f,width:d,height:h}}=e,m=c.axis_rotated,S=n!=null&&n.index?e.getAxisSize("x")*n.index:0,E=(n==null?void 0:n.scale)||Zn(e),C=s.crisp(f.left-(m?S:0),o.lineWidth),w=s.crisp(f.top+h+(m?0:S),o.lineWidth),$=f.left,z=f.left+d,B=f.top,W=f.top+h,H=m?B:$,Q=m?W:z,q=(n==null?void 0:n.ticks)||so(e),st=(n==null?void 0:n.ticks)||a0(e,q,o.tickWidth),it=(n==null?void 0:n.format)||l.getXAxisTickFormat(),ot=n?n.outerTick:c.axis_x_tick_outer,ct=m?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,gt=gd(m),tt=Zl(m),ft=c.axis_x_tick_text_position,lt=m?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0;s.clipRect(m?Ql(f,u.width,h):Jl(f,d,u.height),()=>{if(i.strokeStyle=o.lineColor,i.lineWidth=o.lineWidth,s.strokePath(()=>{m?s.traceLine(C,B,C,W):s.traceLine($,w,z,w),ot&&(m?(s.traceLine(C,B,C+xt*gt,B),s.traceLine(C,W,C+xt*gt,W)):(s.traceLine($,w,$,w+xt*gt),s.traceLine(z,w,z,w+xt*gt)))}),i.font=Zi(o,"x"),i.fillStyle=o.labelColor,i.textAlign=m?tt>0?"left":"right":"center",i.textBaseline=m?"middle":tt>0?"top":"bottom",i.strokeStyle=o.tickColor,i.lineWidth=o.tickWidth,c.axis_x_tick_show&&s.strokePath(()=>{for(const Ot of st){const Kt=Vl(e,Ot,E),ee=f.left+Kt,Ae=f.top+Kt;co(m?Ae:ee,H,Q)&&(m?s.traceLine(C,Ae,C+xt*ct,Ae):s.traceLine(ee,w,ee,w+xt*ct))}}),!n&&!c.axis_x_tick_text_show)return;const bt=Zi(o,"x"),St=_l(s,xr(bt)),Mt=tc(e,q,m,E);q.forEach((Ot,Kt)=>{this.drawXAxisTickText(e,Ot,it,o.labelColor,{isRotated:m,rangeEnd:Q,rangeStart:H,tickCount:q.length,tickFont:bt,tickIndex:Kt,tickLineHeight:St,tickTextDirection:tt,tickTextWidth:Mt,tickRotate:lt,tickTextPosition:ft,targetScale:E,ticks:q,x:C,y:w})})})}drawFocusedXAxisTick(e,n){var r;const{painter:i,theme:{style:{axis:s}}}=this,{axis:o,config:l,state:{current:c,margin:u,width:f,height:d}}=e,h=(r=n==null?void 0:n[0])==null?void 0:r.x;if(h===void 0||!o||!l.axis_x_show||!l.axis_x_tick_text_show||!s.activeLabelColor||s.activeLabelColor===s.labelColor)return;const m=so(e),S=m.findIndex(Q=>Yi(Q,h)),E=m[S];if(E===void 0)return;const C=l.axis_rotated,w=i.crisp(u.left,s.lineWidth),$=i.crisp(u.top+d,s.lineWidth),z=C?u.top:u.left,B=C?u.top+d:u.left+f,W=o.getXAxisTickFormat(),H=Zl(C);i.clipRect(C?Ql(u,c.width,d):Jl(u,f,c.height),()=>{var Q;this.drawXAxisTickText(e,E,W,s.activeLabelColor,{isRotated:C,rangeEnd:B,rangeStart:z,targetScale:Zn(e),tickCount:m.length,tickIndex:S,tickTextDirection:H,tickRotate:C?0:((Q=e.getAxisTickRotate)==null?void 0:Q.call(e,"x"))||0,tickTextPosition:l.axis_x_tick_text_position,ticks:m,x:w,y:$})})}drawAxisTooltip(e,n){const{ctx:r,painter:i,theme:{style:{axis:s,grid:o}}}=this,{config:l,state:{margin:c,width:u,height:f}}=e;if(!l.axis_tooltip||!n)return;const d=l.axis_rotated,h=n[0]-c.left,m=n[1]-c.top,S=h>=0&&h<=u,E=m>=0&&m<=f;if(!S&&!E)return;const C=c.left+h,w=c.top+m,$=xr(s.labelFont),z=$||10,B=(W,H,Q,q,st)=>{const it=A0(e,W),ot=it&&E0(e,W,H);if(!ot)return;r.font=s.labelFont,r.textAlign=st,r.textBaseline="alphabetic";const ct=r.measureText(ot),gt=ct.width,tt=ct.actualBoundingBoxAscent||z*.8,ft=ct.actualBoundingBoxDescent||z*.2,lt=Math.max(2,gt*.15),bt=Math.max(3,z*.25),St=st==="right"?Q-gt:st==="center"?Q-gt/2:Q,Mt=q-tt;r.fillStyle=it,r.fillRect(St-lt,Mt-bt,gt+lt*2,tt+ft+bt*2),r.fillStyle="#fff",r.fillText(ot,Q,q)};i.withState(()=>{r.strokeStyle=o.lineColor,r.lineWidth=o.lineWidth,r.setLineDash([]),i.strokePath(()=>{S&&i.traceLine(C,c.top,C,c.top+f),E&&i.traceLine(c.left,w,c.left+u,w)}),r.setLineDash([]),d?(E&&l.axis_x_show&&B("x",m,c.left-$*.3,w+$*.4,"right"),S&&l.axis_y_show&&B("y",h,C-$*1.3,c.top+f+$*1.15,"left"),S&&l.axis_y2_show&&e.scale.y2&&B("y2",h,C-$*1.3,c.top-$*.4,"left")):(S&&l.axis_x_show&&B("x",h,C-$,c.top+f+$*1.15,"left"),E&&l.axis_y_show&&B("y",m,c.left-$*.4,w+$*.3,"right"),E&&l.axis_y2_show&&e.scale.y2&&B("y2",m,c.left+u+$*.4,w+$*.3,"left"))})}drawXAxisTickText(e,n,r,i,s){var o,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{state:{margin:d}}=e,{isRotated:h,rangeEnd:m,rangeStart:S,tickTextDirection:E,tickRotate:C,tickTextPosition:w,targetScale:$,ticks:z,x:B,y:W}=s,H=nc(e,n,$),Q=d.left+H,q=d.top+H;if(!co(h?q:Q,S,m))return;const it=(o=s.tickFont)!=null?o:Zi(f,"x");c.font=it,c.fillStyle=i;const ot=vd(e,u,r,n,z,h,$,s.tickTextWidth),ct=(l=s.tickLineHeight)!=null?l:_l(u,xr(it));let gt,tt;if(h)gt=B+(xt+mt)*E+(w.x||0),tt=q+(w.y||0),c.textAlign=ec(e,s),c.textBaseline="middle";else if(C){const ft=xr(it),lt=w.y?ql(w.y,ft):.71*ft,bt=w0(C)+(w.x||0),St=R0(C)+lt;c.textAlign=ec(e,s),c.textBaseline="alphabetic",u.withState(Mt=>{Mt.translate(Q,W),Mt.rotate(C*Math.PI/180),ot.forEach((Ot,Kt)=>{Mt.fillText(Ot,bt,St+Kt*ct)})});return}else gt=Q+(w.x||0),tt=W+(xt+mt)*E+(w.y||0),c.textAlign=ec(e,s),c.textBaseline=E>0?"top":"bottom";u.withState(ft=>{ft.translate(gt,tt),C&&ft.rotate(C*Math.PI/180),ot.forEach((lt,bt)=>{ft.fillText(lt,0,bt*ct)})})}drawYAxis(e,n="y",r){var i,s,o,l,c,u,f,d;const{ctx:h,painter:m,theme:{style:{axis:S}}}=this,{config:E,scale:C,state:w}=e,{margin:$,width:z,height:B}=w,W=(r==null?void 0:r.margin)||$,H=(i=r==null?void 0:r.width)!=null?i:z,Q=(s=r==null?void 0:r.height)!=null?s:B,q=(r==null?void 0:r.prefix)||`axis_${n}`,st=(r==null?void 0:r.scale)||C[n],it=n==="y2",ot=E.axis_rotated,ct=r!=null&&r.index?e.getAxisSize(n)*r.index:0,gt=m.crisp(W.left+(it?H+(ot?0:ct):-ct),S.lineWidth),tt=m.crisp(W.top+(ot?it?-ct-1:Q+ct:0),S.lineWidth),ft=W.left,lt=W.left+H,bt=W.top,St=W.top+Q,Mt=(r==null?void 0:r.ticks)||Ki(e,n),Ot=(r==null?void 0:r.ticks)||(E[`${q}_tick_culling`]&&E[`${q}_tick_culling_lines`]!==!1?Ki(e,n,void 0,!1):Mt),Kt=(r==null?void 0:r.format)||((c=(l=(o=e.axis)==null?void 0:o[n])==null?void 0:l.tickFormat)==null?void 0:c.call(l))||((u=E[`${q}_tick_format`])==null?void 0:u.bind(e.api))||(Zt=>Zt),ee=r?r.outerTick:E[`${q}_tick_outer`],Ae=ot?it?E.axis_y2_tick_inner?1:-1:E.axis_y_tick_inner?-1:1:it?E.axis_y2_tick_inner?-1:1:E.axis_y_tick_inner?1:-1,Ee=M0(E,ot,it),Te=y0(ot,it),De=(r==null?void 0:r.tickTextPosition)||E[`${q}_tick_text_position`]||E[`axis_${n}_tick_text_position`],me=(f=r==null?void 0:r.tickShow)!=null?f:r?!0:E[`${q}_tick_show`],Pe=(d=r==null?void 0:r.tickTextShow)!=null?d:r?!0:E[`${q}_tick_text_show`];m.withState(()=>{h.strokeStyle=S.lineColor,h.lineWidth=S.lineWidth,m.strokePath(()=>{ot?m.traceLine(ft,tt,lt,tt):m.traceLine(gt,bt,gt,St),ee&&(ot?(m.traceLine(ft,tt,ft,tt+xt*Ee),m.traceLine(lt,tt,lt,tt+xt*Ee)):(m.traceLine(gt,bt,gt+xt*Ee,bt),m.traceLine(gt,St,gt+xt*Ee,St)))});const Zt=Zi(S,n);h.font=Zt,h.fillStyle=S.labelColor,h.textAlign=ot?"center":Te>0?"left":"right",h.textBaseline=ot?Te>0?"top":"bottom":"middle",h.strokeStyle=S.tickColor,h.lineWidth=S.tickWidth;const he=[],ge=[],Wt=(We,Xe)=>{const pn=Hi(e,We,n),Cn=W.left+st(pn),be=W.top+st(pn);ua(ot?Cn:be)&&Xe.push({tick:We,tx:Cn,ty:be})};for(const We of Mt)Wt(We,he);for(const We of Ot)Wt(We,ge);if(me&&m.strokePath(()=>{for(const{tx:We,ty:Xe}of ge)ot?m.traceLine(We,tt,We,tt+xt*Ae):m.traceLine(gt,Xe,gt+xt*Ae,Xe)}),Pe)for(const{tick:We,tx:Xe,ty:pn}of he)ot?m.text(hd(Kt,We),Xe+(De.x||0),tt+xt*Te+(De.y||0)):m.text(hd(Kt,We),gt+(xt+mt)*Te+(De.x||0),pn+(De.y||0))})}}const cr={canvas:"bb-canvas",overlay:"bb-canvas-overlay",legend:"bb-canvas-legend",legendBottom:"bb-canvas-legend-bottom",legendInset:"bb-canvas-legend-inset",legendItemInteractive:"bb-legend-item-interactive",legendItemTileCircle:"bb-legend-item-tile-circle",legendItemTitle:"bb-legend-item-title",legendRight:"bb-canvas-legend-right"};var Aw=cr,$0=Object.defineProperty,B0=(t,e,n)=>e in t?$0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ri=(t,e,n)=>B0(t,typeof e!="symbol"?e+"":e,n);class z0{constructor(){ri(this,"canvas"),ri(this,"ctx"),ri(this,"dpr",1),ri(this,"frame",null),ri(this,"frameCtx",null),ri(this,"frameValid",!1)}init(e,n,r){this.canvas=Ye.createElement("canvas"),this.canvas.className=cr.canvas,this.canvas.style.display="block",e.appendChild(this.canvas),this.dpr=se.devicePixelRatio||1,this.ctx=this.canvas.getContext("2d"),this.resize(n,r)}resize(e,n){const r=Math.max(0,e),i=Math.max(0,n);this.dpr=se.devicePixelRatio||1,this.canvas.width=r*this.dpr,this.canvas.height=i*this.dpr,this.canvas.style.width=`${r}px`,this.canvas.style.height=`${i}px`,this.ctx.setTransform(this.dpr,0,0,this.dpr,0,0),this.frame=null,this.frameCtx=null,this.frameValid=!1}clearOverlay(){this.frameValid&&this.restoreFrame()}withOverlay(e){const{ctx:n}=this;this.frameValid?this.clearOverlay():this.captureFrame(),n.save(),n.setTransform(this.dpr,0,0,this.dpr,0,0);try{e(n)}finally{n.restore()}}beginFrame(e,n){const{ctx:r}=this;this.frameValid=!1,r.save(),r.setTransform(this.dpr,0,0,this.dpr,0,0),r.clearRect(0,0,e,n)}endFrame(){this.ctx.restore()}captureFrame(){const{canvas:e}=this;if(this.frameValid=!1,e.width&&e.height){let{frame:n,frameCtx:r}=this;if(!n){const i=Ye.createElement("canvas");n=i,r=i.getContext("2d"),this.frame=n,this.frameCtx=r}if(!n||!r)return;r.setTransform(1,0,0,1,0,0),n.width!==e.width||n.height!==e.height?(n.width=e.width,n.height=e.height):r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0),this.frameValid=!0}}restoreFrame(){if(!this.frameValid||!this.frame||!this.frameCtx)return;const{canvas:e,ctx:n}=this;n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),n.drawImage(this.frame,0,0),n.restore(),n.setTransform(this.dpr,0,0,this.dpr,0,0)}destroy(){var e;(e=this.canvas)==null||e.remove(),this.frame=null,this.frameCtx=null,this.frameValid=!1}}function rc(t){const{config:e,state:n}=t;return!!(e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&e.subchart_show&&e.subchart_brush_enabled===!1&&n.width2>0&&n.height2>0)}function Td(t,e){var n;const{config:r,scale:i,state:s}=t,o=i.zoom||i.x,l=i.subX;if(!o||!l)return null;const c=r.axis_rotated?s.height2:s.width2,u=r.axis_rotated?s.height:s.width,f=(n=l.invert)==null?void 0:n.call(l,e);let d=f==null?NaN:o(f);return!Number.isFinite(d)&&c>0&&(d=Math.max(0,Math.min(1,e/c))*u),Number.isFinite(d)?Math.max(0,Math.min(u,d)):null}const ac=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bd=/([aAcChHlLmMqQsStTvVzZ])|([-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?)/g;function U0(t){const e=new Set;let n=-1,r=0,i=!1,s;for(bd.lastIndex=0;s=bd.exec(t);)if(s[1])i=s[1]==="a"||s[1]==="A",r=0;else if(n++,i){const o=r%7;(o===2||o===3||o===4)&&e.add(n),r++}return e}function k0(t,e){const n=U0(e),r=[],i=[];let s=0,o=-1,l=-1,c,u;const f=m=>{r[o]?r[o]+=m:r[++o]=m};ac.lastIndex=0;const d=ac,h=new RegExp(ac.source,"g");for(t+="",e+="";(c=d.exec(t))&&(u=h.exec(e));){if(l++,u.index>s&&f(e.slice(s,u.index)),c[0]===u[0])f(u[0]);else{const m=+c[0],S=+u[0],E=n.has(l);r[++o]=null,i.push({index:o,fn:E?C=>Math.round(m+(S-m)*C):C=>m+(S-m)*C})}s=h.lastIndex}if(s<e.length&&f(e.slice(s)),!i.length){const m=r.join("");return()=>m}return m=>{for(let S=0,E=i.length;S<E;S++){const{index:C,fn:w}=i[S];r[C]=String(w(m))}return r.join("")}}function uo(t){const{bar_radius:e,bar_radius_ratio:n}=t.config;return ae(e)&&e>0?()=>e:ae(n)?r=>r*n:null}function ic(t){const{config:e,data:n}=t,r=new Set;if(!e.data_groups.length)return r;const i=t.orderTargets(t.filterTargetsToShow(n.targets.filter(t.isBarType,t)));for(const s of e.data_groups){const o=new Set(s),l=new Map,c=new Map;for(const u of i)if(o.has(u.id))for(const f of u.values)f.value===null||f.value===0||(f.value>0?l:c).set(f.index,u.id);for(const[u,f]of l)r.add(`${f}:${u}`);for(const[u,f]of c)r.add(`${f}:${u}`)}return r}function G0(t,e,n){return n?t?e?{tl:n,bl:n}:{tr:n,br:n}:e?{br:n,bl:n}:{tl:n,tr:n}:0}function X0(t,e,n,r){let i="";return n?r&&t[0]<e?i=`0 ${e-t[0]}px 0 0`:!r&&t[0]>e&&(i=`0 0 0 ${t[0]-e}px`):r&&t[1]>e?i=`${t[1]-e}px 0 0 0`:!r&&t[1]<e&&(i=`0 0 ${e-t[1]}px 0`),i?`inset(${i})`:null}function sc(t,e,n,r,i,s){const{config:o,state:l}=t,c=o.axis_rotated,u=+c,f=+!u,d=e.value<0,h=o[`axis_${t.axis.getId(e.id)}_inverted`],m=!h&&d||h&&!d,S=t.isGrouped(e.id),E=r&&S&&e.value!==0?l.hiddenTargetIds.has(e.id)&&s?s(e):i.has(`${e.id}:${e.index}`):!1,C=[n[0][u],n[0][f]];let w=0;if(r){const z=c?f:u,B=Math.abs(n[2][z]-n[0][z]);w=Math.max(0,!S||E?r(B):0)}const $=c?n[1][u]+(m?w:-w):n[1][f]+(m?-w:w);return{radius:w,corners:G0(c,m,w),clipPath:w?X0(C,$,c,m):null,indexX:u,indexY:f,isNegative:m,pos:$}}const Sd="2 2";function Ad(t,e,n){const r=t.axis.isTimeSeries(),i=(s,o)=>mn(s)?o:r?Wn.call(t,s):s;return(n||[]).map(s=>{var o,l;return{start:i(s.start,(o=e[0])==null?void 0:o.x),end:i(s.end,(l=e[e.length-1])==null?void 0:l.x),style:s.style||{dasharray:Sd}}})}function Ed(t,e){for(let n=0,r;r=e[n];n++)if(r.start<t&&t<=r.end)return r.style;return!1}function W0(t){const e=String((t==null?void 0:t.dasharray)||Sd).split(/[\s,]+/).map(Number).filter(Number.isFinite);return e.length?e:[2,2]}function V0(t,e,n,r,i){const s=t.config.axis_rotated,o=Ad(t,e,i),l=[];for(let c=1;c<e.length;c++){const u=e[c-1],f=e[c];if(!Ge(u.value)||!Ge(f.value)){l.push({isBreak:!0});continue}const d=Ed(f.x,o),h=n(u.x),m=r(u.value),S=n(f.x),E=r(f.value);l.push({start:s?[m,h]:[h,m],end:s?[E,S]:[S,E],dash:d?W0(d):[]})}return l}function fo(t,e){return t.config.axis_rotated?[e[1],e[0]]:[e[0],e[1]]}function Cd(t,e,n=1){const r=e.map(h=>fo(t,h)),i=r.map(([h])=>h),s=r.map(([,h])=>h),o=Math.min(...i),l=Math.min(...s),c=Math.max(...i)-o,u=Math.max(...s)-l,f=Math.max(n,c),d=Math.max(n,u);return{x:o-(f-c)/2,y:l-(d-u)/2,w:f,h:d}}function Ji(t,e){var n,r;const i=(n=t.isGrouped)!=null&&n.call(t,e.id)&&t.circleY?t.circleY(e,e.index):t.getYScaleById(e.id)(t.getBaseValue(e)),s=(r=t.xx(e))!=null?r:NaN;return t.config.axis_rotated?{x:i,y:s}:{x:s,y:i}}function j0(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function H0(t,e){return{body:Cd(t,[e[0],e[1]]),wickStart:fo(t,[e[2][0],e[2][1]]),wickEnd:fo(t,[e[2][0],e[2][2]])}}function ai(t,e,n,r=!1){if(e===n)return{x:0,y:0,w:t.state.width,h:0};const{scale:{x:i,y:s}}=t,o=i(e.x0),l=s(e.y0),c=i(e.x1)-o,u=s(e.y1)-l;return{x:o,y:l,w:r?Math.max(0,c):c,h:r?Math.max(0,u):u}}function Y0(t,e,n,r){const{config:i}=t,{id:s,value:o,ratio:l=0}=e,c=i.treemap_label_format,u=typeof c=="function"?c.bind(t.api)(o,l,s,{width:n,height:r}):`${s}
|
|
36
|
-
${(l*100).toFixed(2)}%`;return u==null?null:String(u)}var Ew=Array.prototype.slice;function oc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Je(t){return function(){return t}}function Id(t){this._context=t}Id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function ho(t){return new Id(t)}var K0=Math.pow;const lc=Math.PI,cc=2*lc,La=1e-6,Z0=cc-La;function Rd(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function J0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Rd;const n=K0(10,e);return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class vo{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Rd:J0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,s,o){this._append`C${+e},${+n},${+r},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(e,n,r,i,s){if(e=+e,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,c=r-e,u=i-n,f=o-e,d=l-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>La)if(!(Math.abs(d*c-u*f)>La)||!s)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-o,S=i-l,E=c*c+u*u,C=m*m+S*S,w=Math.sqrt(E),$=Math.sqrt(h),z=s*Math.tan((lc-Math.acos((E+h-C)/(2*w*$)))/2),B=z/$,W=z/w;Math.abs(B-1)>La&&this._append`L${e+B*f},${n+B*d}`,this._append`A${s},${s},0,0,${+(d*m>f*S)},${this._x1=e+W*c},${this._y1=n+W*u}`}}arc(e,n,r,i,s,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=e+l,f=n+c,d=1^o,h=o?i-s:s-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>La||Math.abs(this._y1-f)>La)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%cc+cc),h>Z0?this._append`A${r},${r},0,1,${d},${e-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>La&&this._append`A${r},${r},0,${+(h>=lc)},${d},${this._x1=e+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Q0(){return new vo}Q0.prototype=vo.prototype;function Cw(t=3){return new vo(+t)}function uc(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new vo(e)}function wd(t){return t[0]}function Od(t){return t[1]}function fc(t,e){var n=Je(!0),r=null,i=ho,s=null,o=uc(l);t=typeof t=="function"?t:t===void 0?wd:Je(t),e=typeof e=="function"?e:e===void 0?Od:Je(e);function l(c){var u,f=(c=oc(c)).length,d,h=!1,m;for(r==null&&(s=i(m=o())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(d,u,c),+e(d,u,c));if(m)return s=null,m+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:Je(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:Je(+c),l):e},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Je(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(s=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=s=null:s=i(r=c),l):r},l}function _0(t,e,n){var r=null,i=Je(!0),s=null,o=ho,l=null,c=uc(u);t=typeof t=="function"?t:t===void 0?wd:Je(+t),e=typeof e=="function"?e:Je(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Od:Je(+n);function u(d){var h,m,S,E=(d=oc(d)).length,C,w=!1,$,z=new Array(E),B=new Array(E);for(s==null&&(l=o($=c())),h=0;h<=E;++h){if(!(h<E&&i(C=d[h],h,d))===w)if(w=!w)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),S=h-1;S>=m;--S)l.point(z[S],B[S]);l.lineEnd(),l.areaEnd()}w&&(z[h]=+t(C,h,d),B[h]=+e(C,h,d),l.point(r?+r(C,h,d):z[h],n?+n(C,h,d):B[h]))}if($)return l=null,$+""||null}function f(){return fc().defined(i).curve(o).context(s)}return u.x=function(d){return arguments.length?(t=typeof d=="function"?d:Je(+d),r=null,u):t},u.x0=function(d){return arguments.length?(t=typeof d=="function"?d:Je(+d),u):t},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Je(+d),u):r},u.y=function(d){return arguments.length?(e=typeof d=="function"?d:Je(+d),n=null,u):e},u.y0=function(d){return arguments.length?(e=typeof d=="function"?d:Je(+d),u):e},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Je(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Je(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,s!=null&&(l=o(s)),u):o},u.context=function(d){return arguments.length?(d==null?s=l=null:l=o(s=d),u):s},u}var q0=Object.defineProperty,tT=Object.defineProperties,eT=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,rT=Object.prototype.propertyIsEnumerable,Md=(t,e,n)=>e in t?q0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ld=(t,e)=>{for(var n in e||(e={}))nT.call(e,n)&&Md(t,n,e[n]);if(Pd)for(var n of Pd(e))rT.call(e,n)&&Md(t,n,e[n]);return t},Dd=(t,e)=>tT(t,eT(e));function Fd(t,e){return e?n=>{var r;const i=(r=t.getSubchartCandlestickShapeValue)==null?void 0:r.call(t,n,!0);return i===void 0?t.getBaseValue(n):i}:n=>t.getBaseValue(n)}function Nd(t,e,n){return n?e.map(r=>{var i;const s=(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,r,n);return s===void 0?r:Dd(Ld({},r),{value:s})}):e}function aT(t,e,n){return t.isStepType(e)?t.convertValuesToStep(n):n}function $d(t,e,n,r){const{config:i,scale:s}=t,o=i.line_connectNull,l=i.axis_rotated,c=t.generateGetLinePoints(e,n),u=t.getYScaleById.bind(t),f=Fd(t,n),d=E=>(n?t.subxx:t.xx).call(t,E),h=(E,C)=>t.isGrouped(E.id)?c(E,C)[0][1]:u(E.id,n)(f(E));let m=fc();m=l?m.x(h).y(d):m.x(d).y(h),r&&(m=m.context(r)),o||(m=m.defined(E=>f(E)!==null));const S=n?s.subX:s.x;return E=>{const C=u(E.id,n);let w=o?t.filterRemoveNull(E.values):E.values,$=0,z=0,B;if(t.isLineType(E)){const W=i.data_regions[E.id];W&&!r&&t.lineWithRegions?(w=Nd(t,w,n),t.isAreaRangeType(E)&&(w=w.map(H=>Dd(Ld({},H),{value:t.getRangedData(H,"mid")}))),t.isStepType(E)&&(w=t.convertValuesToStep(w)),B=t.lineWithRegions(w,s.zoom||S,C,W)):B=m.curve(t.getCurve(E))(aT(t,E,w))}else w[0]&&($=S(w[0].x),z=C(f(w[0]))),B=l?`M ${z} ${$}`:`M ${$} ${z}`;return B||(r?void 0:"M 0 0")}}function Bd(t,e,n,r){const{config:i}=t,s=i.line_connectNull,o=i.axis_rotated,l=t.generateGetAreaPoints(e,n),c=t.getYScaleById.bind(t),u=Fd(t,n),f=new Map,d=E=>{let C=f.get(E);return C===void 0&&(C=t.getShapeYMin(E,n),f.set(E,C)),C},h=E=>(n?t.subxx:t.xx).call(t,E),m=(E,C)=>t.isGrouped(E.id)?l(E,C)[0][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"high"):d(E.id)),S=(E,C)=>t.isGrouped(E.id)?l(E,C)[1][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"low"):u(E));return E=>{let C=s?t.filterRemoveNull(E.values):E.values,w=0,$=0,z;if(t.isAreaType(E)){let B=_0();B=o?B.y(h).x0(m).x1(S):B.x(h).y0(i.area_above?0:i.area_below?n?t.state.height2:t.state.height:m).y1(S),r&&(B=B.context(r)),s||(B=B.defined(W=>u(W)!==null)),C=Nd(t,C,n),t.isStepType(E)&&(C=t.convertValuesToStep(C)),z=B.curve(t.getCurve(E))(C)}else C[0]&&(w=(n?t.scale.subX:t.scale.x)(C[0].x),$=t.getYScaleById(E.id,n)(u(C[0]))),z=o?`M ${$} ${w}`:`M ${w} ${$}`;return z||(r?void 0:"M 0 0")}}let jr;function go(t,e){if(!ae(e)||e>=1)return t;const n=t.match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(n){const s=(n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1]).match(/.{2}/g);return s?`rgba(${s.map(l=>parseInt(l,16)).join(",")},${e})`:t}if(/^rgb\(/i.test(t))return t.replace(/^rgb\((.*)\)$/i,`rgba($1,${e})`);if(/^rgba\(/i.test(t))return t.replace(/^rgba\((.*),\s*([\d.]+)\)$/i,(i,s,o)=>`rgba(${s},${Number(o)*e})`);const r=iT(t);return r&&r!==t?go(r,e):t}function iT(t){if(!se.document||(jr===void 0&&(jr=se.document.createElement("canvas").getContext("2d")),!jr))return null;jr.fillStyle="#000",jr.fillStyle=t;const e=jr.fillStyle;jr.fillStyle="#fff",jr.fillStyle=t;const n=jr.fillStyle;return e===n?e:null}function Qi(t,e,n,r){const i=e(n,r),s=Cd(t,i);return gn(s.x,s.y)&&gn(s.x+s.w,s.y+s.h)?{points:i,rect:s}:null}function _i(t,e,n,r){const i=e(n,r),{body:s,wickStart:o,wickEnd:l}=H0(t,i);return gn(s.x,s.y)&&gn(s.x+s.w,s.y+s.h)&&gn(o[0],o[1])&&gn(l[0],l[1])?{body:s,points:i,wickStart:o,wickEnd:l}:null}const sT=1.2;function dc(t,e){var n,r,i;let{value:s}=e;if((n=t.isBubbleZType)!=null&&n.call(t,e))s=t.getBubbleZData(s,"z");else if((r=t.isCandlestickType)!=null&&r.call(t,e)){const o=(i=t.getCandlestickData)==null?void 0:i.call(t,e);o&&(s=o.close)}return s}function zd(t,e){const n=t.dataLabelFormat(e.id)(dc(t,e),e.id,e.index,[]);return n==null?null:String(n)}function Ud(t){return`${t.id}:${t.index}`}function hc(t,e,n){var r;if(!(e!=null&&e.length))return()=>!1;if(t.config.tooltip_grouped&&e.length>1){const s=(r=e[0])==null?void 0:r.index;return o=>s!==void 0&&o.index===s&&n(t,o)}const i=new Set(e.filter(s=>s&&n(t,s)).map(Ud));return s=>i.has(Ud(s))}function po(t,e,n,r){const i=t.config.data_labels_position;let s;if(ie(i))s=i.bind(t.api)(n,dc(t,e),e.id,e.index,r);else if(i){const o=e.id in i?i[e.id]:i;s=o==null?void 0:o[n]}return ae(s)?s:0}function oT(t,e){var n,r;const i=(n=t.config.data_labels)==null?void 0:n.image;if(ie(i))return(r=i.call(t.api,dc(t,e),e.id,e.index))!=null?r:null;if(i){const{url:s="",width:o=0,height:l=0,pos:c}=i;return{url:s,width:o,height:l,pos:c}}return null}function lT(t,e){return Pa(t.url,{ID:e.id})}function cT(t,e,n,r,i,s){var o,l,c;const{width:u=0,height:f=0,pos:d}=e,h=u/2,m=f/2,S=vc(t.canvasEngine.ctx,n,r,i).h,E=xr(t.canvasEngine.ctx.font),C=r-h,w=i-m-((o=t.isTreemapType)!=null&&o.call(t,s)?E*.7:S/2);let $=r,z=i;return t.config.axis_rotated?$+=h:z+=m,{x:C+((l=d==null?void 0:d.x)!=null?l:0),y:w+((c=d==null?void 0:d.y)!=null?c:0),textX:$,textY:z}}function kd(t,e,n){var r,i,s;const o=(r=t.updateTextColor)==null?void 0:r.call(t,e);return typeof o=="string"?o:(i=t.isTreemapType)!=null&&i.call(t,e)?n:((s=t.color)==null?void 0:s.call(t,e))||n}function uT(t,e){var n;const r=t.config.data_labels_backgroundColors;if(!r)return null;if(je(r))return r;if(ie(r)){const s=(n=t.color)==null?void 0:n.call(t,e),o=r.bind(t.api)(s,e);return o==null?null:String(o)}const i=r[e.id];return i==null?null:String(i)}function fT(t){var e,n,r;if(!t)return null;const i=He(t)?t:{};return{padding:jf((e=i.padding)!=null?e:"3 5"),radius:ae(i.radius)?i.radius:10,stroke:(n=i.stroke)!=null?n:"#000",strokeWidth:ae(i.strokeWidth)?i.strokeWidth:1,fill:(r=i.fill)!=null?r:"none"}}function vc(t,e,n,r,i={top:0,right:0,bottom:0,left:0}){var s,o;const l=e.split(`
|
|
37
|
-
`),c=l.map(w=>t.measureText(w)),u=Math.max(...c.map(w=>w.width),0),f=xr(t.font),d=f*sT,h=c[0]?(c[0].fontBoundingBoxAscent||0)+(c[0].fontBoundingBoxDescent||0):0,m=c[0]&&(c[0].fontBoundingBoxDescent||c[0].actualBoundingBoxDescent)||0,S=l.length>1?d*l.length:Math.max(f,h,((s=c[0])==null?void 0:s.actualBoundingBoxAscent)+((o=c[0])==null?void 0:o.actualBoundingBoxDescent)||0);let E=n,C=r;return t.textAlign==="center"?E-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(E-=u),t.textBaseline==="middle"?C-=S/2:t.textBaseline==="alphabetic"?C-=S-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=S),{x:E-i.left,y:C-i.top,w:u+i.left+i.right,h:S+i.top+i.bottom}}function Gd(t,e,n,r,i,s){var o,l;const c=e.context,u=uT(t,n),f=fT((o=t.config.data_labels)==null?void 0:o.border),d=(l=f==null?void 0:f.padding)!=null?l:{top:0,right:0,bottom:0,left:0},h=vc(c,r,i,s,d),m=t.config.data_labels.rotate;e.withState(S=>{var E;m&&(S.translate(i,s),S.rotate(m*Math.PI/180),h.x-=i,h.y-=s),u&&e.fillRoundRect(h,(E=f==null?void 0:f.radius)!=null?E:0,{fill:u}),f&&(f.fill!=="none"&&e.fillRoundRect(h,f.radius,{fill:f.fill}),e.strokeRoundRect(h,f.radius,{stroke:f.stroke,lineWidth:f.strokeWidth}))})}function dT(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function hT(t){return t==="start"?"left":t==="end"?"right":"center"}function vT(t,e,n,r){var i,s,o;const l=dT(t.config.data_labels.rotate),c=t.config.axis_rotated,u=t.config[`axis_${(i=t.axis)==null?void 0:i.getId(e.id)}_inverted`],f=Vn(t,e),{value:d}=e,h=ae(d)&&d<0||f&&!((o=(s=t.getCandlestickData)==null?void 0:s.call(t,e))!=null&&o._isUp),m=4,S=m*2;return c?l==="start"?(n+=h?0:S,r+=m):l==="middle"?(n+=S,r-=S):l==="end"&&(h&&(n-=S),r+=m):(l==="start"?(n+=m,h&&(r+=S*2)):l==="middle"?r-=S:l==="end"&&(n-=m,h&&(r+=S*2)),u&&(r+=h?-17:f?13:7)),{x:n,y:r,textAlign:hT(l)}}function Xd(t,e,n,r,i){var s;if(t.config.axis_rotated)r+=6,e.textAlign="left",e.textBaseline="middle";else if(ca(t,n))e.textAlign="center",e.textBaseline="middle";else{const{config:o,state:l}=t,c=o[`axis_${(s=t.axis)==null?void 0:s.getId(n.id)}_inverted`],u=n.value<0||n.value===0&&!l.hasPositiveValue&&l.hasNegativeValue;let f=3;ae(o.point_r)&&o.point_r>5&&(ni(t,n)||la(t,n))&&(f+=o.point_r/2.3),e.textAlign="center",(c?!u:u)?(i+=f,e.textBaseline="top"):(i-=f*2,e.textBaseline="bottom")}return{x:r,y:i}}var gT=Object.defineProperty,Wd=Object.getOwnPropertySymbols,pT=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,Vd=(t,e,n)=>e in t?gT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hr=(t,e)=>{for(var n in e||(e={}))pT.call(e,n)&&Vd(t,n,e[n]);if(Wd)for(var n of Wd(e))mT.call(e,n)&&Vd(t,n,e[n]);return t};const jd={x:0,y:0,w:8,h:8},gc=new Map,Hd=[1,0,0,1,0,0];function xT(t){return t==="circle"||t==="rectangle"}function Dn(t,e,n=0){const r=t.getAttribute(e),i=r===null?NaN:parseFloat(r);return Number.isFinite(i)?i:n}function yT(t){const e=(t.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi)||[]).map(Number).filter(Number.isFinite),n=[];for(let r=0;r<e.length-1;r+=2)n.push([e[r],e[r+1]]);return n}function TT(t){const e=(t==null?void 0:t.trim().split(/[\s,]+/).map(Number).filter(Number.isFinite))||[];return e.length===4?{x:e[0],y:e[1],w:e[2],h:e[3]}:null}function Yd(t){const e=t.map(([s])=>s),n=t.map(([,s])=>s),r=Math.min(...e),i=Math.min(...n);return{x:r,y:i,w:Math.max(...e)-r,h:Math.max(...n)-i}}function bT(t){const e=t.filter(o=>Number.isFinite(o.x)&&Number.isFinite(o.y)&&Number.isFinite(o.w)&&Number.isFinite(o.h));if(!e.length)return Hr({},jd);const n=Math.min(...e.map(o=>o.x)),r=Math.min(...e.map(o=>o.y)),i=Math.max(...e.map(o=>o.x+o.w)),s=Math.max(...e.map(o=>o.y+o.h));return{x:n,y:r,w:i-n,h:s-r}}function qi(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function ST(t){let e=[...Hd];return((t==null?void 0:t.match(/[a-z]+\([^)]*\)/gi))||[]).forEach(n=>{var r;const[,i,s]=n.match(/^([a-z]+)\(([^)]*)\)$/i)||[],o=i==null?void 0:i.toLowerCase(),l=((s==null?void 0:s.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi))||[]).map(Number).filter(Number.isFinite);let c=null;if(o==="matrix"&&l.length>=6)c=l.slice(0,6);else if(o==="translate"&&l.length)c=[1,0,0,1,l[0],l[1]||0];else if(o==="scale"&&l.length)c=[l[0],0,0,(r=l[1])!=null?r:l[0],0,0];else if(o==="rotate"&&l.length){const u=l[0]*Math.PI/180,f=Math.cos(u),d=Math.sin(u),h=[f,d,-d,f,0,0];c=l.length>=3?qi(qi([1,0,0,1,l[1],l[2]],h),[1,0,0,1,-l[1],-l[2]]):h}else o==="skewx"&&l.length?c=[1,0,Math.tan(l[0]*Math.PI/180),1,0,0]:o==="skewy"&&l.length&&(c=[1,Math.tan(l[0]*Math.PI/180),0,1,0,0]);c&&(e=qi(e,c))}),e}function fa(t,e){const n=t.getAttribute("style"),r=t.getAttribute(e),i=n==null?void 0:n.match(new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`,"i"));return((i==null?void 0:i[1])||r||"").trim()||null}function AT(t,e){const n=Hr({},e),r=fa(t,"fill"),i=fa(t,"stroke"),s=fa(t,"stroke-width"),o=fa(t,"opacity"),l=fa(t,"fill-opacity"),c=fa(t,"stroke-opacity");if(r&&(n.fill=r==="none"?null:r),i&&(n.stroke=i==="none"?null:i),s){const u=parseFloat(s);Number.isFinite(u)&&(n.lineWidth=u)}return[o,l,c].forEach(u=>{var f;const d=u===null?NaN:parseFloat(u);Number.isFinite(d)&&(n.alpha=((f=n.alpha)!=null?f:1)*d)}),n}function ET(t){const e=new Map;return Array.from(t.querySelectorAll("[id]")).forEach(n=>{const r=n.getAttribute("id");r&&e.set(r,n)}),e}function Rr(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function wr(t,e,n,r){if(typeof t=="number")return Number.isFinite(t)?t:r;if(typeof t=="string"&&/%$/.test(t)){const s=parseFloat(t);return Number.isFinite(s)?e+n*s/100:r}const i=parseFloat(t!=null?t:"");return Number.isFinite(i)?i:r}function CT(t){const e=(t==null?void 0:t.trim())||"0",n=parseFloat(e),r=/%$/.test(e)?n/100:n;return Math.max(0,Math.min(1,Number.isFinite(r)?r:0))}function IT(t){return Array.from(t.children||[]).filter(e=>e.tagName.toLowerCase()==="stop").map(e=>{const n=fa(e,"stop-color")||"#000",r=fa(e,"stop-opacity"),i=r===null?NaN:parseFloat(r);return{offset:CT(e.getAttribute("offset")),color:n,opacity:Number.isFinite(i)?i:void 0}})}function RT(t){const e=new Map;return t.forEach((n,r)=>{const i=n.tagName.toLowerCase(),s=IT(n);s.length&&(i==="lineargradient"?e.set(r,{type:"linearGradient",x1:Rr(n.getAttribute("x1"),"0%"),y1:Rr(n.getAttribute("y1"),"0%"),x2:Rr(n.getAttribute("x2"),"100%"),y2:Rr(n.getAttribute("y2"),"0%"),stops:s}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:Rr(n.getAttribute("cx"),"50%"),cy:Rr(n.getAttribute("cy"),"50%"),r:Rr(n.getAttribute("r"),"50%"),fx:Rr(n.getAttribute("fx"),"50%"),fy:Rr(n.getAttribute("fy"),"50%"),fr:Rr(n.getAttribute("fr"),0),stops:s}))}),e}function pc(t,e,n,r=Hd,i={},s=new Set){const o=t.tagName.toLowerCase(),l=Array.from(t.children||[]),c=AT(t,i),u=qi(r,ST(t.getAttribute("transform"))),f={matrix:u,style:c};if(o==="defs")return[];if(o==="svg"||o==="g"||o==="symbol")return l.reduce((d,h)=>d.concat(pc(h,e,n,u,c,s)),[]);if(o==="use"){const d=t.getAttribute("href")||t.getAttribute("xlink:href")||"",h=d.charAt(0)==="#"?d.slice(1):"",m=h&&n.get(h);if(!m||s.has(h))return[];const S=Dn(t,"x",0),E=Dn(t,"y",0),C=qi(u,[1,0,0,1,S,E]);s.add(h);const w=pc(m,e,n,C,c,s);return s.delete(h),w}if(o==="polygon"||o==="polyline"){const d=yT(t.getAttribute("points")||"");return d.length?[Hr({type:o,points:d,box:Yd(d)},f)]:[]}if(o==="circle"){const d=Dn(t,"cx",0),h=Dn(t,"cy",0),m=Dn(t,"r",0);return m>0?[Hr({type:"circle",cx:d,cy:h,r:m,box:{x:d-m,y:h-m,w:m*2,h:m*2}},f)]:[]}if(o==="ellipse"){const d=Dn(t,"cx",0),h=Dn(t,"cy",0),m=Dn(t,"rx",0),S=Dn(t,"ry",0);return m>0&&S>0?[Hr({type:"ellipse",cx:d,cy:h,rx:m,ry:S,box:{x:d-m,y:h-S,w:m*2,h:S*2}},f)]:[]}if(o==="rect"){const d=Dn(t,"x",0),h=Dn(t,"y",0),m=Dn(t,"width",0),S=Dn(t,"height",0);return m>0&&S>0?[Hr({type:"rect",x:d,y:h,w:m,h:S,box:{x:d,y:h,w:m,h:S}},f)]:[]}if(o==="line"){const d=Dn(t,"x1",0),h=Dn(t,"y1",0),m=Dn(t,"x2",0),S=Dn(t,"y2",0);return[Hr({type:"line",x1:d,y1:h,x2:m,y2:S,box:Yd([[d,h],[m,S]])},f)]}if(o==="path"){const d=t.getAttribute("d")||"";return d?[Hr({type:"path",d,box:e},f)]:[]}return[]}function wT(t){if(!/^</.test(t))return null;if(gc.has(t))return gc.get(t)||null;let e=null;try{const r=new se.DOMParser().parseFromString(pr(t),"image/svg+xml").documentElement,i=TT(r.getAttribute("viewBox"))||jd,s=ET(r),o=pc(r,i,s);o.length&&(e={shapes:o,box:r.tagName.toLowerCase()==="svg"?i:bT(o.map(l=>l.box)),paints:RT(s)})}catch(n){e=null}return gc.set(t,e),e}function OT(t,e){if(e.type==="polygon"||e.type==="polyline"){const[n,...r]=e.points;t.moveTo(n[0],n[1]),r.forEach(([i,s])=>t.lineTo(i,s)),e.type==="polygon"&&t.closePath()}else e.type==="circle"?(t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2)):e.type==="ellipse"?(t.moveTo(e.cx+e.rx,e.cy),t.ellipse(e.cx,e.cy,e.rx,e.ry,0,0,Math.PI*2)):e.type==="rect"?t.rect(e.x,e.y,e.w,e.h):e.type==="line"&&(t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2))}function mo(t){const e=t==null?void 0:t.match(/^url\(#([^)]+)\)$/);return(e==null?void 0:e[1])||null}function Kd(t,e,n){const{x:r,y:i,w:s,h:o}=n,l=e.type==="linearGradient"?t.createLinearGradient(wr(e.x1,r,s,r),wr(e.y1,i,o,i),wr(e.x2,r,s,r+s),wr(e.y2,i,o,i)):t.createRadialGradient(wr(e.fx,r,s,r+s/2),wr(e.fy,i,o,i+o/2),wr(e.fr,r,Math.max(s,o),0),wr(e.cx,r,s,r+s/2),wr(e.cy,i,o,i+o/2),Math.max(.01,wr(e.r,0,Math.max(s,o),Math.max(s,o)/2)));return e.stops.forEach(({offset:c,color:u,opacity:f})=>{l.addColorStop(c,f===void 0?u:go(u,f))}),l}function PT(t,e,n,r,i){const s=Hr({},e||{});if(n.fill!==void 0)if(n.fill===null)delete s.fill;else if(mo(n.fill)){const o=r.get(mo(n.fill));o&&(s.fill=Kd(t,o,i))}else/^url\(/.test(n.fill)||(s.fill=n.fill);if(n.stroke!==void 0)if(n.stroke===null)delete s.stroke;else if(mo(n.stroke)){const o=r.get(mo(n.stroke));o&&(s.stroke=Kd(t,o,i))}else/^url\(/.test(n.stroke)||(s.stroke=n.stroke);return n.lineWidth!==void 0&&(s.lineWidth=n.lineWidth),{style:s,shouldFill:n.fill!==null&&(!s.stroke||s.fill!==void 0),shouldStroke:n.stroke!==null&&s.stroke!==void 0,alpha:n.alpha}}function ts(t,e,n,r,i,s,o=i){if(xT(e)){t.point(e,n,r,i,s);return}const l=wT(e);if(!l||i<=0){t.point("circle",n,r,i,s);return}t.withState(c=>{const{box:u,paints:f,shapes:d}=l,h=o>0?i/o:1,m=S=>{const{style:E,shouldFill:C,shouldStroke:w,alpha:$}=PT(c,s,S.style,f,u);if(c.save(),t.applyStyle(E),$!==void 0&&(c.globalAlpha*=$),c.transform(...S.matrix),c.beginPath(),S.type==="path"){if(se.Path2D){const z=S.path2D||(S.path2D=new se.Path2D(S.d));C&&c.fill(z),w&&c.stroke(z)}}else OT(c,S),C&&c.fill(),w&&c.stroke();c.restore()};c.translate(n-(u.x+u.w/2)*h,r-(u.y+u.h/2)*h),c.scale(h,h),d.forEach(m)})}var MT=Object.defineProperty,LT=Object.defineProperties,DT=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,FT=Object.prototype.hasOwnProperty,NT=Object.prototype.propertyIsEnumerable,mc=(t,e,n)=>e in t?MT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jd=(t,e)=>{for(var n in e||(e={}))FT.call(e,n)&&mc(t,n,e[n]);if(Zd)for(var n of Zd(e))NT.call(e,n)&&mc(t,n,e[n]);return t},Qd=(t,e)=>LT(t,DT(e)),ii=(t,e,n)=>mc(t,typeof e!="symbol"?e+"":e,n);const $T=[ji,er,yr,Vn],BT=1e3,_d=new WeakMap,qd=new Map;function th(t,e){if(!e||e==="none")return;const n=e.match(/^matrix\(([^)]+)\)$/),r=e.match(/^matrix3d\(([^)]+)\)$/);if(n){const i=n[1].split(",").map(s=>Number(s.trim()));i.length===6&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}else if(r){const i=r[1].split(",").map(s=>Number(s.trim()));i.length===16&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[4],i[5],i[12],i[13])}}function zT(t,e,n){const r=t.naturalWidth||t.width,i=t.naturalHeight||t.height;if(!r||!i||!e||!n)return{x:0,y:0,w:e,h:n};const s=Math.min(e/r,n/i),o=r*s,l=i*s;return{x:(e-o)/2,y:(n-l)/2,w:o,h:l}}function UT(t){const{state:e}=t;return e.hasFunnel||e.hasTreemap?{x:0,y:0}:{x:qa(e.margin.left),y:qa(e.margin.top)}}function eh(t,e,n,r,i=!1){r.strokePath(s=>{$d(t,n,i,s)(e)},{lineDash:[]})}function nh(t,e,n,r,i=!1){r.fillPath(s=>{Bd(t,n,i,s)(e)})}function rh(t,e){const n=Wr(t,e);return n.start===0&&n.end===e.values.length?e:Qd(Jd({},e),{values:e.values.slice(n.start,n.end)})}function xc(t,e){if(!(t!=null&&t.length)||!(e!=null&&e.id))return null;let n=_d.get(t);if(!n){n=new Map;for(const r of t){if(!(r!=null&&r.id))continue;const i=`${r.id}:*`;n.has(i)||n.set(i,r),"index"in r&&n.set(`${r.id}:${r.index}`,r)}_d.set(t,n)}return"index"in e?n.get(`${e.id}:${e.index}`)||null:n.get(`${e.id}:*`)||null}function kT(t,e){const n=se.Path2D;if(!n)return null;const r=`${t}:${e}`,i=qd.get(r);if(i)return i;const s=new n(de[t][e]);return qd.set(r,s),s}function es(t,e){const n=t.config.color_onover;return!n||!e?null:He(n)?e.id in n?n[e.id]:null:je(n)?n:ie(n)?n.call(t.api,e):null}function GT(t,e,n){const r=xc(n,e);return es(t,r)||t.color(e.id)}function ah(t){var e;return(t==null?void 0:t.id)||((e=t==null?void 0:t.data)==null?void 0:e.id)}function ih(t,e){var n;const r=ah(e);return!!r&&((n=t.state.focusedTargetIds)==null?void 0:n.has(r))}function Or(t,e){var n;const r=ah(e);return r&&((n=t.state.defocusedTargetIds)!=null&&n.has(r))?t.canvasTheme.style.shape.targetDefocusedOpacity:1}function XT(t,e,n,r=!1){var i;const s=(i=t.generateGetAreaPoints)==null?void 0:i.call(t,n,r);if(!s)return null;const o=Wr(t,e);let l=1/0,c=1/0,u=-1/0,f=-1/0;for(let d=o.start;d<o.end;d++){const h=e.values[d];An(t,h)&&s(h,d).forEach(([m,S])=>{gn(m,S)&&(l=Math.min(l,m),c=Math.min(c,S),u=Math.max(u,m),f=Math.max(f,S))})}return Number.isFinite(l)&&Number.isFinite(c)?{x:l,y:c,w:u-l,h:f-c}:null}function xo(t,e,n){return e+n*(ae(t)?t:0)}function sh(t,e,n,r,i,s){const o=t.config[`${r}_linearGradient`];if(!o||!i||!i.w||!i.h)return s;const l=t.config.axis_rotated,c=typeof o=="object"?o:{},u=c.x||(l?[1,0]:[0,0]),f=c.y||(l?[0,0]:[0,1]),d=Array.isArray(c.stops)?c.stops:[[0,s,1],[1,s,0]],h=e.createLinearGradient(xo(u[0],i.x,i.w),xo(f[0],i.y,i.h),xo(u[1],i.x,i.w),xo(f[1],i.y,i.h));return d.forEach(([m,S,E])=>{const C=ie(S)?S.call(t.api,n.id):S,w=String(C||s),$=Number(m),z=Number.isFinite($)?Math.max(0,Math.min(1,$)):0;h.addColorStop(z,go(w,E))}),h}function Yr(t,e){return ei(t,e,$T)}function yo(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:la(t,e)||ca(t,e)?.5:1}function ns(t,e,n){var r,i;const s=t.config.point_r;return ca(t,e)||ie(s)?(i=(r=t.pointR)==null?void 0:r.call(t,n))!=null?i:2.5:s}function WT(t,e,n,r){return!r&&n==="circle"&&la(t,e)&&!ie(t.config.point_r)&&e.values.length>Zf}function VT(t,e){const{bar_connectLine:n}=t.config,r=He(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function jT(t,e,n){const{indexX:r,indexY:i,pos:s}=n;return t.config.axis_rotated?{x:e[0][r],y:e[0][i],width:e[0][r]-s,height:e[2][i]-e[0][i]}:{x:e[0][r],y:s,width:e[2][r]-e[0][r],height:e[3][i]-s}}function HT(t,e,n,r,i=1){if(r.length<2)return;const s=t.config.axis_rotated,o=/^start-(start|end)$/.test(n),l=/^end-(start|end)$/.test(n),c=/\w+-end$/.test(n),u=/\w+-start$/.test(n),f=m=>({x:s?l?m.x-m.width:m.x:m.x+m.width,y:s||o?m.y+m.height:m.y}),d=m=>({x:s?m.x-(c?m.width:0):m.x,y:s?m.y:m.y+(u?m.height:0)});let h=f(r[0]);e.strokePath(()=>{for(let m=1;m<r.length;m++){const S=d(r[m]);e.traceLine(h.x,h.y,S.x,S.y),m<r.length-1&&(h=f(r[m]))}},{alpha:i,stroke:t.canvasTheme.style.shape.barConnectLineColor,lineWidth:t.canvasTheme.style.shape.barConnectLineWidth,lineDash:[]})}function yc(t,e){var n;const{config:r}=t;if(ca(t,e))return"circle";const i=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],s=Array.isArray(r.point_pattern)&&r.point_pattern.length?r.point_pattern:[r.point_type],o=Math.max(0,i.indexOf(e.id)),l=s[o%s.length];return/^rect(angle)?$/i.test(l)||l==="rectangle"?"rectangle":l||"circle"}function YT(t,e,n,r,i,s,o){const l=t.config.point_radialGradient;if(!l||!s)return o;const c=He(l)?l:{},u=ae(c.cx)?c.cx:.3,f=ae(c.cy)?c.cy:.3,d=ae(c.r)?c.r:.7,h=Array.isArray(c.stops)?c.stops:[[.1,null,1],[.9,null,0]],m=r+(u-.5)*s*2,S=i+(f-.5)*s*2,E=e.createRadialGradient(m,S,0,m,S,Math.max(1,s*d*2));return h.forEach(([C,w,$])=>{let z=ie(w)?w.bind(t.api)(n.id):w;z||(z=o);const B=Number(C),W=Number.isFinite(B)?Math.max(0,Math.min(1,B)):0;E.addColorStop(W,go(z,$))}),E}function oh(t,e,n){const r=t.config.candlestick_color_down;return(n!=null&&n._isUp?t.color(e):r&&typeof r=="object"?r[e.id]:r)||t.color(e)}function KT(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function ZT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function JT(t,e,n){const{config:r,scale:i}=t,s=i.zoom||i.x,o=t.getYScaleById(e.id),l=r.line_connectNull?t.filterRemoveNull(e.values):e.values;let c=t.isAreaRangeType(e)?l.map(S=>Qd(Jd({},S),{value:t.getRangedData(S,"mid")})):l;t.isStepType(e)&&(c=t.convertValuesToStep(c));const u=V0(t,c,s,o,r.data_regions[e.id]);let f=null,d=[];const h=()=>{if(d.length<2||!f){d=[];return}n.strokePath(S=>{const[E,...C]=d;S.moveTo(E[0],E[1]),C.forEach(w=>{S.lineTo(w[0],w[1])})},{lineDash:f}),d=[]},m=(S,E,C)=>{!f||!ZT(f,C)?(h(),f=C,d=[S,E]):d.push(E)};for(const{start:S,end:E,dash:C,isBreak:w}of u){if(w||!S||!E||!C){h(),f=null;continue}if(!gn(S[0],S[1])||!gn(E[0],E[1])){h(),f=null;continue}m(S,E,C)}h()}class QT{constructor(e,n){ii(this,"engine",e),ii(this,"theme",n),ii(this,"painter"),ii(this,"labelImageCache",new Map),ii(this,"backgroundImageCache",new Map),ii(this,"backgroundClassStyleCache",new Map),this.painter=new od(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}destroy(){const e=n=>{n.image.onload=null,n.image.onerror=null};this.labelImageCache.forEach(e),this.backgroundImageCache.forEach(e),this.labelImageCache.clear(),this.backgroundImageCache.clear(),this.backgroundClassStyleCache.clear()}getLabelImage(e,n){if(!e||!se.Image)return null;let r=this.labelImageCache.get(e);if(!r){const i={image:new se.Image,loaded:!1,loading:!0};r=i,this.labelImageCache.set(e,r),i.image.onload=()=>{var s;i.loaded=!0,i.loading=!1,(s=n.redraw)==null||s.call(n)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundImage(e,n){if(!e||!se.Image)return null;let r=this.backgroundImageCache.get(e);if(!r){const i={image:new se.Image,loaded:!1,loading:!0};r=i,this.backgroundImageCache.set(e,r),i.image.onload=()=>{var s;i.loaded=!0,i.loading=!1,(s=n.renderCanvasFrame)==null||s.call(n,void 0,null,!1)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundClassStyle(e,n){if(!n||!se.document)return{};const r=this.backgroundClassStyleCache.get(n);if(r)return r;const i=se.document.createElement("div");i.className=n,i.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:1px;height:1px;",e.$el.chart.node().appendChild(i);const s=se.getComputedStyle(i),o=parseFloat(s.opacity),l={opacity:Number.isFinite(o)?o:void 0,transform:s.transform||void 0};return i.remove(),this.backgroundClassStyleCache.set(n,l),l}drawBackground(e){const n=e.config.background;if(!(n!=null&&n.imgUrl)&&!(n!=null&&n.color))return;const{ctx:r,painter:i}=this,{current:s,margin:o,width:l,height:c}=e.state,u=this.getBackgroundClassStyle(e,n.class);i.withState(()=>{if(u.opacity!==void 0&&(r.globalAlpha*=u.opacity),n.imgUrl){const f=this.getBackgroundImage(n.imgUrl,e);if(f!=null&&f.loaded){const d=UT(e),h=zT(f.image,s.width,s.height);r.translate(d.x,d.y),th(r,u.transform),r.drawImage(f.image,h.x,h.y,h.w,h.h)}}else n.color&&(th(r,u.transform),i.fillRect({x:o.left,y:o.top,w:l,h:c},{fill:n.color}))})}drawLabelImage(e,n,r,i,s){const o=oT(e,n);if(!(o!=null&&o.url))return{x:i,y:s};const l=lT(o,n),c=cT(e,o,r,i,s,n),u=this.getLabelImage(l,e);return u!=null&&u.loaded&&this.ctx.drawImage(u.image,c.x,c.y,o.width,o.height),{x:c.textX,y:c.textY}}drawDataLabel(e,n,r,i,s){const{painter:o,theme:{style:l}}=this;if({x:i,y:s}=this.drawLabelImage(e,n,r,i,s),e.config.data_labels.rotate){const c=vT(e,n,i,s);i=c.x,s=c.y,this.ctx.textAlign=c.textAlign}this.ctx.fillStyle=kd(e,n,l.label.color),Gd(e,o,n,r,i,s),o.textLines(r,i,s,{angle:e.config.data_labels.rotate})}drawFocusLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,theme:{style:s}}=this,o=n.filter(c=>c&&An(e,c)&&yr(e,c)&&Yr(e,{id:c.id})),l={size:()=>o.length};o.length&&(i.font=s.label.font,o.forEach(c=>{const u=zd(e,c);let{x:f,y:d}=Ji(e,c);u&&({x:f,y:d}=Xd(e,i,c,f,d),f+=po(e,c,"x",l),d+=po(e,c,"y",l),gn(f,d)&&this.drawDataLabel(e,c,u,f,d))}))}draw(e,n,r){if(e.state.hasTreemap){this.drawTreemaps(e);return}const{margin:i,width:s,height:o}=e.state,l=()=>{e.config.area_front||this.drawAreas(e,n,r),this.drawLines(e,n),e.config.area_front&&this.drawAreas(e,n,r),this.drawCircles(e,n,r)},c=()=>{e.config.bar_front||this.drawBars(e,n,r),this.drawCandlesticks(e,n,r),l(),e.config.bar_front&&this.drawBars(e,n,r),this.drawSelections(e,n),this.drawLabels(e,n)};e.config.clipPath===!1?c():this.painter.clipRect({x:i.left,y:i.top,w:s,h:o},c)}drawSubchart(e,n){const{config:r,state:i}=e;if(!r.subchart_show||!i.hasAxis||i.width2<=0||i.height2<=0)return;const{ctx:s,painter:o,theme:{style:l}}=this,{margin2:c,width2:u,height2:f}=i,d={x:c.left,y:c.top,w:u,h:f};e.withSubchartTypeContext(()=>{var h;const m=e.filterTargetsToShow().filter(Yr.bind(null,e)),S=e.getDrawShape();(h=e.updateSubchartYDomain)==null||h.call(e,m),o.withState(()=>{o.clipRect(d,()=>{o.withTranslation(d.x,d.y,()=>{var E,C,w,$,z,B;const W=m.filter(ji.bind(null,e)),H=tr(e,S,qt.AREA,ji.bind(null,e));for(const ft of W)ft.values.some(An.bind(null,e))&&(s.globalAlpha=l.shape.areaOpacity*Or(e,ft),s.fillStyle=e.color(ft.id),nh(e,ft,H,o,!0));s.globalAlpha=1;const Q=m.filter(er.bind(null,e)),q=tr(e,S,qt.BAR,er.bind(null,e)),st=(E=e.generateGetBarPoints)==null?void 0:E.call(e,q,!0);if(st){for(const ft of Q)s.globalAlpha=l.shape.barOpacity*Or(e,ft),s.fillStyle=e.color(ft.id),ft.values.forEach((lt,bt)=>{var St;if(!An(e,lt))return;const Mt=Qi(e,st,lt,bt),Ot=((St=e.getSubchartCandlestickBarColor)==null?void 0:St.call(e,lt,!0))||s.fillStyle;Mt&&o.fillRect(Mt.rect,{fill:Ot})});s.globalAlpha=1}const it=m.filter(Vn.bind(null,e)),ot=tr(e,S,qt.CANDLESTICK,Vn.bind(null,e)),ct=(C=e.generateGetCandlestickPoints)==null?void 0:C.call(e,ot,!0);if(ct){s.lineWidth=l.shape.candlestickLineWidth;for(const ft of it){const lt=Or(e,ft);s.globalAlpha=lt,ft.values.forEach((bt,St)=>{var Mt;const Ot=(Mt=e.getCandlestickData)==null?void 0:Mt.call(e,bt),Kt=Ot&&_i(e,ct,bt,St);if(!Kt)return;const ee=oh(e,{id:ft.id},Ot);s.strokeStyle=ee,s.fillStyle=ee,o.strokePath(()=>{o.traceLine(Kt.wickStart[0],Kt.wickStart[1],Kt.wickEnd[0],Kt.wickEnd[1])}),o.fillRect(Kt.body,{fill:s.fillStyle})})}}const gt=m.filter(ni.bind(null,e)),tt=tr(e,S,qt.LINE,ni.bind(null,e));s.globalAlpha=1;for(const ft of gt)ft.values.some(An.bind(null,e))&&(s.globalAlpha=Or(e,ft),s.lineWidth=ih(e,ft)?l.shape.lineFocusedWidth:l.shape.lineWidth,s.strokeStyle=e.color(ft.id),eh(e,ft,tt,o,!0));if(s.globalAlpha=1,r.point_show&&!((w=e.isPointFocusOnly)!=null&&w.call(e))){const ft=($=e.updateCircleY)==null?void 0:$.call(e,!0),lt=(z=e.subxx)==null?void 0:z.bind(e);if(lt&&ft){for(const bt of m){if(!la(e,bt)&&!ca(e,bt))continue;const St=e.color(bt.id),Mt=l.shape.pointFillColor||St,Ot=l.shape.pointStrokeColor||St,Kt=Ot?(B=l.shape.pointLineWidth)!=null?B:1:0,ee=Ot&&Kt>0?{fill:Mt,stroke:Ot,lineWidth:Kt}:{fill:Mt};s.globalAlpha=yo(e,bt)*Or(e,bt),bt.values.forEach((Ae,Ee)=>{if(!An(e,Ae))return;const Te=r.axis_rotated?ft(Ae,Ee):lt(Ae),De=r.axis_rotated?lt(Ae):ft(Ae,Ee),me=Math.min(ns(e,bt,Ae),3);gn(Te,De)&&ts(o,"circle",Te,De,me,ee)})}s.globalAlpha=1}}})}),this.drawSubchartBrush(e)})})}drawSubchartBrush(e){var n,r;const{config:i,scale:s,state:o}=e,l=o.domain;if(!i.subchart_show||i.subchart_brush_enabled===!1||!(l!=null&&l.length)||!s.subX)return;const{margin2:c,width2:u,height2:f}=o,d=s.subX(l[0]),h=s.subX(l[1]),m=i.axis_rotated?f:u,S=(r=(n=e.axis)==null?void 0:n.getExtent)==null?void 0:r.call(n),E=Array.isArray(S)&&S.length>=2&&S.every(Number.isFinite)?S.slice(0,2):[0,m],C=Math.max(0,Math.min(m,Math.min(...E))),w=Math.max(0,Math.min(m,Math.max(...E))),$=Math.max(C,Math.min(w,Math.min(d,h))),z=Math.max(C,Math.min(w,Math.max(d,h))),B=z-$;if(B<=0)return;const W=i.axis_rotated?{x:c.left,y:c.top+$,w:u,h:B}:{x:c.left+$,y:c.top,w:B,h:f};this.painter.fillRect(W,{fill:this.theme.style.subchartBrush.fill,alpha:this.theme.style.subchartBrush.opacity}),i.subchart_showHandle&&(this.drawSubchartBrushHandle(e,$,"start"),this.drawSubchartBrushHandle(e,z,"end"))}drawSubchartBrushHandle(e,n,r){const{config:i,state:{margin2:s,width2:o,height2:l}}=e,{ctx:c,painter:u,theme:{style:f}}=this,d=i.axis_rotated,h=f.subchartBrush.handleFill,m=f.subchartBrush.handleStroke,S=d?s.left+o/2:s.left+n,E=d?s.top+n:s.top+l/2,C=kT(d?"y":"x",r);C&&u.withState(()=>{c.translate(S,E),c.fillStyle=h,c.strokeStyle=m,c.lineWidth=f.subchartBrush.handleLineWidth,c.globalAlpha=f.subchartBrush.handleOpacity,c.fill(C),c.globalAlpha=1,c.stroke(C)})}drawBars(e,n,r){const{ctx:i,painter:s,theme:{style:o}}=this,l=er.bind(null,e),c=hc(e,r,er),u=e.filterTargetsToShow().filter(l).filter(Yr.bind(null,e)),f=e.generateGetBarPoints(tr(e,n,qt.BAR,l),!1),{margin:d}=e.state,h=uo(e),m=h?ic(e):new Set;f&&s.withTranslation(d.left,d.top,()=>{var S;for(const E of u){const C=Wr(e,E),w=VT(e,E.id),$=Or(e,E),z=[],B=[];for(let W=C.start;W<C.end;W++){const H=E.values[W];if(!An(e,H))continue;const Q=Qi(e,f,H,W);if(!Q)continue;const{points:q,rect:st}=Q,it=sc(e,H,q,h,m,(S=e.isStackingRadiusData)==null?void 0:S.bind(e));B.push({d:H,points:q,rect:st,radiusInfo:it}),w&&z.push(jT(e,q,it))}w&&o.shape.barConnectLineWidth>0&&HT(e,s,w,z,$);for(const{d:W,rect:H,radiusInfo:Q}of B){const q=es(e,xc(r,W)),st=q||e.color(E.id),ot=(c(W)?o.shape.barExpandedOpacity:o.shape.barOpacity)*$;i.fillStyle=q?st:sh(e,i,E,"bar",H,st),h?s.fillRoundRect(H,Q.corners,{alpha:ot}):s.fillRect(H,{alpha:ot}),o.shape.barLineWidth>0&&(i.strokeStyle=o.shape.barStrokeColor,i.lineWidth=o.shape.barLineWidth,h?s.strokeRoundRect(H,Q.corners,{alpha:o.shape.barOpacity*$}):s.strokeRect(H,{alpha:o.shape.barOpacity*$}))}}})}drawCandlesticks(e,n,r){var i;const{ctx:s,painter:o,theme:{style:l}}=this,c=Vn.bind(null,e),u=hc(e,r,Vn),f=e.filterTargetsToShow().filter(c).filter(Yr.bind(null,e)),d=(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,tr(e,n,qt.CANDLESTICK,c),!1),{margin:h}=e.state;d&&o.withTranslation(h.left,h.top,()=>{var m;s.lineWidth=l.shape.candlestickLineWidth;for(const S of f){const E=Wr(e,S),C=Or(e,S),w=l.shape.candlestickLineWidth,$=l.shape.candlestickStrokeColor||"#000";for(let z=E.start;z<E.end;z++){const B=S.values[z],W=(m=e.getCandlestickData)==null?void 0:m.call(e,B);if(!W)continue;const H=_i(e,d,B,z);if(!H)continue;const{body:Q,wickStart:q,wickEnd:st}=H;s.fillStyle=es(e,xc(r,B))||oh(e,B,W),s.strokeStyle=$,s.globalAlpha=C,w>0&&o.strokePath(()=>{o.traceLine(q[0],q[1],st[0],st[1])}),o.fillRect(Q,{alpha:(u(B)?l.shape.candlestickExpandedOpacity:1)*C}),w>0&&o.strokeRect(Q,{alpha:C,lineWidth:w,stroke:$})}}s.globalAlpha=1})}hasExpandedShapeFocus(e,n){return!!(n!=null&&n.some(r=>r&&(er(e,r)||Vn(e,r))))}drawLines(e,n){const{ctx:r,painter:i,theme:{style:s}}=this,o=ni.bind(null,e),l=e.filterTargetsToShow().filter(o).filter(Yr.bind(null,e)),c=tr(e,n,qt.LINE,o),{margin:u}=e.state;e.generateGetLinePoints&&i.withTranslation(u.left,u.top,()=>{var f;for(const d of l){const h=rh(e,d);h.values.some(An.bind(null,e))&&(r.globalAlpha=Or(e,d),r.lineWidth=ih(e,d)?s.shape.lineFocusedWidth:s.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?JT(e,h,i):eh(e,h,c,i))}r.globalAlpha=1})}drawAreas(e,n,r){const{ctx:i,painter:s,theme:{style:o}}=this,l=ji.bind(null,e),c=e.filterTargetsToShow().filter(l).filter(Yr.bind(null,e)),u=tr(e,n,qt.AREA,l),{margin:f}=e.state;e.generateGetAreaPoints&&s.withTranslation(f.left,f.top,()=>{for(const d of c){const h=rh(e,d);if(!h.values.some(An.bind(null,e)))continue;const m=GT(e,h,r);i.globalAlpha=o.shape.areaOpacity*Or(e,d),i.fillStyle=sh(e,i,h,"area",e.config.area_linearGradient?XT(e,d,u):null,m),nh(e,h,u,s)}i.globalAlpha=1})}drawCircles(e,n,r){var i;if(!e.config.point_show||(i=e.isPointFocusOnly)!=null&&i.call(e))return;const{ctx:s,painter:o,theme:{style:l}}=this,{cx:c,cy:u}=n.pos,{margin:f}=e.state,d=hc(e,r,yr),h=!!(r!=null&&r.some(m=>m&&yr(e,m)));!c||!u||o.withTranslation(f.left,f.top,()=>{var m,S,E;for(const C of e.filterTargetsToShow()){if(!yr(e,C)||!Yr(e,C)||ni(e,C)&&!KT(e,C))continue;const w=e.color(C.id),$=yc(e,C),z=Or(e,C),B=!!e.config.point_radialGradient,W=WT(e,C,$,B),H=Wr(e,C),Q=H.end-H.start,q=W?Qf(e.state.width,e.state.height,ns(e,C,C.values[H.start]||C.values[0])):null,st=yo(e,C)*z;s.fillStyle=w,s.globalAlpha=st;const it=l.shape.pointFillColor||w,ot=l.shape.pointStrokeColor||w,ct=ot?(m=l.shape.pointLineWidth)!=null?m:1:0,gt=!!ot&&ct>0,tt=gt&&$==="circle"&&ae(st)&&st<1&&it===ot;if(!h&&!B&&$==="circle")if(s.fillStyle=it,gt&&!tt&&(s.strokeStyle=ot,s.lineWidth=ct),Q>BT)for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=ns(e,C,lt),St=tt?bt+ct/2:bt,Mt=c(lt,ft),Ot=u(lt,ft);gn(Mt,Ot)&&(q&&!_f(q,Mt,Ot)||(s.beginPath(),s.arc(Mt,Ot,St,0,Math.PI*2),s.fill(),gt&&!tt&&s.stroke()))}else{s.beginPath();for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=ns(e,C,lt),St=tt?bt+ct/2:bt,Mt=c(lt,ft),Ot=u(lt,ft);gn(Mt,Ot)&&o.traceCircle(Mt,Ot,St)}s.fill(),gt&&!tt&&s.stroke()}else for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=d(lt),St=ns(e,C,lt),Mt=bt?(E=(S=e.pointExpandedR)==null?void 0:S.call(e,lt))!=null?E:St*1.75:St,Ot=c(lt,ft),Kt=u(lt,ft),ee=es(e,lt),Ae=ee||w,Ee=l.shape.pointFillColor||Ae,Te=l.shape.pointStrokeColor||Ae,De=bt&&(ee||l.focusPoint.fill)||Ee,me=bt?ee||l.focusPoint.stroke||Ae:Te,Pe=bt?l.focusPoint.lineWidth:ct,Zt=yo(e,lt)*z,he=!!me&&(Pe!=null?Pe:0)>0,ge=$==="circle"&&he&&ae(Zt)&&Zt<1&&De===me,Wt=ge?Mt+(Pe||0)/2:Mt;gn(Ot,Kt)&&(s.fillStyle=B?YT(e,s,lt,Ot,Kt,Mt,Ae):De,s.globalAlpha=Zt,ts(o,$,Ot,Kt,Wt,he&&!ge?{fill:s.fillStyle,stroke:me,lineWidth:Pe}:void 0,St))}}})}drawSelections(e,n){var r,i;const s=(r=e.getCanvasSelectedData)==null?void 0:r.call(e);if(!e.config.data_selection_enabled||!(s!=null&&s.length)||e.state.hasTreemap)return;const{ctx:o,painter:l,theme:{style:c}}=this,{margin:u}=e.state,f=er.bind(null,e),d=Vn.bind(null,e),h=s.some(f)?e.generateGetBarPoints(tr(e,n,qt.BAR,f),!1):null,m=s.some(d)?(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,tr(e,n,qt.CANDLESTICK,d),!1):null,S=h?uo(e):null,E=S?ic(e):new Set;l.withTranslation(u.left,u.top,()=>{s.forEach(C=>{var w,$,z,B,W,H,Q;const q=e.color(C.id);if(f(C)&&h){const st=Qi(e,h,C,C.index);if(!st)return;const{points:it,rect:ot}=st,ct=S?sc(e,C,it,S,E).corners:0;S?l.fillRoundRect(ot,ct,{fill:"#fff",alpha:.3}):l.fillRect(ot,{fill:"#fff",alpha:.3}),S?l.strokeRoundRect(ot,ct,{stroke:q,lineWidth:2}):l.strokeRect(ot,{stroke:q,lineWidth:2})}else if(d(C)&&m){if(!((w=e.getCandlestickData)==null?void 0:w.call(e,C)))return;const it=_i(e,m,C,C.index);if(!it)return;const{body:ot,wickStart:ct,wickEnd:gt}=it;l.strokePath(()=>{l.traceLine(ct[0],ct[1],gt[0],gt[1])},{stroke:q,lineWidth:3}),l.fillRect(ot,{fill:"#fff",alpha:.3}),l.strokeRect(ot,{stroke:q,lineWidth:2})}else if(yr(e,C)){const st=yc(e,{id:C.id}),{x:it,y:ot}=Ji(e,C),ct=(z=($=e.pointR)==null?void 0:$.call(e,C))!=null?z:2.5,gt=(W=(B=e.pointSelectR)==null?void 0:B.call(e,C))!=null?W:ct*2;if(!gn(it,ot))return;ts(l,"circle",it,ot,gt,{fill:c.selectedPoint.fill,lineWidth:c.selectedPoint.lineWidth,stroke:c.selectedPoint.stroke||q}),(H=e.isPointFocusOnly)!=null&&H.call(e)||ts(l,st,it,ot,ct,{fill:c.shape.pointFillColor||q,stroke:c.shape.pointStrokeColor||q,lineWidth:(Q=c.shape.pointLineWidth)!=null?Q:1})}}),o.globalAlpha=1})}drawLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,painter:s,theme:{style:o}}=this,{margin:l}=e.state,{cx:c,cy:u}=n.pos,f=n.indices[qt.BAR]?e.generateGetBarPoints(n.indices[qt.BAR],!1):null,d=e.generateGetCandlestickPoints?e.generateGetCandlestickPoints(tr(e,n,qt.CANDLESTICK,Vn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(C=>(er(e,C)||yr(e,C)||ji(e,C)||Vn(e,C))&&Yr(e,C)),m=[];let S=0;h.forEach(C=>{const w=Wr(e,C),$=e.labelishData(C),z=[];for(let B=0;B<$.length;B++){const W=$[B],H=zd(e,W);H&&W.index>=w.start&&W.index<w.end&&An(e,W)&&z.push({d:W,text:H})}S+=z.length,z.length&&m.push(z)});const E={size:()=>S};s.withTranslation(l.left,l.top,()=>{i.font=o.label.font,i.textAlign="center",m.forEach(C=>{var w,$;for(const{d:z,text:B}of C){let W,H;if(er(e,z)&&f){const Q=Qi(e,f,z,z.index);if(!Q)continue;const{points:q,rect:st}=Q,it=e.getBaseValue(z),ot=fo(e,q[2]),ct=it<0,gt=vc(i,B,0,0).h;W=e.config.axis_rotated&&!e.config.data_labels.centered?ot[0]+(ct?-4:4):st.x+st.w/2,H=e.config.data_labels.centered||e.config.axis_rotated?st.y+st.h/2:ot[1]+(ct?gt-3:-3),i.textAlign=e.config.axis_rotated&&!e.config.data_labels.centered?ct?"right":"left":"center",i.textBaseline=e.config.data_labels.centered||e.config.axis_rotated?"middle":"alphabetic"}else if(Vn(e,z)&&d){const Q=(w=e.getCandlestickData)==null?void 0:w.call(e,z),q=_i(e,d,z,z.index),st=Q==null?void 0:Q._isUp;if(!q)continue;const{wickEnd:it,wickStart:ot}=q,ct=e.config[`axis_${($=e.axis)==null?void 0:$.getId(z.id)}_inverted`];W=e.config.axis_rotated?st?it[0]+4:ot[0]-4:ot[0],H=e.config.axis_rotated?ot[1]+3:st?it[1]-3:ot[1]+12,!e.config.axis_rotated&&ct&&(H+=15*(st?1:-1)),i.textAlign=e.config.axis_rotated?st?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:W,y:H}=j0(n.pos,z,z.index),{x:W,y:H}=Xd(e,i,z,W,H));W+=po(e,z,"x",E),H+=po(e,z,"y",E),gn(W,H)&&this.drawDataLabel(e,z,B,W,H)}})})}drawEmptyLabel(e){const n=e.config.data_empty_label_text,r=e.filterTargetsToShow();if(!n||r.length)return;const{margin:i,width:s,height:o}=e.state,{style:l}=this.theme;this.painter.text(String(n),i.left+s/2,i.top+o/2,{fill:l.emptyLabel.color,font:l.emptyLabel.font,textAlign:"center",textBaseline:"middle"})}drawZoomBrush(e,n,r){const{axis_rotated:i}=e.config,{height:s,margin:o,width:l}=e.state,c=Math.min(n,r),u=Math.abs(r-n),f=i?{x:o.left,y:o.top+c,w:l,h:u}:{x:o.left+c,y:o.top,w:u,h:s};u<=0||this.painter.fillRect(f,{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawSelectionDragArea(e,n){const{margin:r,width:i,height:s}=e.state,o={x:r.left,y:r.top,w:i,h:s},l=Math.max(o.x,n.x),c=Math.max(o.y,n.y),u=Math.min(o.x+o.w,n.x+n.w),f=Math.min(o.y+o.h,n.y+n.h);u<=l||f<=c||this.painter.fillRect({x:l,y:c,w:u-l,h:f-c},{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawTreemaps(e){var n;const{ctx:r,painter:i,theme:{style:s}}=this,{config:o}=e,l=(n=e.getTreemapRoot)==null?void 0:n.call(e,e.data.targets),c=(l==null?void 0:l.children)||[];i.withState(()=>{var u;r.lineWidth=s.treemap.lineWidth,r.strokeStyle=s.treemap.stroke;for(const f of c){const{data:d}=f;if(!kl(e,d))continue;const{x:h,y:m,w:S,h:E}=ai(e,f,l,!0);if(!gn(h,m)||!gn(h+S,m+E)||S<=0||E<=0)continue;const C={x:h,y:m,w:S,h:E};if(r.fillStyle=e.color(d.name),i.fillRect(C),i.strokeRect(C),!o.treemap_label_show||(d.ratio||0)<(o.treemap_label_threshold||0))continue;const w=Y0(e,d,S,E);if(!w)continue;const $=w.split(`
|
|
38
|
-
`),z=!!o.data_labels.centered;r.font=s.label.font;const B=xr(r.font),W=r.measureText((u=$[0])!=null?u:""),H=(W.fontBoundingBoxAscent||0)+(W.fontBoundingBoxDescent||0)||(W.actualBoundingBoxAscent||0)+(W.actualBoundingBoxDescent||0),Q=Math.max(B,H)+($.length-1)*B,q=z?m+E/2:m+Q+5;let st=z?h+S/2:h+5,it=q-($.length-1)*B/(z?2:1);r.textAlign=z?"center":"left",r.textBaseline=z?"middle":"alphabetic",{x:st,y:it}=this.drawLabelImage(e,d,w,st,it),r.fillStyle=kd(e,d,s.label.color),Gd(e,i,d,w,st,z?it+($.length-1)*B/2:q),$.forEach((ot,ct)=>{i.text(ot,st,it+ct*B,{maxWidth:Math.max(0,S-8)})})}})}drawSubchartFocus(e,n){const{config:r,scale:i,state:s}=e,o=n==null?void 0:n.find(C=>C&&An(e,C));if(!o||!r.subchart_show||r.subchart_grid_focus_continuous||r.subchart_brush_enabled!==!1||r.grid_focus_show===!1||r.subchart_grid_focus===!1||!r.tooltip_show||r.axis_tooltip||!i.subX||s.width2<=0||s.height2<=0)return;const{margin2:l,width2:c,height2:u}=s,f=i.subX(o.x);if(!Number.isFinite(f))return;const{painter:d,theme:{style:h}}=this,m=h.axis.lineWidth,S=d.crisp(l.left+f,m),E=d.crisp(l.top+f,m);d.strokePath(()=>{r.axis_rotated?d.traceLine(l.left,E,l.left+c,E):d.traceLine(S,l.top,S,l.top+u)},{lineDash:h.focusGrid.dashArray,lineWidth:h.focusGrid.lineWidth,stroke:h.focusGrid.lineColor})}drawFocus(e,n){if(!(n!=null&&n.length))return;const{painter:r}=this,{style:i}=this.theme,{margin:s}=e.state,o=n.find(l=>l&&An(e,l));e.config.subchart_grid_focus!==!1&&!rc(e)&&this.drawSubchartFocus(e,n),r.withTranslation(s.left,s.top,()=>{if(e.config.tooltip_show&&e.config.grid_focus_show!==!1&&!e.config.axis_tooltip&&o){const{x:l,y:c}=Ji(e,o),u=i.axis.lineWidth,f=e.config.axis_rotated,d=Number.isFinite(f?c:l),h=Number.isFinite(f?l:c),m=z=>r.crisp(s.left+z,u)-s.left,S=z=>r.crisp(s.top+z,u)-s.top,E=e.config.grid_focus_edge&&!e.config.tooltip_grouped,C=rc(e),w=C?e.state.margin2.left-s.left+e.state.width2:e.state.width,$=C?e.state.margin2.top-s.top+e.state.height2:e.state.height;d&&r.strokePath(()=>{var z,B;if(f){if(r.traceLine(m(0),c,E&&h?l:m(w),c),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const W=((z=e.axis)==null?void 0:z.getId(o.id))==="y2";r.traceLine(l,E&&!W?c:S(0),l,E&&W?c:S(e.state.height))}}else if(r.traceLine(l,E&&h?c:S(0),l,S($)),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const W=((B=e.axis)==null?void 0:B.getId(o.id))==="y2";r.traceLine(E&&W?l:m(0),c,E&&!W?l:m(e.state.width),c)}},{lineDash:i.focusGrid.dashArray,lineWidth:i.focusGrid.lineWidth,stroke:i.focusGrid.lineColor})}e.config.point_show&&!e.state.canvasFocusMainRedraw&&n.filter(l=>l&&An(e,l)&&yr(e,l)&&Yr(e,{id:l.id})).forEach(l=>{var c,u,f,d;const h=yc(e,{id:l.id}),{x:m,y:S}=Ji(e,l),E=(u=(c=e.pointR)==null?void 0:c.call(e,l))!=null?u:2.5,C=(d=(f=e.pointExpandedR)==null?void 0:f.call(e,l))!=null?d:E*1.75,w=es(e,l),$=w||e.color(l.id),z=w||i.focusPoint.fill||i.shape.pointFillColor||$,B=w||i.focusPoint.stroke||$,W=i.focusPoint.lineWidth,H=yo(e,l),Q=!!B&&(W!=null?W:0)>0,q=h==="circle"&&Q&&ae(H)&&H<1&&z===B;gn(m,S)&&ts(r,h,m,S,q?C+(W||0)/2:C,Q&&!q?{fill:z,lineWidth:W,stroke:B,alpha:H}:{fill:z,alpha:H},E)}),this.drawFocusLabels(e,n)})}}var _T=Object.defineProperty,lh=Object.getOwnPropertySymbols,qT=Object.prototype.hasOwnProperty,t1=Object.prototype.propertyIsEnumerable,e1=(t,e,n)=>e in t?_T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,n1=(t,e)=>{var n={};for(var r in t)qT.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&lh)for(var r of lh(t))e.indexOf(r)<0&&t1.call(t,r)&&(n[r]=t[r]);return n},rs=(t,e,n)=>e1(t,typeof e!="symbol"?e+"":e,n);const Pr="http://www.w3.org/2000/svg";function Le(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:"");return Number.isFinite(n)?n:e}function Da(t,e){const n=Le(t.opacity,1),r=Le(t["fill-opacity"],1),i=n*r;return Number.isFinite(i)?i:e}function ke(t,e){const n=t==null?void 0:t.trim();return n&&!/^(none|transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i.test(n)?n:e}function si(t,e){const n=ke(t,""),r=e?ke(e,""):"";return n&&n!==r?n:void 0}function oi(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:""),r=typeof e=="number"?e:parseFloat(e!=null?e:"");return Number.isFinite(n)&&(!Number.isFinite(r)||n!==r)?n:void 0}function as(t){return Array.isArray(t)?t.filter(e=>Number.isFinite(e)&&e>0):(t||"").split(/[,\s]+/).map(e=>parseFloat(e)).filter(e=>Number.isFinite(e)&&e>0)}function r1(t,e){const n=t.getPropertyValue("font").trim();if(n)return n;const r=t.getPropertyValue("font-size").trim(),i=t.getPropertyValue("font-family").trim();if(!r||!i)return e;const s=t.getPropertyValue("font-style").trim(),o=t.getPropertyValue("font-variant").trim(),l=t.getPropertyValue("font-weight").trim(),c=t.getPropertyValue("line-height").trim(),u=c&&c!=="normal"?`${r}/${c}`:r;return[s&&s!=="normal"?s:"",o&&o!=="normal"?o:"",l&&!/^(normal|400)$/.test(l)?l:"",u,i].filter(Boolean).join(" ")}function Mr(t,e){var n;const r=e.replace(/-([a-z])/g,(i,s)=>s.toUpperCase());return(n=t[e])!=null?n:t[r]}function Ke(t,e){const n=Mr(t,e);return(n==null?"":ke(String(n),""))||void 0}function Pn(t,e){const n=Mr(t,e),r=typeof n=="number"?n:parseFloat(String(n!=null?n:""));return Number.isFinite(r)?r:void 0}function da(t){const e=Pn(t,"opacity"),n=Pn(t,"fill-opacity");return e===void 0&&n===void 0?void 0:(e!=null?e:1)*(n!=null?n:1)}function Tc(t){const e=Mr(t,"stroke-dasharray"),n=e==null?[]:as(e);return n.length?n:void 0}function nr(t){var e,n,r,i;const s=Mr(t,"font");if(s!=null&&String(s).trim())return String(s).trim();const o=Mr(t,"font-size"),l=Mr(t,"font-family");if(o==null||l==null)return;const c=String(o).trim(),u=String(l).trim();if(!c||!u)return;const f=String((e=Mr(t,"font-style"))!=null?e:"").trim(),d=String((n=Mr(t,"font-variant"))!=null?n:"").trim(),h=String((r=Mr(t,"font-weight"))!=null?r:"").trim(),m=String((i=Mr(t,"line-height"))!=null?i:"").trim();return[f&&f!=="normal"?f:"",d&&d!=="normal"?d:"",h&&!/^(normal|400)$/.test(h)?h:"",m&&m!=="normal"?`${c}/${m}`:c,u].filter(Boolean).join(" ")}function Qe(t,e,n){var r;const i=Object.keys(n).reduce((s,o)=>(n[o]!==void 0&&(s[o]=n[o]),s),{});Object.keys(i).length&&(t[e]=Xr((r=t[e])!=null?r:{},i))}function ch(t){return t.split(",").map(e=>e.trim().replace(/\s*>\s*/g," ").replace(/\s+/g," ").replace(/^(?:svg)?\.bb\s+/,"").replace(/(^|\s)(?:g|path|rect|line|text|circle)\./g,"$1.")).filter(Boolean)}function bc(t){return Object.keys(t).filter(e=>t[e]!==void 0)}function uh(t,e,n){return bc(e).forEach(r=>{n!=null&&n.has(r)||(t[r]=e[r])}),t}function fh(t){const e=t.split(" ");return e.every((n,r)=>n==="line"||n==="text"?r===e.length-1:/^(\.[A-Za-z_-][\w-]*)+$/.test(n))}function dh(t){const e=t.split(" "),n=e[e.length-1];return n==="line"||n==="text"?n:null}function a1(t){return(t||"").split(/\s+/).filter(Boolean)}function i1(t,e){const n=e==="text"?{labelColor:Ke(t,"fill"),labelFont:nr(t)}:{lineColor:Ke(t,"stroke"),lineWidth:Pn(t,"stroke-width"),dashArray:Tc(t)};return uh({},n)}function s1(t){const e=[];return Object.keys(t!=null?t:{}).forEach(n=>{ch(n).forEach(r=>{const i=dh(r)||"line",s=i1(t[n],i);fh(r)&&bc(s).length&&e.push({selector:r,target:i,style:s})})}),e}function o1(t,e,n,r){if(!fh(t))return!1;const i=dh(t);if(i&&i!==r)return!1;if(!i&&r==="text")return!1;const s=a1(n),o=`bb-${e}grid-line`,l=new Set(["bb-grid","bb-grid-lines",`bb-${e}grid-lines`,o,...s]),c=(t.match(/\.[A-Za-z_-][\w-]*/g)||[]).map(u=>u.slice(1));return!!c.length&&c.every(u=>l.has(u))&&(c.includes(o)||s.some(u=>c.includes(u)))}function l1(t,e,n){switch(e){case".bb-axis path.domain":case".bb-axis .domain":case".bb-axis-x path.domain":case".bb-axis-x .domain":case".bb-axis-y path.domain":case".bb-axis-y .domain":case".bb-axis-y2 path.domain":case".bb-axis-y2 .domain":Qe(t,"axis",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-axis line":case".bb-axis .tick line":case".bb-axis-x line":case".bb-axis-x .tick line":case".bb-axis-y line":case".bb-axis-y .tick line":case".bb-axis-y2 line":case".bb-axis-y2 .tick line":Qe(t,"axis",{tickColor:Ke(n,"stroke"),tickWidth:Pn(n,"stroke-width")});break;case".bb-axis text":case".bb-axis .tick text":{const r=nr(n);Qe(t,"axis",{labelColor:Ke(n,"fill"),xTickFont:r,yTickFont:r,y2TickFont:r});break}case".bb-axis-x text":case".bb-axis-x .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),xTickFont:nr(n)});break;case".bb-axis-y text":case".bb-axis-y .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),yTickFont:nr(n)});break;case".bb-axis-y2 text":case".bb-axis-y2 .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),y2TickFont:nr(n)});break;case".tick._active_ text":case".bb-axis .tick._active_ text":case".bb-axis-x .tick._active_ text":Qe(t,"axis",{activeLabelColor:Ke(n,"fill")});break;case".bb-axis-x-label":case".bb-axis-x .bb-axis-x-label":Qe(t,"axis",{labelFont:nr(n),xLabelColor:Ke(n,"fill")});break;case".bb-axis-y-label":case".bb-axis-y .bb-axis-y-label":Qe(t,"axis",{labelFont:nr(n),yLabelColor:Ke(n,"fill")});break;case".bb-axis-y2-label":case".bb-axis-y2 .bb-axis-y2-label":Qe(t,"axis",{labelFont:nr(n),y2LabelColor:Ke(n,"fill")});break;case".bb-grid line":case".bb-grid .bb-xgrid":case".bb-grid .bb-ygrid":case".bb-xgrid":case".bb-ygrid":Qe(t,"grid",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width"),dashArray:Tc(n)});break;case".bb-grid text":Qe(t,"grid",{labelColor:Ke(n,"fill"),labelFont:nr(n)});break;case".bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus":Qe(t,"focusGrid",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width"),dashArray:Tc(n)});break;case".bb-region rect":case".bb-region":Qe(t,"region",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-region text":Qe(t,"region",{labelColor:Ke(n,"fill"),labelFont:nr(n)});break;case".bb-bar":Qe(t,"shape",{barOpacity:da(n),barStrokeColor:Ke(n,"stroke"),barLineWidth:Pn(n,"stroke-width")});break;case".bb-bar._expanded_":Qe(t,"shape",{barExpandedOpacity:da(n)});break;case".bb-candlestick":Qe(t,"shape",{candlestickStrokeColor:Ke(n,"stroke"),candlestickLineWidth:Pn(n,"stroke-width")});break;case".bb-candlestick._expanded_":Qe(t,"shape",{candlestickExpandedOpacity:da(n)});break;case".bb-line":Qe(t,"shape",{barConnectLineColor:Ke(n,"stroke"),barConnectLineWidth:Pn(n,"stroke-width"),lineWidth:Pn(n,"stroke-width")});break;case".bb-target.bb-focused .bb-line":case".bb-target.bb-focused path.bb-line":Qe(t,"shape",{lineFocusedWidth:Pn(n,"stroke-width")});break;case".bb-target.bb-defocused":Qe(t,"shape",{targetDefocusedOpacity:Pn(n,"opacity")});break;case".bb-area":Qe(t,"shape",{areaOpacity:da(n)});break;case".bb-circle":Qe(t,"shape",{pointFillColor:Ke(n,"fill"),pointStrokeColor:Ke(n,"stroke"),pointLineWidth:Pn(n,"stroke-width")});break;case".bb-selected-circle":Qe(t,"selectedPoint",{fill:Ke(n,"fill"),stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-circle._expanded_":Qe(t,"focusPoint",{fill:Ke(n,"fill"),stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-zoom-brush":Qe(t,"zoomBrush",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-brush .extent":case".bb-brush .selection":Qe(t,"subchartBrush",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-brush .handle--custom":Qe(t,"subchartBrush",{handleFill:Ke(n,"fill"),handleOpacity:da(n),handleStroke:Ke(n,"stroke"),handleLineWidth:Pn(n,"stroke-width")});break;case".bb-chart-treemaps rect":case".bb-chart-treemaps":Qe(t,"treemap",{stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-text.bb-empty":case".bb-text .bb-empty":case".bb-empty":Qe(t,"emptyLabel",{color:Ke(n,"fill"),font:nr(n)});break;case".bb-text":Qe(t,"label",{color:Ke(n,"fill"),font:nr(n)});break;case".bb-title":Qe(t,"title",{color:Ke(n,"fill"),font:nr(n)});break}}function c1(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{ch(n).forEach(r=>{l1(e,r,t[n])})}),e}function u1(t){if(!t)return{};const e=t,{selectors:n}=e,r=n1(e,["selectors"]);return Xr({},c1(n),r)}function hh(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class f1{constructor(){rs(this,"style"),rs(this,"cacheContainer",null),rs(this,"cacheKey",null),rs(this,"gridLineSelectorOverrides",[]),rs(this,"directGridOverrideKeys",new Set)}load(e,n){var r,i,s,o,l;const c=Ye.createElementNS(Pr,"svg");this.gridLineSelectorOverrides=s1(n==null?void 0:n.selectors),this.directGridOverrideKeys=new Set(Object.keys((r=n==null?void 0:n.grid)!=null?r:{})),c.setAttribute("class","bb"),c.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;overflow:hidden",e.appendChild(c);const u=(wn,Xn)=>{const Hn=se.getComputedStyle(wn),Qn={};for(const Fn of Xn)Qn[Fn]=Fn==="font"?r1(Hn,""):Hn.getPropertyValue(Fn).trim();return Qn},f=(wn,Xn,Hn)=>{const Qn=Ye.createElementNS(Pr,wn);Qn.setAttribute("class",Xn),c.appendChild(Qn);const Fn=u(Qn,Hn);return c.removeChild(Qn),Fn},d=(wn,Xn,Hn,Qn)=>{const Fn=Ye.createElementNS(Pr,"g"),dr=Ye.createElementNS(Pr,Xn);Fn.setAttribute("class",wn),Hn&&dr.setAttribute("class",Hn),Fn.appendChild(dr),c.appendChild(Fn);const na=u(dr,Qn);return c.removeChild(Fn),na},h=(wn,Xn,Hn,Qn,Fn)=>{const dr=Ye.createElementNS(Pr,"g"),na=Ye.createElementNS(Pr,"g"),As=Ye.createElementNS(Pr,Hn);dr.setAttribute("class",wn),na.setAttribute("class",Xn),Qn&&As.setAttribute("class",Qn),na.appendChild(As),dr.appendChild(na),c.appendChild(dr);const kR=u(As,Fn);return c.removeChild(dr),kR},m=(wn,Xn,Hn,Qn="")=>{const Fn=Ye.createElementNS(Pr,"g"),dr=Ye.createElementNS(Pr,"g"),na=Ye.createElementNS(Pr,Xn);Fn.setAttribute("class",`bb-axis ${wn}`),dr.setAttribute("class",["tick",Qn].filter(Boolean).join(" ")),na.textContent=Xn==="text"?"0":"",dr.appendChild(na),Fn.appendChild(dr),c.appendChild(Fn);const As=u(na,Hn);return c.removeChild(Fn),As},S="rgb(1, 2, 3)",E=(wn,Xn)=>{const Hn=Ye.createElement("style");Hn.textContent=`
|
|
36
|
+
`):t.config.axis_x_tick_multiline?OA(u,l!=null?l:cu(t,a,s,o),e):[u]}function uu(t,e){const{isRotated:n,tickCount:r,tickIndex:a,tickRotate:s,tickTextDirection:o}=e,l=t.config.axis_x_tick_text_inner;let c=n?o>0?"left":"right":s?s>0?"left":"right":"center";return!n&&a===0&&(l===!0||l!=null&&l.first)?c="left":!n&&a===r-1&&(l===!0||l!=null&&l.last)&&(c="right"),c}function PA(t,e){var n,r;return((n=t==null?void 0:t.indexOf("center"))!=null?n:-1)>-1?{x:e/2,align:"center"}:((r=t==null?void 0:t.indexOf("right"))!=null?r:-1)>-1?{x:e,align:"right"}:{x:0,align:"left"}}function ya(t){return Number.isFinite(t)}function Xo(t,e,n){return ya(t)&&t>=Math.min(e,n)&&t<=Math.max(e,n)}function tv(t){return t?-1:1}function MA(t,e,n){return e?n?t.axis_y2_inner?1:-1:t.axis_y_inner?-1:1:n?t.axis_y2_inner?-1:1:t.axis_y_inner?1:-1}function fu(t,e,n=Yn(t)){return n(Jr(t,e))}function LA(t,e){var n,r;return(r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&typeof e=="string"&&Number.isNaN(Number(e))?t.config.axis_x_categories.indexOf(e):Jr(t,e)}function DA(t,e){var n,r;return!!((r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&Number.isNaN(Number(e)))}function ev(t,e,n,r){var a,s;if(e===void 0)return n;let o=Yn(t)(LA(t,e));if(DA(t,e)){const l=Yn(t),c=((s=(a=t.axis.x)==null?void 0:a.tickOffset)==null?void 0:s.call(a))||(l(1)-l(0))/2;o+=c*(r==="start"?-1:1)}return o}function nv(t,e,n="y"){return t.scale[n||"y"](Ts(t,e,n))}function FA(t,e){const{config:n,scale:r,state:{width:a,height:s}}=t,o=e.axis||"x",l=n.axis_rotated;if(o==="x"){const h=ev(t,e.start,0,"start"),v=ev(t,e.end,l?s:a,"end"),b=Math.min(h,v),x=Math.abs(v-h);return l?{x:0,y:b,w:a,h:x}:{x:b,y:0,w:x,h:s}}if(!r[o])return null;const c=e.start===void 0?l?0:s:nv(t,e.start,o),u=e.end===void 0?l?a:0:nv(t,e.end,o),f=Math.min(c,u),d=Math.abs(u-c);return l?{x:f,y:0,w:d,h:s}:{x:0,y:f,w:a,h:d}}class NA{constructor(e,n){ru(this,"engine",e),ru(this,"theme",n),ru(this,"painter"),this.painter=new kd(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}draw(e){var n,r,a;this.drawRegions(e),(a=(r=(n=e.getCanvasFeature)==null?void 0:n.call(e,"grid"))==null?void 0:r.draw)==null||a.call(e,this),this.drawAxis(e)}drawAxis(e){const{config:n}=e;n.axis_x_show&&this.drawXAxis(e),n.axis_y_show&&this.drawYAxis(e),n.axis_y2_show&&e.scale.y2&&this.drawYAxis(e,"y2"),this.drawAdditionalAxes(e),this.drawAxisLabels(e)}drawTitle(e){var n,r;const{ctx:a,painter:s,theme:{style:{title:o}}}=this,{config:l,state:{current:c}}=e;if(!l.title_text)return;const u=String(l.title_text).split(`
|
|
37
|
+
`),f=Qn(o.font),d=f*1.5,{x:h,align:v}=PA(l.title_position,c.width),b=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,x=(l.title_padding.top||0)+b;s.withState(()=>{a.font=o.font,a.fillStyle=o.color,a.textAlign=v,a.textBaseline="alphabetic",u.forEach((E,w)=>{a.fillText(E,h,x+(w?f+(w-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:a}}}=this,{axis:s,config:o}=e,l=Qn(a.labelFont),c=["x","y","y2"],u={x:a.xLabelColor,y:a.yLabelColor,y2:a.y2LabelColor},f={start:"left",middle:"center",end:"right"};s&&r.withState(()=>{n.font=a.labelFont,n.textBaseline="alphabetic",c.forEach(d=>{const h=s.getLabelText(d);if(!h||!o[`axis_${d}_show`]||d==="y2"&&!e.scale.y2)return;const v=d==="x"&&o.axis_rotated||d!=="x"&&!o.axis_rotated,b=CA(e,d),x=s.xForAxisLabel(d)+Ho(s.dxForAxisLabel(d),l),E=Ho(s.dyForAxisLabel(d),l),{x:w,y:N}=wA(b,x,E,v),k=s.textAnchorForAxisLabel(d);n.fillStyle=u[d]||a.labelColor,n.textAlign=f[k]||"center",r.text(String(h),w,N,{angle:v?-90:0})})})}drawRegions(e){const{ctx:n,painter:r,theme:{style:{region:a}}}=this,{config:s,state:{height:o,margin:l,width:c}}=e,u=s.regions||[];u.length&&r.clipRect({x:l.left,y:l.top,w:c,h:o},()=>{var f;n.fillStyle=a.fill,n.font=a.labelFont,n.textBaseline="top";for(const d of u){const h=FA(e,d);if(!h||!ya(h.x)||!ya(h.y)||!h.w||!h.h)continue;const v=l.left+h.x,b=l.top+h.y,x=h.w,E=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:a.opacity,r.fillRect({x:v,y:b,w:x,h:E}),(f=d.label)!=null&&f.text){const w=d.label,N=w.center||"",k=String(w.text),B=r.measureText(k).width,G=parseFloat(n.font)||12;let V=v+(w.x||0),Z=b+(w.y||0);N.indexOf("x")>-1&&(V+=(x-B)/2),N.indexOf("y")>-1&&(Z+=(E-G)/2),r.text(k,V,Z,{angle:w.rotated?-90:0,alpha:1,fill:w.color||a.labelColor})}}})}drawAdditionalAxes(e){["x","y","y2"].forEach(n=>{const r=e.config[`axis_${n}_axes`]||[];!r.length||!e.scale[n]||!e.config[`axis_${n}_show`]||r.forEach((a,s)=>{var o;const l=vA(e,n,a);if(!l)return;const c={scale:l,ticks:pA(e,n,l,a),format:mA(e,a),index:s+1,outerTick:((o=a.tick)==null?void 0:o.outer)!==!1};n==="x"?this.drawXAxis(e,c):this.drawYAxis(e,n,c)})})}drawXAxis(e,n){var r;const{ctx:a,painter:s,theme:{style:{axis:o}}}=this,{axis:l,config:c,state:{current:u,margin:f,width:d,height:h}}=e,v=c.axis_rotated,b=n!=null&&n.index?e.getAxisSize("x")*n.index:0,x=(n==null?void 0:n.scale)||Yn(e),E=s.crisp(f.left-(v?b:0),o.lineWidth),w=s.crisp(f.top+h+(v?0:b),o.lineWidth),N=f.left,k=f.left+d,B=f.top,G=f.top+h,V=v?B:N,Z=v?G:k,Y=(n==null?void 0:n.ticks)||Uo(e),et=(n==null?void 0:n.ticks)||hA(e,Y,o.tickWidth),it=(n==null?void 0:n.format)||l.getXAxisTickFormat(),at=n?n.outerTick:c.axis_x_tick_outer,ot=v?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,st=tv(v),_=au(v),lt=c.axis_x_tick_text_position,nt=v?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0;s.clipRect(v?su(f,u.width,h):iu(f,d,u.height),()=>{if(a.strokeStyle=o.lineColor,a.lineWidth=o.lineWidth,s.strokePath(()=>{v?s.traceLine(E,B,E,G):s.traceLine(N,w,k,w),at&&(v?(s.traceLine(E,B,E+tn*st,B),s.traceLine(E,G,E+tn*st,G)):(s.traceLine(N,w,N,w+tn*st),s.traceLine(k,w,k,w+tn*st)))}),a.font=Es(o,"x"),a.fillStyle=o.labelColor,a.textAlign=v?_>0?"left":"right":"center",a.textBaseline=v?"middle":_>0?"top":"bottom",a.strokeStyle=o.tickColor,a.lineWidth=o.tickWidth,c.axis_x_tick_show&&s.strokePath(()=>{for(const Et of et){const Rt=tu(e,Et,x),Vt=f.left+Rt,ae=f.top+Rt;Xo(v?ae:Vt,V,Z)&&(v?s.traceLine(E,ae,E+tn*ot,ae):s.traceLine(Vt,w,Vt,w+tn*ot))}}),!n&&!c.axis_x_tick_text_show)return;const dt=Es(o,"x"),bt=lu(s,Qn(dt)),At=cu(e,Y,v,x);Y.forEach((Et,Rt)=>{this.drawXAxisTickText(e,Et,it,o.labelColor,{isRotated:v,rangeEnd:Z,rangeStart:V,tickCount:Y.length,tickFont:dt,tickIndex:Rt,tickLineHeight:bt,tickTextDirection:_,tickTextWidth:At,tickRotate:nt,tickTextPosition:lt,targetScale:x,ticks:Y,x:E,y:w})})})}drawFocusedXAxisTick(e,n){var r;const{painter:a,theme:{style:{axis:s}}}=this,{axis:o,config:l,state:{current:c,margin:u,width:f,height:d}}=e,h=(r=n==null?void 0:n[0])==null?void 0:r.x;if(h===void 0||!o||!l.axis_x_show||!l.axis_x_tick_text_show||!s.activeLabelColor||s.activeLabelColor===s.labelColor)return;const v=Uo(e),b=v.findIndex(Z=>Ss(Z,h)),x=v[b];if(x===void 0)return;const E=l.axis_rotated,w=a.crisp(u.left,s.lineWidth),N=a.crisp(u.top+d,s.lineWidth),k=E?u.top:u.left,B=E?u.top+d:u.left+f,G=o.getXAxisTickFormat(),V=au(E);a.clipRect(E?su(u,c.width,d):iu(u,f,c.height),()=>{var Z;this.drawXAxisTickText(e,x,G,s.activeLabelColor,{isRotated:E,rangeEnd:B,rangeStart:k,targetScale:Yn(e),tickCount:v.length,tickIndex:b,tickTextDirection:V,tickRotate:E?0:((Z=e.getAxisTickRotate)==null?void 0:Z.call(e,"x"))||0,tickTextPosition:l.axis_x_tick_text_position,ticks:v,x:w,y:N})})}drawAxisTooltip(e,n){const{ctx:r,painter:a,theme:{style:{axis:s,grid:o}}}=this,{config:l,state:{margin:c,width:u,height:f}}=e;if(!l.axis_tooltip||!n)return;const d=l.axis_rotated,h=n[0]-c.left,v=n[1]-c.top,b=h>=0&&h<=u,x=v>=0&&v<=f;if(!b&&!x)return;const E=c.left+h,w=c.top+v,N=Qn(s.labelFont),k=N||10,B=(G,V,Z,Y,et)=>{const it=AA(e,G),at=it&&EA(e,G,V);if(!at)return;r.font=s.labelFont,r.textAlign=et,r.textBaseline="alphabetic";const ot=r.measureText(at),st=ot.width,_=ot.actualBoundingBoxAscent||k*.8,lt=ot.actualBoundingBoxDescent||k*.2,nt=Math.max(2,st*.15),dt=Math.max(3,k*.25),bt=et==="right"?Z-st:et==="center"?Z-st/2:Z,At=Y-_;r.fillStyle=it,r.fillRect(bt-nt,At-dt,st+nt*2,_+lt+dt*2),r.fillStyle="#fff",r.fillText(at,Z,Y)};a.withState(()=>{r.strokeStyle=o.lineColor,r.lineWidth=o.lineWidth,r.setLineDash([]),a.strokePath(()=>{b&&a.traceLine(E,c.top,E,c.top+f),x&&a.traceLine(c.left,w,c.left+u,w)}),r.setLineDash([]),d?(x&&l.axis_x_show&&B("x",v,c.left-N*.3,w+N*.4,"right"),b&&l.axis_y_show&&B("y",h,E-N*1.3,c.top+f+N*1.15,"left"),b&&l.axis_y2_show&&e.scale.y2&&B("y2",h,E-N*1.3,c.top-N*.4,"left")):(b&&l.axis_x_show&&B("x",h,E-N,c.top+f+N*1.15,"left"),x&&l.axis_y_show&&B("y",v,c.left-N*.4,w+N*.3,"right"),x&&l.axis_y2_show&&e.scale.y2&&B("y2",v,c.left+u+N*.4,w+N*.3,"left"))})}drawXAxisTickText(e,n,r,a,s){var o,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{state:{margin:d}}=e,{isRotated:h,rangeEnd:v,rangeStart:b,tickTextDirection:x,tickRotate:E,tickTextPosition:w,targetScale:N,ticks:k,x:B,y:G}=s,V=fu(e,n,N),Z=d.left+V,Y=d.top+V;if(!Xo(h?Y:Z,b,v))return;const it=(o=s.tickFont)!=null?o:Es(f,"x");c.font=it,c.fillStyle=a;const at=qg(e,u,r,n,k,h,N,s.tickTextWidth),ot=(l=s.tickLineHeight)!=null?l:lu(u,Qn(it));let st,_;if(h)st=B+(tn+Ma)*x+(w.x||0),_=Y+(w.y||0)+3-(at.length-1)*ot/2,c.textAlign=uu(e,s),c.textBaseline="alphabetic";else if(E){const lt=Qn(it),nt=w.y?Ho(w.y,lt):.71*lt,dt=RA(E)+(w.x||0),bt=IA(E)+nt;c.textAlign=uu(e,s),c.textBaseline="alphabetic",u.withState(At=>{At.translate(Z,G),At.rotate(E*Math.PI/180),at.forEach((Et,Rt)=>{At.fillText(Et,dt,bt+Rt*ot)})});return}else st=Z+(w.x||0),_=G+(tn+Ma)*x+(w.y||0),c.textAlign=uu(e,s),c.textBaseline=x>0?"top":"bottom";u.withState(lt=>{lt.translate(st,_),E&<.rotate(E*Math.PI/180),at.forEach((nt,dt)=>{lt.fillText(nt,0,dt*ot)})})}drawYAxis(e,n="y",r){var a,s,o,l,c,u,f,d;const{ctx:h,painter:v,theme:{style:{axis:b}}}=this,{config:x,scale:E,state:w}=e,{margin:N,width:k,height:B}=w,G=(r==null?void 0:r.margin)||N,V=(a=r==null?void 0:r.width)!=null?a:k,Z=(s=r==null?void 0:r.height)!=null?s:B,Y=(r==null?void 0:r.prefix)||`axis_${n}`,et=(r==null?void 0:r.scale)||E[n],it=n==="y2",at=x.axis_rotated,ot=r!=null&&r.index?e.getAxisSize(n)*r.index:0,st=v.crisp(G.left+(it?V+(at?0:ot):-ot),b.lineWidth),_=v.crisp(G.top+(at?it?-ot-1:Z+ot:0),b.lineWidth),lt=G.left,nt=G.left+V,dt=G.top,bt=G.top+Z,At=(r==null?void 0:r.ticks)||As(e,n),Et=(r==null?void 0:r.ticks)||(x[`${Y}_tick_culling`]&&x[`${Y}_tick_culling_lines`]!==!1?As(e,n,void 0,!1):At),Rt=(r==null?void 0:r.format)||((c=(l=(o=e.axis)==null?void 0:o[n])==null?void 0:l.tickFormat)==null?void 0:c.call(l))||((u=x[`${Y}_tick_format`])==null?void 0:u.bind(e.api))||(Yt=>Yt),Vt=r?r.outerTick:x[`${Y}_tick_outer`],ae=at?it?x.axis_y2_tick_inner?1:-1:x.axis_y_tick_inner?-1:1:it?x.axis_y2_tick_inner?-1:1:x.axis_y_tick_inner?1:-1,re=MA(x,at,it),ve=SA(at,it),xe=(r==null?void 0:r.tickTextPosition)||x[`${Y}_tick_text_position`]||x[`axis_${n}_tick_text_position`],ge=(f=r==null?void 0:r.tickShow)!=null?f:r?!0:x[`${Y}_tick_show`],Le=(d=r==null?void 0:r.tickTextShow)!=null?d:r?!0:x[`${Y}_tick_text_show`];v.withState(()=>{h.strokeStyle=b.lineColor,h.lineWidth=b.lineWidth,v.strokePath(()=>{at?v.traceLine(lt,_,nt,_):v.traceLine(st,dt,st,bt),Vt&&(at?(v.traceLine(lt,_,lt,_+tn*re),v.traceLine(nt,_,nt,_+tn*re)):(v.traceLine(st,dt,st+tn*re,dt),v.traceLine(st,bt,st+tn*re,bt)))});const Yt=Es(b,n);h.font=Yt,h.fillStyle=b.labelColor,h.textAlign=at?"center":ve>0?"left":"right",h.textBaseline=at?ve>0?"top":"bottom":"middle",h.strokeStyle=b.tickColor,h.lineWidth=b.tickWidth;const pe=[],be=[],Gt=(We,Be)=>{const cn=Ts(e,We,n),hn=G.left+et(cn),Ae=G.top+et(cn);ya(at?hn:Ae)&&Be.push({tick:We,tx:hn,ty:Ae})};for(const We of At)Gt(We,pe);for(const We of Et)Gt(We,be);if(ge&&v.strokePath(()=>{for(const{tx:We,ty:Be}of be)at?v.traceLine(We,_,We,_+tn*ae):v.traceLine(st,Be,st+tn*ae,Be)}),Le)for(const{tick:We,tx:Be,ty:cn}of pe)at&&ve>0?(h.textBaseline="alphabetic",v.text(ou(Rt,We),Be+(xe.x||0),_+Pd*ve+(xe.y?Ho(xe.y,Qn(Yt)):.71*Qn(Yt)))):at?v.text(ou(Rt,We),Be+(xe.x||0),_+tn*ve+(xe.y||0)):v.text(ou(Rt,We),st+(tn+Ma)*ve+(xe.x||0),cn+(xe.y||0))})}}var $A=Object.defineProperty,BA=Object.defineProperties,kA=Object.getOwnPropertyDescriptors,rv=Object.getOwnPropertySymbols,zA=Object.prototype.hasOwnProperty,UA=Object.prototype.propertyIsEnumerable,av=(t,e,n)=>e in t?$A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WA=(t,e)=>{for(var n in e||(e={}))zA.call(e,n)&&av(t,n,e[n]);if(rv)for(var n of rv(e))UA.call(e,n)&&av(t,n,e[n]);return t},GA=(t,e)=>BA(t,kA(e));function HA(t){return t?{stroke:t.lineColor,lineWidth:t.lineWidth,lineDash:t.dashArray}:void 0}function XA(t){return t?{fill:t.labelColor,font:t.labelFont}:void 0}function iv(t,e,n){return t==="start"?e+4:t==="middle"?(e+n)/2:n-4}function sv(t,e,n){return t==="start"?n-4:t==="middle"?(e+n)/2:e+4}function ov(t,e){const{ctx:n,painter:r,theme:{style:{axis:a,grid:s}}}=t,{config:o,scale:l,state:{height:c,margin:u,width:f}}=e,d=o.axis_rotated,h=u.left,v=u.left+f,b=u.top,x=u.top+c;s.lineColor&&r.withState(()=>{n.strokeStyle=s.lineColor,n.lineWidth=s.lineWidth,n.font=s.labelFont||a.labelFont,n.fillStyle=s.labelColor,n.textBaseline="middle",n.setLineDash([]);const E=(G,V,Z,Y=!1,et)=>{G&&r.text(G,V,Z,GA(WA({},et),{angle:Y?-90:0}))},w=(G,V,Z)=>{const Y=HA(t.theme.getGridLineStyle(V,G,"line"));r.strokePath(Z,Y)},N=(G,V)=>XA(t.theme.getGridLineStyle(G,V,"text")),k=G=>{if(G.value===void 0||!l.x)return;const V=fu(e,G.value);if(ya(V))if(d){const Z=u.top+V;w(G,"x",()=>{r.traceLine(h,Z,v,Z)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",E(G.text,iv(G.position,h,v),Z-5,!1,N("x",G))}else{const Z=u.left+V;w(G,"x",()=>{r.traceLine(Z,b,Z,x)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",E(G.text,Z-5,sv(G.position,b,x),!0,N("x",G))}},B=G=>{const V=G.axis==="y2"?l.y2:l.y,Z=G.axis==="y2"?"y2":"y";if(G.value===void 0||!V)return;const Y=Ts(e,G.value,Z),et=V(Y);if(ya(et))if(d){const it=u.left+et;w(G,"y",()=>{r.traceLine(it,b,it,x)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",E(G.text,it-5,sv(G.position,b,x),!0,N("y",G))}else{const it=u.top+et;w(G,"y",()=>{r.traceLine(h,it,v,it)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",E(G.text,iv(G.position,h,v),it-5,!1,N("y",G))}};(o.grid_x_lines||[]).forEach(k),(o.grid_y_lines||[]).forEach(B)})}function VA(t,e){const{ctx:n,painter:r,theme:{style:{grid:a}}}=t,{config:s,scale:o,state:{height:l,margin:c,width:u}}=e;if(!a.lineColor)return;const f=s.axis_rotated,d=c.left,h=c.left+u,v=c.top,b=c.top+l;r.withState(()=>{n.strokeStyle=a.lineColor,n.lineWidth=a.lineWidth,a.dashArray.length&&n.setLineDash(a.dashArray),s.grid_x_show&&o.x&&r.strokePath(()=>{for(const x of Uo(e)){const E=fu(e,x);ya(E)&&(f?r.traceCrispLine(d,c.top+E,h,c.top+E,a.lineWidth):r.traceCrispLine(c.left+E,v,c.left+E,b,a.lineWidth))}}),s.grid_y_show&&o.y&&r.strokePath(()=>{for(const x of xA(e)){const E=Ts(e,x),w=o.y(E);ya(w)&&(f?r.traceCrispLine(c.left+w,v,c.left+w,b,a.lineWidth):r.traceCrispLine(d,c.top+w,h,c.top+w,a.lineWidth))}}),!s.grid_lines_front&&ov(t,e)})}var jA={draw(t){VA(t,this)},drawLines(t){ov(t,this)}},YA=Object.defineProperty,KA=Object.defineProperties,ZA=Object.getOwnPropertyDescriptors,lv=Object.getOwnPropertySymbols,JA=Object.prototype.hasOwnProperty,QA=Object.prototype.propertyIsEnumerable,cv=(t,e,n)=>e in t?YA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_A=(t,e)=>{for(var n in e||(e={}))JA.call(e,n)&&cv(t,n,e[n]);if(lv)for(var n of lv(e))QA.call(e,n)&&cv(t,n,e[n]);return t},qA=(t,e)=>KA(t,ZA(e));const tE={section:"heatmap",probe({probeIn:t,axisFont:e,toColor:n}){const r=t("bb-chart-heatmap","text","bb-heatmap-axis",["fill","font"]),a=t("bb-chart-heatmap","text","bb-heatmap-label",["font"]);return{axisFont:r.font||e,axisColor:n(r.fill,"#000"),labelFont:a.font||e}},selectors:{".bb-heatmap-axis":(t,{readColorValue:e,readFontValue:n})=>({axisColor:e(t,"fill"),axisFont:n(t)}),".bb-heatmap-label":(t,{readFontValue:e})=>({labelFont:e(t)})}},eE={middle:.35,top:.71,bottom:0};function uv(t,e,n){var r,a;const s=parseFloat((a=(r=/(\d+(?:\.\d+)?)px/.exec(n.font))==null?void 0:r[1])!=null?a:"10");t.painter.text(e.text,e.x,e.y+eE[e.baseline]*s,qA(_A({},n),{textAlign:e.align,textBaseline:"alphabetic"}))}var nE={theme:tE,draw(t){const e=this,{painter:n,theme:{style:{heatmap:r,shape:a}}}=t,{config:s}=e,{cells:o,axisX:l,axisY:c,colorbar:u}=e.getHeatmapLayout(),f=s.heatmap_cell_radius,d=s.heatmap_cell_border_width;o.forEach(v=>{const b={x:v.x0,y:v.y0,w:Math.max(0,v.x1-v.x0),h:Math.max(0,v.y1-v.y0)},x=e.isHeatmapDefocused(v.id)?a.targetDefocusedOpacity:1;n.fillRoundRect(b,f,{fill:v.color,alpha:x}),d&&n.strokeRoundRect(b,f,{stroke:s.heatmap_cell_border_color,lineWidth:d,alpha:x});const E=e.getHeatmapLabel(v);E&&uv(t,{text:E,x:(v.x0+v.x1)/2,y:(v.y0+v.y1)/2,align:"center",baseline:"middle"},{fill:e.getHeatmapLabelColor(v),alpha:x,font:r.labelFont})});const h=v=>uv(t,v,{fill:r.axisColor,font:r.axisFont});if(l.forEach(h),c.forEach(h),u){const{x:v,y:b,width:x,height:E,stops:w,horizontal:N}=u,k=N?n.context.createLinearGradient(v,0,v+x,0):n.context.createLinearGradient(0,b,0,b+E);w.forEach(([B,G])=>k.addColorStop(B,G)),n.fillRect({x:v,y:b,w:x,h:E},{fill:k}),u.labels.forEach(h)}e.fitHeatmapHeight()},hits(t){const e=this;e.getHeatmapLayout().cells.forEach(n=>{n.value!==null&&t.addBar({x:n.x0,y:n.y0,w:Math.max(1,n.x1-n.x0),h:Math.max(1,n.y1-n.y0),data:e.getHeatmapCellData(n)})})}},rE={theme:{section:"sankey",probe({probeIn:t,axisFont:e,toColor:n,toNumber:r}){const a=t("bb-chart-sankey","path","bb-sankey-link",["stroke-opacity"]),s=t("bb-chart-sankey","text","bb-sankey-label",["fill","font"]);return{linkOpacity:r(a["stroke-opacity"],.4),labelFont:s.font||e,labelColor:n(s.fill,"#000")}},selectors:{".bb-sankey-link":(t,{readNumberValue:e})=>({linkOpacity:e(t,"stroke-opacity")}),".bb-sankey-label":(t,{readColorValue:e,readFontValue:n})=>({labelColor:e(t,"fill"),labelFont:n(t)})},normalize(t,{toNumber:e}){t.linkOpacity=e(t.linkOpacity,.4)}},draw(t){var e;const n=this,{painter:r,theme:{style:{sankey:a,shape:s}}}=t,{config:o}=n,{nodes:l,links:c}=n.getSankeyLayout(),u=o.sankey_rotated,f=(e=o.sankey_link_opacity)!=null?e:a.linkOpacity,d=o.sankey_node_border_width,h=v=>n.isSankeyDefocused(v)?s.targetDefocusedOpacity:1;c.forEach(v=>{const[b,x,E,w]=n.getSankeyLinkPoints(v),[N,k]=n.getSankeyLinkColors(v);let B=N;N!==k&&(B=u?r.context.createLinearGradient(0,b[1],0,w[1]):r.context.createLinearGradient(b[0],0,w[0],0),B.addColorStop(0,N),B.addColorStop(1,k)),r.strokePath(G=>{G.moveTo(b[0],b[1]),G.bezierCurveTo(x[0],x[1],E[0],E[1],w[0],w[1])},{stroke:B,lineWidth:Math.max(1,v.width),alpha:f*h(v)})}),l.forEach(v=>{const b=h(v),x={x:v.x0,y:v.y0,w:Math.max(1,v.x1-v.x0),h:Math.max(1,v.y1-v.y0)};r.fillRect(x,{fill:v.color,alpha:b}),d&&r.strokeRect(x,{stroke:o.sankey_node_border_color,lineWidth:d,alpha:b});const E=n.getSankeyLabel(v);E!=null&&E.text&&r.text(E.text,E.x,E.y,{fill:a.labelColor,alpha:b,font:a.labelFont,textAlign:E.align,textBaseline:E.baseline})})},hits(t){const e=this,{nodes:n,links:r}=e.getSankeyLayout();n.forEach(s=>{t.addBar({x:s.x0,y:s.y0,w:Math.max(1,s.x1-s.x0),h:Math.max(1,s.y1-s.y0),data:e.getSankeyNodeData(s)})});const a=e.config.sankey_rotated;r.slice().reverse().forEach(s=>{const[[o,l],,,[c,u]]=e.getSankeyLinkPoints(s,!0),f=Math.max(1,s.width)/2,d=Math.min(l,u)-f,h={f:o,c:d,df:c-o,dc:Math.max(l,u)+f-d};t.addBar({x:a?h.c:h.f,y:a?h.f:h.c,w:a?h.dc:h.df,h:a?h.df:h.dc,data:e.getSankeyLinkData(s),hit:(v,b)=>e.isSankeyLinkHit(s,v,b)})})}},du="http://www.w3.org/1999/xhtml",bi={svg:"http://www.w3.org/2000/svg",xhtml:du,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),bi.hasOwnProperty(e)?{space:bi[e],local:t}:t}function aE(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===du&&e.documentElement.namespaceURI===du?e.createElement(t):e.createElementNS(n,t)}}function iE(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function hu(t){var e=Vo(t);return(e.local?iE:aE)(e)}function sE(){}function gu(t){return t==null?sE:function(){return this.querySelector(t)}}function oE(t){typeof t!="function"&&(t=gu(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var s=e[a],o=s.length,l=r[a]=new Array(o),c,u,f=0;f<o;++f)(c=s[f])&&(u=t.call(c,c.__data__,f,s))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new Wn(r,this._parents)}function fv(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function lE(){return[]}function dv(t){return t==null?lE:function(){return this.querySelectorAll(t)}}function cE(t){return function(){return fv(t.apply(this,arguments))}}function uE(t){typeof t=="function"?t=cE(t):t=dv(t);for(var e=this._groups,n=e.length,r=[],a=[],s=0;s<n;++s)for(var o=e[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&(r.push(t.call(c,c.__data__,u,o)),a.push(c));return new Wn(r,a)}function hv(t){return function(){return this.matches(t)}}function gv(t){return function(e){return e.matches(t)}}var fE=Array.prototype.find;function dE(t){return function(){return fE.call(this.children,t)}}function hE(){return this.firstElementChild}function gE(t){return this.select(t==null?hE:dE(typeof t=="function"?t:gv(t)))}var vE=Array.prototype.filter;function pE(){return Array.from(this.children)}function mE(t){return function(){return vE.call(this.children,t)}}function yE(t){return this.selectAll(t==null?pE:mE(typeof t=="function"?t:gv(t)))}function xE(t){typeof t!="function"&&(t=hv(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var s=e[a],o=s.length,l=r[a]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new Wn(r,this._parents)}function vv(t){return new Array(t.length)}function bE(){return new Wn(this._enter||this._groups.map(vv),this._parents)}function jo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}jo.prototype={constructor:jo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function TE(t){return function(){return t}}function SE(t,e,n,r,a,s){for(var o=0,l,c=e.length,u=s.length;o<u;++o)(l=e[o])?(l.__data__=s[o],r[o]=l):n[o]=new jo(t,s[o]);for(;o<c;++o)(l=e[o])&&(a[o]=l)}function AE(t,e,n,r,a,s,o){var l,c,u=new Map,f=e.length,d=s.length,h=new Array(f),v;for(l=0;l<f;++l)(c=e[l])&&(h[l]=v=o.call(c,c.__data__,l,e)+"",u.has(v)?a[l]=c:u.set(v,c));for(l=0;l<d;++l)v=o.call(t,s[l],l,s)+"",(c=u.get(v))?(r[l]=c,c.__data__=s[l],u.delete(v)):n[l]=new jo(t,s[l]);for(l=0;l<f;++l)(c=e[l])&&u.get(h[l])===c&&(a[l]=c)}function EE(t){return t.__data__}function CE(t,e){if(!arguments.length)return Array.from(this,EE);var n=e?AE:SE,r=this._parents,a=this._groups;typeof t!="function"&&(t=TE(t));for(var s=a.length,o=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var f=r[u],d=a[u],h=d.length,v=wE(t.call(f,f&&f.__data__,u,r)),b=v.length,x=l[u]=new Array(b),E=o[u]=new Array(b),w=c[u]=new Array(h);n(f,d,x,E,w,v,e);for(var N=0,k=0,B,G;N<b;++N)if(B=x[N]){for(N>=k&&(k=N+1);!(G=E[k])&&++k<b;);B._next=G||null}}return o=new Wn(o,r),o._enter=l,o._exit=c,o}function wE(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function IE(){return new Wn(this._exit||this._groups.map(vv),this._parents)}function RE(t,e,n){var r=this.enter(),a=this,s=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),n==null?s.remove():n(s),r&&a?r.merge(a).order():a}function OE(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,a=n.length,s=r.length,o=Math.min(a,s),l=new Array(a),c=0;c<o;++c)for(var u=n[c],f=r[c],d=u.length,h=l[c]=new Array(d),v,b=0;b<d;++b)(v=u[b]||f[b])&&(h[b]=v);for(;c<a;++c)l[c]=n[c];return new Wn(l,this._parents)}function PE(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],a=r.length-1,s=r[a],o;--a>=0;)(o=r[a])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function ME(t){t||(t=LE);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,a=new Array(r),s=0;s<r;++s){for(var o=n[s],l=o.length,c=a[s]=new Array(l),u,f=0;f<l;++f)(u=o[f])&&(c[f]=u);c.sort(e)}return new Wn(a,this._parents).order()}function LE(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function DE(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function FE(){return Array.from(this)}function NE(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,s=r.length;a<s;++a){var o=r[a];if(o)return o}return null}function $E(){let t=0;for(const e of this)++t;return t}function BE(){return!this.node()}function kE(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a=e[n],s=0,o=a.length,l;s<o;++s)(l=a[s])&&t.call(l,l.__data__,s,a);return this}function zE(t){return function(){this.removeAttribute(t)}}function UE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function WE(t,e){return function(){this.setAttribute(t,e)}}function GE(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function HE(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function XE(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function VE(t,e){var n=Vo(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?UE:zE:typeof e=="function"?n.local?XE:HE:n.local?GE:WE)(n,e))}function pv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function jE(t){return function(){this.style.removeProperty(t)}}function YE(t,e,n){return function(){this.style.setProperty(t,e,n)}}function KE(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ZE(t,e,n){return arguments.length>1?this.each((e==null?jE:typeof e=="function"?KE:YE)(t,e,n==null?"":n)):Ti(this.node(),t)}function Ti(t,e){return t.style.getPropertyValue(e)||pv(t).getComputedStyle(t,null).getPropertyValue(e)}function JE(t){return function(){delete this[t]}}function QE(t,e){return function(){this[t]=e}}function _E(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function qE(t,e){return arguments.length>1?this.each((e==null?JE:typeof e=="function"?_E:QE)(t,e)):this.node()[t]}function mv(t){return t.trim().split(/^|\s+/)}function vu(t){return t.classList||new yv(t)}function yv(t){this._node=t,this._names=mv(t.getAttribute("class")||"")}yv.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function xv(t,e){for(var n=vu(t),r=-1,a=e.length;++r<a;)n.add(e[r])}function bv(t,e){for(var n=vu(t),r=-1,a=e.length;++r<a;)n.remove(e[r])}function t2(t){return function(){xv(this,t)}}function e2(t){return function(){bv(this,t)}}function n2(t,e){return function(){(e.apply(this,arguments)?xv:bv)(this,t)}}function r2(t,e){var n=mv(t+"");if(arguments.length<2){for(var r=vu(this.node()),a=-1,s=n.length;++a<s;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof e=="function"?n2:e?t2:e2)(n,e))}function a2(){this.textContent=""}function i2(t){return function(){this.textContent=t}}function s2(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function o2(t){return arguments.length?this.each(t==null?a2:(typeof t=="function"?s2:i2)(t)):this.node().textContent}function l2(){this.innerHTML=""}function c2(t){return function(){this.innerHTML=t}}function u2(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function f2(t){return arguments.length?this.each(t==null?l2:(typeof t=="function"?u2:c2)(t)):this.node().innerHTML}function d2(){this.nextSibling&&this.parentNode.appendChild(this)}function h2(){return this.each(d2)}function g2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function v2(){return this.each(g2)}function p2(t){var e=typeof t=="function"?t:hu(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function m2(){return null}function y2(t,e){var n=typeof t=="function"?t:hu(t),r=e==null?m2:typeof e=="function"?e:gu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function x2(){var t=this.parentNode;t&&t.removeChild(this)}function b2(){return this.each(x2)}function T2(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function S2(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function A2(t){return this.select(t?S2:T2)}function E2(t){return arguments.length?this.property("__data__",t):this.node().__data__}function C2(t){return function(e){t.call(this,e,this.__data__)}}function w2(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function I2(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,a=e.length,s;n<a;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function R2(t,e,n){return function(){var r=this.__on,a,s=C2(e);if(r){for(var o=0,l=r.length;o<l;++o)if((a=r[o]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=n),a.value=e;return}}this.addEventListener(t.type,s,n),a={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(a):this.__on=[a]}}function O2(t,e,n){var r=w2(t+""),a,s=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(a=0,f=l[c];a<s;++a)if((o=r[a]).type===f.type&&o.name===f.name)return f.value}return}for(l=e?R2:I2,a=0;a<s;++a)this.each(l(r[a],e,n));return this}function Tv(t,e,n){var r=pv(t),a=r.CustomEvent;typeof a=="function"?a=new a(e,n):(a=r.document.createEvent("Event"),n?(a.initEvent(e,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function P2(t,e){return function(){return Tv(this,t,e)}}function M2(t,e){return function(){return Tv(this,t,e.apply(this,arguments))}}function L2(t,e){return this.each((typeof e=="function"?M2:P2)(t,e))}function*D2(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],a=0,s=r.length,o;a<s;++a)(o=r[a])&&(yield o)}var pu=[null];function Wn(t,e){this._groups=t,this._parents=e}function Si(){return new Wn([[document.documentElement]],pu)}function F2(){return this}Wn.prototype=Si.prototype={constructor:Wn,select:oE,selectAll:uE,selectChild:gE,selectChildren:yE,filter:xE,data:CE,enter:bE,exit:IE,join:RE,merge:OE,selection:F2,order:PE,sort:ME,call:DE,nodes:FE,node:NE,size:$E,empty:BE,each:kE,attr:VE,style:ZE,property:qE,classed:r2,text:o2,html:f2,raise:h2,lower:v2,append:p2,insert:y2,remove:b2,clone:A2,datum:E2,on:O2,dispatch:L2,[Symbol.iterator]:D2};function Zt(t){return typeof t=="string"?new Wn([[document.querySelector(t)]],[document.documentElement]):new Wn([[t]],pu)}function NN(t){return Zt(hu(t).call(document.documentElement))}var N2=0;function Sv(){return new mu}function mu(){this._="@"+(++N2).toString(36)}mu.prototype=Sv.prototype={constructor:mu,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Av(t){let e;for(;e=t.sourceEvent;)t=e;return t}function qn(t,e){if(t=Av(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}}return[t.pageX,t.pageY]}function $N(t,e){return t.target&&(t=Av(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>qn(n,e))}function Ev(t){return typeof t=="string"?new Wn([document.querySelectorAll(t)],[document.documentElement]):new Wn([fv(t)],pu)}const lr={canvas:"bb-canvas",overlay:"bb-canvas-overlay",legend:"bb-canvas-legend",legendBottom:"bb-canvas-legend-bottom",legendInset:"bb-canvas-legend-inset",legendItemInteractive:"bb-legend-item-interactive",legendItemTileCircle:"bb-legend-item-tile-circle",legendItemTitle:"bb-legend-item-title",legendRight:"bb-canvas-legend-right"};var BN=lr,$2=Object.defineProperty,B2=(t,e,n)=>e in t?$2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ai=(t,e,n)=>B2(t,typeof e!="symbol"?e+"":e,n);class k2{constructor(){Ai(this,"canvas"),Ai(this,"ctx"),Ai(this,"dpr",1),Ai(this,"frame",null),Ai(this,"frameCtx",null),Ai(this,"frameValid",!1)}init(e,n,r){this.canvas=Tt.createElement("canvas"),this.canvas.className=lr.canvas,this.canvas.style.display="block",e.appendChild(this.canvas),this.dpr=yt.devicePixelRatio||1,this.ctx=this.canvas.getContext("2d"),this.resize(n,r)}resize(e,n){const r=Math.max(0,e),a=Math.max(0,n);this.dpr=yt.devicePixelRatio||1,this.canvas.width=r*this.dpr,this.canvas.height=a*this.dpr,this.canvas.style.width=`${r}px`,this.canvas.style.height=`${a}px`,this.ctx.setTransform(this.dpr,0,0,this.dpr,0,0),this.frame=null,this.frameCtx=null,this.frameValid=!1}clearOverlay(){this.frameValid&&this.restoreFrame()}withOverlay(e){const{ctx:n}=this;this.frameValid?this.clearOverlay():this.captureFrame(),n.save(),n.setTransform(this.dpr,0,0,this.dpr,0,0);try{e(n)}finally{n.restore()}}beginFrame(e,n){const{ctx:r}=this;this.frameValid=!1,r.save(),r.setTransform(this.dpr,0,0,this.dpr,0,0),r.clearRect(0,0,e,n)}endFrame(){this.ctx.restore()}captureFrame(){const{canvas:e}=this;if(this.frameValid=!1,e.width&&e.height){let{frame:n,frameCtx:r}=this;if(!n){const a=Tt.createElement("canvas");n=a,r=a.getContext("2d"),this.frame=n,this.frameCtx=r}if(!n||!r)return;r.setTransform(1,0,0,1,0,0),n.width!==e.width||n.height!==e.height?(n.width=e.width,n.height=e.height):r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0),this.frameValid=!0}}restoreFrame(){if(!this.frameValid||!this.frame||!this.frameCtx)return;const{canvas:e,ctx:n}=this;n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),n.drawImage(this.frame,0,0),n.restore(),n.setTransform(this.dpr,0,0,this.dpr,0,0)}destroy(){var e;(e=this.canvas)==null||e.remove(),this.frame=null,this.frameCtx=null,this.frameValid=!1}}var z2=Object.defineProperty,Cv=Object.getOwnPropertySymbols,U2=Object.prototype.hasOwnProperty,W2=Object.prototype.propertyIsEnumerable,G2=(t,e,n)=>e in t?z2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,H2=(t,e)=>{var n={};for(var r in t)U2.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Cv)for(var r of Cv(t))e.indexOf(r)<0&&W2.call(t,r)&&(n[r]=t[r]);return n},Ei=(t,e,n)=>G2(t,typeof e!="symbol"?e+"":e,n);const Fr="http://www.w3.org/2000/svg";function Pe(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:"");return Number.isFinite(n)?n:e}function Wa(t,e){const n=Pe(t.opacity,1),r=Pe(t["fill-opacity"],1),a=n*r;return Number.isFinite(a)?a:e}function ze(t,e){const n=t==null?void 0:t.trim();return n&&!/^(none|transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i.test(n)?n:e}function Ci(t,e){const n=ze(t,""),r=e?ze(e,""):"";return n&&n!==r?n:void 0}function wi(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:""),r=typeof e=="number"?e:parseFloat(e!=null?e:"");return Number.isFinite(n)&&(!Number.isFinite(r)||n!==r)?n:void 0}function Cs(t){return Array.isArray(t)?t.filter(e=>Number.isFinite(e)&&e>0):(t||"").split(/[,\s]+/).map(e=>parseFloat(e)).filter(e=>Number.isFinite(e)&&e>0)}function X2(t,e){const n=t.getPropertyValue("font").trim();if(n)return n;const r=t.getPropertyValue("font-size").trim(),a=t.getPropertyValue("font-family").trim();if(!r||!a)return e;const s=t.getPropertyValue("font-style").trim(),o=t.getPropertyValue("font-variant").trim(),l=t.getPropertyValue("font-weight").trim(),c=t.getPropertyValue("line-height").trim(),u=c&&c!=="normal"?`${r}/${c}`:r;return[s&&s!=="normal"?s:"",o&&o!=="normal"?o:"",l&&!/^(normal|400)$/.test(l)?l:"",u,a].filter(Boolean).join(" ")}function Nr(t,e){var n;const r=e.replace(/-([a-z])/g,(a,s)=>s.toUpperCase());return(n=t[e])!=null?n:t[r]}function Xe(t,e){const n=Nr(t,e);return(n==null?"":ze(String(n),""))||void 0}function mn(t,e){const n=Nr(t,e),r=typeof n=="number"?n:parseFloat(String(n!=null?n:""));return Number.isFinite(r)?r:void 0}function xa(t){const e=mn(t,"opacity"),n=mn(t,"fill-opacity");return e===void 0&&n===void 0?void 0:(e!=null?e:1)*(n!=null?n:1)}function yu(t){const e=Nr(t,"stroke-dasharray"),n=e==null?[]:Cs(e);return n.length?n:void 0}function Kn(t){var e,n,r,a;const s=Nr(t,"font");if(s!=null&&String(s).trim())return String(s).trim();const o=Nr(t,"font-size"),l=Nr(t,"font-family");if(o==null||l==null)return;const c=String(o).trim(),u=String(l).trim();if(!c||!u)return;const f=String((e=Nr(t,"font-style"))!=null?e:"").trim(),d=String((n=Nr(t,"font-variant"))!=null?n:"").trim(),h=String((r=Nr(t,"font-weight"))!=null?r:"").trim(),v=String((a=Nr(t,"line-height"))!=null?a:"").trim();return[f&&f!=="normal"?f:"",d&&d!=="normal"?d:"",h&&!/^(normal|400)$/.test(h)?h:"",v&&v!=="normal"?`${c}/${v}`:c,u].filter(Boolean).join(" ")}function je(t,e,n){var r;const a=Object.keys(n).reduce((s,o)=>(n[o]!==void 0&&(s[o]=n[o]),s),{});Object.keys(a).length&&(t[e]=dr((r=t[e])!=null?r:{},a))}const V2={readColorValue:Xe,readNumberValue:mn,readFontValue:Kn};function wv(t){return t.split(",").map(e=>e.trim().replace(/\s*>\s*/g," ").replace(/\s+/g," ").replace(/^(?:svg)?\.bb\s+/,"").replace(/(^|\s)(?:g|path|rect|line|text|circle)\./g,"$1.")).filter(Boolean)}function xu(t){return Object.keys(t).filter(e=>t[e]!==void 0)}function Iv(t,e,n){return xu(e).forEach(r=>{n!=null&&n.has(r)||(t[r]=e[r])}),t}function Rv(t){const e=t.split(" ");return e.every((n,r)=>n==="line"||n==="text"?r===e.length-1:/^(\.[A-Za-z_-][\w-]*)+$/.test(n))}function Ov(t){const e=t.split(" "),n=e[e.length-1];return n==="line"||n==="text"?n:null}function j2(t){return(t||"").split(/\s+/).filter(Boolean)}function Y2(t,e){const n=e==="text"?{labelColor:Xe(t,"fill"),labelFont:Kn(t)}:{lineColor:Xe(t,"stroke"),lineWidth:mn(t,"stroke-width"),dashArray:yu(t)};return Iv({},n)}function K2(t){const e=[];return Object.keys(t!=null?t:{}).forEach(n=>{wv(n).forEach(r=>{const a=Ov(r)||"line",s=Y2(t[n],a);Rv(r)&&xu(s).length&&e.push({selector:r,target:a,style:s})})}),e}function Z2(t,e,n,r){if(!Rv(t))return!1;const a=Ov(t);if(a&&a!==r)return!1;if(!a&&r==="text")return!1;const s=j2(n),o=`bb-${e}grid-line`,l=new Set(["bb-grid","bb-grid-lines",`bb-${e}grid-lines`,o,...s]),c=(t.match(/\.[A-Za-z_-][\w-]*/g)||[]).map(u=>u.slice(1));return!!c.length&&c.every(u=>l.has(u))&&(c.includes(o)||s.some(u=>c.includes(u)))}function J2(t,e,n){switch(e){case".bb-axis path.domain":case".bb-axis .domain":case".bb-axis-x path.domain":case".bb-axis-x .domain":case".bb-axis-y path.domain":case".bb-axis-y .domain":case".bb-axis-y2 path.domain":case".bb-axis-y2 .domain":je(t,"axis",{lineColor:Xe(n,"stroke"),lineWidth:mn(n,"stroke-width")});break;case".bb-axis line":case".bb-axis .tick line":case".bb-axis-x line":case".bb-axis-x .tick line":case".bb-axis-y line":case".bb-axis-y .tick line":case".bb-axis-y2 line":case".bb-axis-y2 .tick line":je(t,"axis",{tickColor:Xe(n,"stroke"),tickWidth:mn(n,"stroke-width")});break;case".bb-axis text":case".bb-axis .tick text":{const r=Kn(n);je(t,"axis",{labelColor:Xe(n,"fill"),xTickFont:r,yTickFont:r,y2TickFont:r});break}case".bb-axis-x text":case".bb-axis-x .tick text":je(t,"axis",{labelColor:Xe(n,"fill"),xTickFont:Kn(n)});break;case".bb-axis-y text":case".bb-axis-y .tick text":je(t,"axis",{labelColor:Xe(n,"fill"),yTickFont:Kn(n)});break;case".bb-axis-y2 text":case".bb-axis-y2 .tick text":je(t,"axis",{labelColor:Xe(n,"fill"),y2TickFont:Kn(n)});break;case".tick._active_ text":case".bb-axis .tick._active_ text":case".bb-axis-x .tick._active_ text":je(t,"axis",{activeLabelColor:Xe(n,"fill")});break;case".bb-axis-x-label":case".bb-axis-x .bb-axis-x-label":je(t,"axis",{labelFont:Kn(n),xLabelColor:Xe(n,"fill")});break;case".bb-axis-y-label":case".bb-axis-y .bb-axis-y-label":je(t,"axis",{labelFont:Kn(n),yLabelColor:Xe(n,"fill")});break;case".bb-axis-y2-label":case".bb-axis-y2 .bb-axis-y2-label":je(t,"axis",{labelFont:Kn(n),y2LabelColor:Xe(n,"fill")});break;case".bb-grid line":case".bb-grid .bb-xgrid":case".bb-grid .bb-ygrid":case".bb-xgrid":case".bb-ygrid":je(t,"grid",{lineColor:Xe(n,"stroke"),lineWidth:mn(n,"stroke-width"),dashArray:yu(n)});break;case".bb-grid text":je(t,"grid",{labelColor:Xe(n,"fill"),labelFont:Kn(n)});break;case".bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus":je(t,"focusGrid",{lineColor:Xe(n,"stroke"),lineWidth:mn(n,"stroke-width"),dashArray:yu(n)});break;case".bb-region rect":case".bb-region":je(t,"region",{fill:Xe(n,"fill"),opacity:xa(n)});break;case".bb-region text":je(t,"region",{labelColor:Xe(n,"fill"),labelFont:Kn(n)});break;case".bb-bar":je(t,"shape",{barOpacity:xa(n),barStrokeColor:Xe(n,"stroke"),barLineWidth:mn(n,"stroke-width")});break;case".bb-bar._expanded_":je(t,"shape",{barExpandedOpacity:xa(n)});break;case".bb-candlestick":je(t,"shape",{candlestickStrokeColor:Xe(n,"stroke"),candlestickLineWidth:mn(n,"stroke-width")});break;case".bb-candlestick._expanded_":je(t,"shape",{candlestickExpandedOpacity:xa(n)});break;case".bb-line":je(t,"shape",{barConnectLineColor:Xe(n,"stroke"),barConnectLineWidth:mn(n,"stroke-width"),lineWidth:mn(n,"stroke-width")});break;case".bb-target.bb-focused .bb-line":case".bb-target.bb-focused path.bb-line":je(t,"shape",{lineFocusedWidth:mn(n,"stroke-width")});break;case".bb-target.bb-defocused":je(t,"shape",{targetDefocusedOpacity:mn(n,"opacity")});break;case".bb-area":je(t,"shape",{areaOpacity:xa(n)});break;case".bb-circle":je(t,"shape",{pointFillColor:Xe(n,"fill"),pointStrokeColor:Xe(n,"stroke"),pointLineWidth:mn(n,"stroke-width")});break;case".bb-selected-circle":je(t,"selectedPoint",{fill:Xe(n,"fill"),stroke:Xe(n,"stroke"),lineWidth:mn(n,"stroke-width")});break;case".bb-circle._expanded_":je(t,"focusPoint",{fill:Xe(n,"fill"),stroke:Xe(n,"stroke"),lineWidth:mn(n,"stroke-width")});break;case".bb-zoom-brush":je(t,"zoomBrush",{fill:Xe(n,"fill"),opacity:xa(n)});break;case".bb-brush .extent":case".bb-brush .selection":je(t,"subchartBrush",{fill:Xe(n,"fill"),opacity:xa(n)});break;case".bb-brush .handle--custom":je(t,"subchartBrush",{handleFill:Xe(n,"fill"),handleOpacity:xa(n),handleStroke:Xe(n,"stroke"),handleLineWidth:mn(n,"stroke-width")});break;case".bb-chart-treemaps rect":case".bb-chart-treemaps":je(t,"treemap",{stroke:Xe(n,"stroke"),lineWidth:mn(n,"stroke-width")});break;case".bb-text.bb-empty":case".bb-text .bb-empty":case".bb-empty":je(t,"emptyLabel",{color:Xe(n,"fill"),font:Kn(n)});break;case".bb-text":je(t,"label",{color:Xe(n,"fill"),font:Kn(n)});break;case".bb-title":je(t,"title",{color:Xe(n,"fill"),font:Kn(n)});break}}function Q2(t,e){const n={};return Object.keys(t!=null?t:{}).forEach(r=>{wv(r).forEach(a=>{var s;J2(n,a,t[r]);const o=(s=e==null?void 0:e.selectors)==null?void 0:s[a];o&&je(n,e.section,o(t[r],V2))})}),n}function _2(t,e){if(!t)return{};const n=t,{selectors:r}=n,a=H2(n,["selectors"]);return dr({},Q2(r,e),a)}function Pv(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class q2{constructor(){Ei(this,"style"),Ei(this,"cacheContainer",null),Ei(this,"cacheKey",null),Ei(this,"gridLineSelectorOverrides",[]),Ei(this,"directGridOverrideKeys",new Set),Ei(this,"extension")}load(e,n,r){var a,s,o,l,c,u;const f=Tt.createElementNS(Fr,"svg");r&&(this.extension=r),this.gridLineSelectorOverrides=K2(n==null?void 0:n.selectors),this.directGridOverrideKeys=new Set(Object.keys((a=n==null?void 0:n.grid)!=null?a:{})),f.setAttribute("class","bb"),f.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;overflow:hidden",e.appendChild(f);const d=(xn,Bn)=>{const Hn=yt.getComputedStyle(xn),Jn={};for(const In of Bn)Jn[In]=In==="font"?X2(Hn,""):Hn.getPropertyValue(In).trim();return Jn},h=(xn,Bn,Hn)=>{const Jn=Tt.createElementNS(Fr,xn);Jn.setAttribute("class",Bn),f.appendChild(Jn);const In=d(Jn,Hn);return f.removeChild(Jn),In},v=(xn,Bn,Hn,Jn)=>{const In=Tt.createElementNS(Fr,"g"),fr=Tt.createElementNS(Fr,Bn);In.setAttribute("class",xn),Hn&&fr.setAttribute("class",Hn),In.appendChild(fr),f.appendChild(In);const aa=d(fr,Jn);return f.removeChild(In),aa},b=(xn,Bn,Hn,Jn,In)=>{const fr=Tt.createElementNS(Fr,"g"),aa=Tt.createElementNS(Fr,"g"),js=Tt.createElementNS(Fr,Hn);fr.setAttribute("class",xn),aa.setAttribute("class",Bn),Jn&&js.setAttribute("class",Jn),aa.appendChild(js),fr.appendChild(aa),f.appendChild(fr);const p3=d(js,In);return f.removeChild(fr),p3},x=(xn,Bn,Hn,Jn="")=>{const In=Tt.createElementNS(Fr,"g"),fr=Tt.createElementNS(Fr,"g"),aa=Tt.createElementNS(Fr,Bn);In.setAttribute("class",`bb-axis ${xn}`),fr.setAttribute("class",["tick",Jn].filter(Boolean).join(" ")),aa.textContent=Bn==="text"?"0":"",fr.appendChild(aa),In.appendChild(fr),f.appendChild(In);const js=d(aa,Hn);return f.removeChild(In),js},E="rgb(1, 2, 3)",w=(xn,Bn)=>{const Hn=Tt.createElement("style");Hn.textContent=`
|
|
39
38
|
.bb-shapes-canvas-probe .bb-circle {
|
|
40
|
-
fill: ${
|
|
41
|
-
stroke: ${
|
|
39
|
+
fill: ${E};
|
|
40
|
+
stroke: ${E};
|
|
42
41
|
}
|
|
43
|
-
`,Ye.head.appendChild(Hn);try{return d("bb-shapes bb-shapes-canvas-probe","circle",wn,Xn)}finally{Hn.remove()}},C=d("bb-axis bb-axis-x","path","domain",["stroke","stroke-width"]),w=m("bb-axis-x","line",["stroke","stroke-width"]),$=m("bb-axis-x","text",["fill","font"]),z=m("bb-axis-x","text",["fill"],"_active_"),B=m("bb-axis-y","text",["fill","font"]),W=m("bb-axis-y2","text",["fill","font"]),H=d("bb-axis bb-axis-x","text","bb-axis-x-label",["fill","font"]),Q=d("bb-axis bb-axis-y","text","bb-axis-y-label",["fill","font"]),q=d("bb-axis bb-axis-y2","text","bb-axis-y2-label",["fill","font"]),st=f("circle","",["fill","stroke","stroke-width"]),it=d("bb-grid","line","bb-ygrid",["stroke","stroke-width","stroke-dasharray"]),ot=d("bb-grid","text","",["fill","font"]),ct=h("bb-grid","bb-xgrid-focus","line","bb-xgrid-focus",["stroke","stroke-width","stroke-dasharray"]),gt=f("text","bb-text bb-empty",["fill","font"]),tt=d("bb-region","rect","",["fill","fill-opacity"]),ft=d("bb-region","text","",["fill","font"]),lt=f("path","bb-bar",["opacity","fill-opacity","stroke","stroke-width"]),bt=f("path","bb-bar _expanded_",["opacity","fill-opacity"]),St=f("path","bb-candlestick",["stroke","stroke-width"]),Mt=f("path","bb-candlestick _expanded_",["opacity","fill-opacity"]),Ot=f("path","bb-line",["stroke-width"]),Kt=d("bb-target bb-focused","path","bb-line",["stroke-width"]),ee=f("g","bb-target bb-defocused",["opacity"]),Ae=f("path","bb-area",["opacity","fill-opacity"]),Ee=f("circle","bb-circle",["fill","stroke","stroke-width"]),Te=f("circle","bb-selected-circle",["fill","stroke","stroke-width"]),De=E("bb-circle _expanded_",["fill","stroke","stroke-width"]),me=f("rect","bb-zoom-brush",["fill","fill-opacity","opacity"]),Pe=d("bb-brush","rect","extent",["fill","fill-opacity","opacity"]),Zt=d("bb-brush","rect","selection",["fill","fill-opacity","opacity"]),he=d("bb-brush","path","handle--custom",["fill","fill-opacity","opacity","stroke","stroke-width"]),ge=d("bb-chart-treemaps","rect","",["stroke","stroke-width"]),Wt=f("text","bb-text",["fill","font"]),We=d("","text","bb-title",["fill","font"]),Xe=ke(me.fill,"#000"),pn=Le(me["fill-opacity"]||me.opacity,.1),Cn=ke(Zt.fill,ke(Pe.fill,Xe)),be=(l=(o=(s=(i=oi(Zt["fill-opacity"],1))!=null?i:oi(Zt.opacity,1))!=null?s:oi(Pe["fill-opacity"],1))!=null?o:oi(Pe.opacity,1))!=null?l:pn,un=ke(he.stroke,"transparent"),an={axis:{lineColor:ke(C.stroke,"#000"),lineWidth:Le(C["stroke-width"],1),tickColor:ke(w.stroke,ke(C.stroke,"#000")),tickWidth:Le(w["stroke-width"],Le(C["stroke-width"],1)),labelFont:Q.font||B.font||"10px sans-serif",xTickFont:$.font||B.font||"10px sans-serif",yTickFont:B.font||"10px sans-serif",y2TickFont:W.font||B.font||"10px sans-serif",labelColor:ke(B.fill,"#000"),xLabelColor:ke(H.fill,ke($.fill,"#000")),yLabelColor:ke(Q.fill,ke(B.fill,"#000")),y2LabelColor:ke(q.fill,ke(Q.fill,ke(B.fill,"#000"))),activeLabelColor:si(z.fill,$.fill)||ke(B.fill,"#000")},grid:{lineColor:ke(it.stroke,"#aaa"),lineWidth:Le(it["stroke-width"],1),dashArray:as(it["stroke-dasharray"]),labelFont:ot.font||B.font||"10px sans-serif",labelColor:ke(ot.fill,"#aaa")},focusGrid:{lineColor:ke(ct.stroke,ke(it.stroke,"#aaa")),lineWidth:Le(ct["stroke-width"],Le(it["stroke-width"],1)),dashArray:as(ct["stroke-dasharray"]||it["stroke-dasharray"])},emptyLabel:{font:gt.font||Wt.font||B.font||"20px sans-serif",color:ke(gt.fill,"#808080")},region:{fill:ke(tt.fill,"steelblue"),opacity:Le(tt["fill-opacity"],.1),labelFont:ft.font||B.font||"10px sans-serif",labelColor:ke(ft.fill,"#000")},shape:{barOpacity:Da(lt,1),barExpandedOpacity:Le(Da(bt,Da(lt,1)),Da(lt,1)),barStrokeColor:ke(lt.stroke,"#000"),barLineWidth:Le(lt["stroke-width"],0),barConnectLineColor:ke(Ot.stroke,"#000"),barConnectLineWidth:Le(Ot["stroke-width"],1),candlestickStrokeColor:ke(St.stroke,"#000"),candlestickLineWidth:Le(St["stroke-width"],1),candlestickExpandedOpacity:Le(Da(Mt,1),1),lineWidth:Le(Ot["stroke-width"],1),lineFocusedWidth:Le(Kt["stroke-width"],2),areaOpacity:Da(Ae,.2),targetDefocusedOpacity:Le(ee.opacity,.3),pointFillColor:si(Ee.fill,st.fill),pointStrokeColor:si(Ee.stroke,st.stroke),pointLineWidth:oi(Ee["stroke-width"],st["stroke-width"])},selectedPoint:{fill:ke(Te.fill,"#fff"),stroke:si(Te.stroke),lineWidth:Le(Te["stroke-width"],2)},focusPoint:{fill:si(De.fill,S),stroke:si(De.stroke,S),lineWidth:Le(De["stroke-width"],1)},zoomBrush:{fill:Xe,opacity:pn},subchartBrush:{fill:Cn,opacity:be,handleFill:ke(he.fill,"transparent"),handleOpacity:Da(he,1),handleStroke:un,handleLineWidth:Le(he["stroke-width"],un==="transparent"?0:1)},treemap:{stroke:ke(ge.stroke,"#fff"),lineWidth:Le(ge["stroke-width"],1)},label:{font:Wt.font||B.font||"10px sans-serif",color:ke(Wt.fill,"#000")},title:{font:We.font||Wt.font||B.font||"14px sans-serif",color:ke(We.fill,"#000")}},$r=u1(n),te=Xr(an,$r),ma=n==null?void 0:n.axis,zR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelColor"),UR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelFont");if(te.axis.lineWidth=Le(te.axis.lineWidth,an.axis.lineWidth),te.axis.tickWidth=Le(te.axis.tickWidth,te.axis.lineWidth),UR){const wn=ma,Xn=te.axis.labelFont;wn.xTickFont===void 0&&(te.axis.xTickFont=Xn),wn.yTickFont===void 0&&(te.axis.yTickFont=Xn),wn.y2TickFont===void 0&&(te.axis.y2TickFont=Xn)}if(te.axis.labelFont=te.axis.labelFont||an.axis.labelFont,te.axis.xTickFont=te.axis.xTickFont||te.axis.labelFont,te.axis.yTickFont=te.axis.yTickFont||te.axis.labelFont,te.axis.y2TickFont=te.axis.y2TickFont||te.axis.yTickFont,te.axis.labelColor=ke(te.axis.labelColor,an.axis.labelColor),zR){const wn=te.axis.labelColor;ma.xLabelColor===void 0&&(te.axis.xLabelColor=wn),ma.yLabelColor===void 0&&(te.axis.yLabelColor=wn),ma.y2LabelColor===void 0&&(te.axis.y2LabelColor=wn)}te.axis.xLabelColor=ke(te.axis.xLabelColor,te.axis.labelColor),te.axis.yLabelColor=ke(te.axis.yLabelColor,te.axis.labelColor),te.axis.y2LabelColor=ke(te.axis.y2LabelColor,te.axis.yLabelColor),te.axis.activeLabelColor=ke(te.axis.activeLabelColor,te.axis.labelColor),te.grid.lineWidth=Le(te.grid.lineWidth,an.grid.lineWidth),te.grid.dashArray=as(te.grid.dashArray),te.focusGrid.lineWidth=Le(te.focusGrid.lineWidth,an.focusGrid.lineWidth),te.focusGrid.dashArray=as(te.focusGrid.dashArray),te.region.opacity=Le(te.region.opacity,an.region.opacity),te.shape.barOpacity=Le(te.shape.barOpacity,an.shape.barOpacity),te.shape.barExpandedOpacity=Le(te.shape.barExpandedOpacity,te.shape.barOpacity),te.shape.barLineWidth=Le(te.shape.barLineWidth,an.shape.barLineWidth),te.shape.barConnectLineWidth=Le(te.shape.barConnectLineWidth,an.shape.barConnectLineWidth),te.shape.candlestickLineWidth=Le(te.shape.candlestickLineWidth,an.shape.candlestickLineWidth),te.shape.candlestickStrokeColor=ke(te.shape.candlestickStrokeColor,an.shape.candlestickStrokeColor),te.shape.candlestickExpandedOpacity=Le(te.shape.candlestickExpandedOpacity,an.shape.candlestickExpandedOpacity),te.shape.lineWidth=Le(te.shape.lineWidth,an.shape.lineWidth),te.shape.lineFocusedWidth=Le(te.shape.lineFocusedWidth,an.shape.lineFocusedWidth),te.shape.areaOpacity=Le(te.shape.areaOpacity,an.shape.areaOpacity),te.shape.targetDefocusedOpacity=Le(te.shape.targetDefocusedOpacity,an.shape.targetDefocusedOpacity),te.shape.pointLineWidth=oi(te.shape.pointLineWidth),te.selectedPoint.lineWidth=Le(te.selectedPoint.lineWidth,an.selectedPoint.lineWidth),te.focusPoint.lineWidth=Le(te.focusPoint.lineWidth,an.focusPoint.lineWidth),te.zoomBrush.opacity=Le(te.zoomBrush.opacity,an.zoomBrush.opacity),te.subchartBrush.opacity=Le(te.subchartBrush.opacity,an.subchartBrush.opacity),te.subchartBrush.handleOpacity=Le(te.subchartBrush.handleOpacity,an.subchartBrush.handleOpacity),te.subchartBrush.handleLineWidth=Le(te.subchartBrush.handleLineWidth,an.subchartBrush.handleLineWidth),te.treemap.lineWidth=Le(te.treemap.lineWidth,an.treemap.lineWidth),this.style=te,this.cacheContainer=e,this.cacheKey=hh(e,n),c.remove()}reload(e,n){const r=hh(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}getGridLineStyle(e,n={},r="line"){const i={};for(const s of this.gridLineSelectorOverrides)o1(s.selector,e,n.class,r)&&uh(i,s.style,this.directGridOverrideKeys);return bc(i).length?i:void 0}}var d1=Object.defineProperty,h1=(t,e,n)=>e in t?d1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tr=(t,e,n)=>h1(t,typeof e!="symbol"?e+"":e,n);const Fa=24,vh=64,Sc=[yr,er,Vn];function li(t,e){return Math.floor(t/e)}function gh(t,e,n){var r,i;const s=li(e.x,n),o=li(e.x+((r=e.w)!=null?r:0),n),l=li(e.y,n),c=li(e.y+((i=e.h)!=null?i:0),n);for(let u=s;u<=o;u++)for(let f=l;f<=c;f++){const d=`${u}:${f}`,h=t.get(d);h?h.push(e):t.set(d,[e])}}function ph(t,e,n,r,i=0){const s=li(e,r),o=li(n,r),l=[];for(let c=-i;c<=i;c++)for(let u=-i;u<=i;u++){const f=t.get(`${s+c}:${o+u}`);if(f!=null&&f.length)for(let d=0;d<f.length;d++)l.push(f[d])}return l}function v1(t,e){var n,r,i;const s=t.config.point_sensitivity;if(Number.isFinite(s))return s;(n=t.pointR)==null||n.call(t,e);const o=(i=(r=t.getPointSensitivity)==null?void 0:r.call(t,e))!=null?i:Fa;return Number.isFinite(o)?o:Fa}function g1(t,e){return la(t,e)&&e.values.length>Zf&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class p1{constructor(){Tr(this,"bars",[]),Tr(this,"points",[]),Tr(this,"indices",[]),Tr(this,"barGrid",new Map),Tr(this,"pointGrid",new Map),Tr(this,"plot",{x:0,y:0,w:0,h:0}),Tr(this,"pointCellSize",Fa),Tr(this,"maxPointSensitivity",Fa),Tr(this,"grouped",!1),Tr(this,"pointBased",!1),Tr(this,"indexAxis","x")}rebuild(e,n){var r,i,s;const{current:o,margin:l,width:c,height:u}=e.state,f=e.filterTargetsToShow();this.bars=[],this.points=[],this.indices=[],this.barGrid=new Map,this.pointGrid=new Map,this.maxPointSensitivity=Fa,this.indexAxis=e.config.axis_rotated?"y":"x",this.plot=e.state.hasTreemap?{x:0,y:0,w:o.width,h:o.height}:{x:l.left,y:l.top,w:c,h:u},this.grouped=!!e.config.tooltip_grouped&&!e.state.hasTreemap,this.pointBased=!(e.config.axis_x_forceAsSingle&&this.grouped)&&(!!((r=e.isMultipleX)!=null&&r.call(e))||f.some(C=>la(e,C)||ca(e,C)));const h=this.grouped&&(!this.pointBased||e.config.data_selection_enabled&&e.config.data_selection_grouped)?new Map:null,m=(C,w,$)=>{var z,B;if(!h)return;const W=(B=(z=e.getXCacheKey)==null?void 0:z.call(e,$.x))!=null?B:$.index;Number.isFinite($.index)&&!h.has(W)&&gn(C,w)&&h.set(W,{x:C,y:w,data:$})};if(e.state.hasTreemap){const C=(i=e.getTreemapRoot)==null?void 0:i.call(e,e.data.targets),w=(C==null?void 0:C.children)||[];for(const $ of w){const{data:z}=$;if(!kl(e,z))continue;const{x:B,y:W,w:H,h:Q}=ai(e,$,C,!0);!gn(B,W)||!gn(B+H,W+Q)||this.addBar({x:B,y:W,w:H,h:Q,data:z})}this.indices=[];return}if(n.indices[qt.BAR]||f.some(er.bind(null,e))){const C=er.bind(null,e),w=tr(e,n,qt.BAR,C),$=e.generateGetBarPoints(w,!1);f.filter(C).filter(z=>ei(e,z,Sc)).forEach(z=>{const B=Wr(e,z);for(let W=B.start;W<B.end;W++){const H=z.values[W];if(!An(e,H))continue;const Q=Qi(e,$,H,W);if(!Q)continue;const{rect:q}=Q,st=l.left+q.x,it=l.top+q.y,{w:ot,h:ct}=q;this.addBar({x:st,y:it,w:ot,h:ct,data:H}),m(st+ot/2,it+ct/2,H)}})}if(n.indices[qt.CANDLESTICK]||f.some(Vn.bind(null,e))){const C=Vn.bind(null,e),w=tr(e,n,qt.CANDLESTICK,C),$=(s=e.generateGetCandlestickPoints)==null?void 0:s.call(e,w,!1);$&&f.filter(C).filter(z=>ei(e,z,Sc)).forEach(z=>{var B;const W=Wr(e,z);for(let H=W.start;H<W.end;H++){const Q=z.values[H];if(!((B=e.getCandlestickData)==null?void 0:B.call(e,Q)))continue;const st=_i(e,$,Q,H);if(!st)continue;const{body:it}=st,ot=l.left+it.x,ct=l.top+it.y,{w:gt,h:tt}=it;this.addBar({x:ot,y:ct,w:Math.max(1,gt),h:Math.max(1,tt),data:Q}),m(ot+gt/2,ct+tt/2,Q)}})}const{cx:S,cy:E}=n.pos;S&&E&&f.filter(yr.bind(null,e)).filter(C=>ei(e,C,Sc)).forEach(C=>{const w=Wr(e,C),$=g1(e,C)?Qf(c,u,e.config.point_r):null;for(let z=w.start;z<w.end;z++){const B=C.values[z];if(!An(e,B))continue;const W=l.left+S(B,z),H=l.top+E(B,z),Q=v1(e,B);gn(W,H)&&($&&!_f($,W-l.left,H-l.top)||(this.addPoint({x:W,y:H,sensitivity:Q,data:B}),m(W,H,B)))}}),this.buildPointGrid(),this.indices=h?Array.from(h.values()).sort((C,w)=>C[this.indexAxis]-w[this.indexAxis]):[]}hitBar(e,n){for(const r of ph(this.barGrid,e,n,vh)){const{w:i=0,h:s=0}=r;if(e>=r.x&&e<=r.x+i&&n>=r.y&&n<=r.y+s)return r.data}return null}hitPoint(e,n){var r,i;let s=null,o=Number.POSITIVE_INFINITY;for(const l of ph(this.pointGrid,e,n,this.pointCellSize,1)){const c=l.x-e,u=l.y-n,f=Math.sqrt(c*c+u*u),d=(r=l.sensitivity)!=null?r:Fa;f<=d&&f<o&&(o=f,s=l)}return(i=s==null?void 0:s.data)!=null?i:null}findNearest(e,n){const r=this.hitBar(e,n);if(r)return r;if(!this.pointBased&&this.grouped&&this.isWithinPlot(e,n)){const i=this.findNearestIndexItem(e,n);if(i)return i.data}return this.hitPoint(e,n)}findNearestShape(e,n){var r;return(r=this.hitBar(e,n))!=null?r:this.hitPoint(e,n)}findNearestIndexByCoord(e,n){var r,i;return(i=(r=this.findNearestIndexItem(e,n))==null?void 0:r.data)!=null?i:null}findInRect(e,n=!1){const r=Math.min(e.x,e.x+e.w),i=Math.max(e.x,e.x+e.w),s=Math.min(e.y,e.y+e.h),o=Math.max(e.y,e.y+e.h),l=new Set,c=[],u=f=>{const d=f.data,h=`${d.id}:${d.index}`;l.has(h)||(l.add(h),c.push(d))};if(n){const f=this.indexAxis,d=f==="y"?s:r,h=f==="y"?o:i;return this.indices.filter(m=>m[f]>=d&&m[f]<=h).forEach(u),c}return this.bars.filter(f=>{var d,h;const m=(d=f.w)!=null?d:0,S=(h=f.h)!=null?h:0;return!(i<f.x||f.x+m<r)&&!(o<f.y||f.y+S<s)}).forEach(u),this.points.filter(f=>f.x>=r&&f.x<=i&&f.y>=s&&f.y<=o).forEach(u),c}addBar(e){this.bars.push(e),gh(this.barGrid,e,vh)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:Fa;this.maxPointSensitivity=Math.max(this.maxPointSensitivity,r),this.points.push(e)}buildPointGrid(){this.pointCellSize=Math.max(1,this.maxPointSensitivity),this.pointGrid=new Map;for(const e of this.points)gh(this.pointGrid,e,this.pointCellSize)}isWithinPlot(e,n){const{plot:r}=this;return e>=r.x&&e<=r.x+r.w&&n>=r.y&&n<=r.y+r.h}findNearestIndexItem(e,n){const{indexAxis:r,indices:i}=this,s=r==="y"?n:e;if(!i.length)return null;let o=0,l=i.length-1;for(;o<l;){const f=o+l>>1;i[f][r]<s?o=f+1:l=f}const c=i[o],u=i[o-1];return u&&Math.abs(u[r]-s)<Math.abs(c[r]-s)?u:c}}var m1=Object.defineProperty,mh=Object.getOwnPropertySymbols,x1=Object.prototype.hasOwnProperty,y1=Object.prototype.propertyIsEnumerable,xh=(t,e,n)=>e in t?m1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cn=(t,e)=>{for(var n in e||(e={}))x1.call(e,n)&&xh(t,n,e[n]);if(mh)for(var n of mh(e))y1.call(e,n)&&xh(t,n,e[n]);return t};const ze={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},Ze={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},To={area:"bb-area",areas:"bb-areas"},Rn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},rr={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},Kr={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},$n={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},Ac={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},Na={dragarea:"bb-dragarea",INCLUDED:"_included_"},is={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},ar={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},$e={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},Lr={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},Zr={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},nn={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",xgridFocusContinuous:"bb-xgrid-focus-continuous",ygridFocus:"bb-ygrid-focus"},yn={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},Jr={level:"bb-level",levels:"bb-levels"},yh={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},ss={region:"bb-region",regions:"bb-regions"},on={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},Tn={shape:"bb-shape",shapes:"bb-shapes"},Th={brush:"bb-brush",subchart:"bb-subchart"},En={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},bo={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},bh={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},Ec={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var Re=cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn({},ze),Ze),To),Rn),rr),Kr),$n),Ac),Na),ar),$e),Lr),Zr),nn),is),yn),Jr),yh),ss),on),Tn),Th),En),bo),bh),Ec),T1={boost_useCssRule:!1,boost_useWorker:!1,boost_workerUrl:void 0},b1={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},S1={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},A1={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,resize_live:!1,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},render_mode:"svg",canvas_theme:{},regions:[]},E1={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},C1={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},I1={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},R1={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},w1=Object.defineProperty,O1=(t,e,n)=>e in t?w1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P1=(t,e,n)=>O1(t,typeof e!="symbol"?e+"":e,n);const Sh=class rm{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return Xy(A1,T1,I1,b1,R1,S1,E1,C1,rm.data)}};P1(Sh,"data",{});let $a=Sh;class M1{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null,subY:null,subY2:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class L1{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,isCanvasMode:!1,canvasShape:null,canvasFocusKey:null,canvasSubchartBrushDragging:!1,canvasSubchartBrushMode:null,canvasSubchartBrushStart:null,canvasSubchartBrushOrigin:null,canvasSubchartBrushMoved:!1,canvasFlowFrame:null,canvasFlowFinish:null,canvasFocusMainRedraw:!1,cssRule:{},loading:void 0,domain:void 0,subchartSourceTypes:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,canvasInlineStyle:{minHeight:""},canvasSelection:new Set,canvasSelectionDragStart:null,canvasSelectionDragIncluded:new Set,canvasSelectionDragging:!1,canvasSelectionDragMoved:!1,canvasSelectionDragMoveHandler:null,canvasSelectionDragEndHandler:null,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,resizePreview:!1,resizeRedrawTime:0,resizeLiveScale:null,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:new Set,hiddenLegendIds:new Set,focusedTargetIds:new Set,defocusedTargetIds:new Set,radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[],dirty:{data:!1,visibility:!1,size:!1},redrawGeneration:0,dataGeneration:0,_targetsToShow:null,_cachedDrawShape:null,_canvasVisibleRangeCache:null,_canvasXDataTickCache:null,_canvasXTickValuesCache:null,_eventRectFingerprint:null,_lastTooltipMouse:null,_gridFocusEl:null,generateClassCache:new Map}}}const Ah={element:M1,state:L1};class D1{constructor(){Object.keys(Ah).forEach(e=>{this[e]=new Ah[e]})}getStore(e){return this[e]}}var F1=Object.defineProperty,N1=(t,e,n)=>e in t?F1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$1=(t,e,n)=>N1(t,typeof e!="symbol"?e+"":e,n);const Oe={bubbleBaseLength:"$baseLength",bubbleMaxValue:"$bubbleMaxValue",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",visibleTotalPerIndex:"$visibleTotalPerIndex",domainMinMax:"$domainMinMax",filteredTargets:"$filteredTargets",svgLeft:"$svgLeft",valuesByX:"$valuesByX",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset",maxTickSize:"$maxTickSize",maxDataCountTarget:"$maxDataCountTarget",valuesXIndexMap:"$valuesXIndexMap"};class B1{constructor(){$1(this,"cache",new Map)}add(e,n,r=!1){const i=r?this.cloneTarget(n):n;return this.cache.set(e,i),i}remove(e){const n=je(e)?[e]:e;for(let r=0;r<n.length;r++)this.cache.delete(n[r])}get(e,n=!1){if(n&&Array.isArray(e)){const r=[];for(let i=0,s;s=e[i];i++)this.cache.has(s)&&r.push(this.cache.get(s));return r}else return this.cache.has(e)?this.cache.get(e):null}has(e){return this.cache.has(e)}getKeys(){return Array.from(this.cache.keys())}reset(e,n){e?this.cache.clear():this.cache.forEach((r,i)=>{/^\$/.test(i)&&(n!=null&&n.some(s=>i.startsWith(s))||this.cache.delete(i))})}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const Eh="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function z1(t){const e=t,{config:n}=e;let r="";if(lr(n.data_type||n.data_types)&&!e[dn.LINE])r="line";else for(const i in dn){const s=qt[i];if(e.hasType(s)&&!e[dn[i]]){r=s;break}}r&&Ch(`Please, make sure if %c${Gy(r)}`,"module has been imported and specified correctly.",Eh)}function Iw(t){const e=Fs[t];e&&Ch(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",Eh)}function Ch(t,e,n){var r;const i="[billboard.js]";if((r=se.console)==null?void 0:r.error){const o=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${i} ${t}`,"background:red;color:white;display:block;font-size:15px",...o),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${i} ${t.replace(/\%c([a-z-]+)/i,"'$1' ")} ${e!=null?e:""}`)}function U1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ur(t,e){if(t=U1(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const k1=/\s?(bb-)/g,G1=/\.+/g;function X1(t){return t.replace(k1,".$1").replace(G1,".")}function Ih(t,e,n=!1){const r=s=>s[t?"getBoundingClientRect":"getBBox"](),i=t?"rectClient":"rectBBox";return n?r(e):!(i in e)||e.hasAttribute("width")&&e[i].width!==+(e.getAttribute("width")||0)?e[i]=r(e):e[i]}function ci(t,e,n=[-1,1],r=!1){if(!(!t||!je(e)))if(e.indexOf(`
|
|
44
|
-
`)===-1)t.text(e);else{const
|
|
45
|
-
`),o=r?s.length-1:1;t.html(""),s.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*o:n[1]}em`).text(l)})}}}function Rh(t){const{x:e,y:n,width:r,height:i}=ha(t,!0);return[{x:e,y:n+i},{x:e,y:n},{x:e+r,y:n},{x:e+r,y:n+i}]}function wh(t){const{width:e,height:n}=ln(t),r=Rh(t),i=r[0].x,s=Math.min(r[0].y,r[1].y);return{x:i,y:s,width:e,height:n}}function Jn(t,e){var n;const r=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=ur(r||t,e)}catch(s){}return i.map(s=>isNaN(s)?0:s)}function ln(t,e=!1){return Ih(!0,t,e)}function ha(t,e=!1){return Ih(!1,t,e)}function W1(t,e,n){const{rootSelector:r="",sheet:i}=t,s=`${r} ${X1(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](s,i.cssRules.length)}function V1(t){let e=[];return t.forEach(n=>{var r;try{n.cssRules&&n.cssRules.length&&(e=e.concat(Oa(n.cssRules)))}catch(i){(r=se.console)==null||r.warn(`Error while reading rules from ${n.href}: ${String(i)}`)}}),e}function Oh(t){var e,n,r,i,s,o;return{x:((n=(e=se.pageXOffset)!=null?e:se.scrollX)!=null?n:0)+((r=t.scrollLeft)!=null?r:0),y:((s=(i=se.pageYOffset)!=null?i:se.scrollY)!=null?s:0)+((o=t.scrollTop)!=null?o:0)}}function So(t,e=0,n=0,r=!0){const i=new DOMPoint(e,n),s=t.getScreenCTM(),o=i.matrixTransform(r?s==null?void 0:s.inverse():s);if(r===!1){const l=ln(t);o.x-=l.x,o.y-=l.y}return o}function Cc(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Ic(t,e){var n;const r=(n=t==null?void 0:t.getAttribute)==null?void 0:n.call(t,e);if(r)return parseFloat(r);const i=Cc(t);return e==="x"?i.e:i.f}function Rc(t){const e=t.attr("viewBox");return e?e.trim().split(/[\s,]+/).length===4:!1}function j1(t,e,n=!1){const r=!!t.node;let i=!1;for(const[s,o]of Object.entries(e))if(i=r?t.style(s)===o:t.style[s]===o,n?!i:i)break;return i}function os(){var t,e;return((t=Ye)==null?void 0:t.hidden)===!1||((e=Ye)==null?void 0:e.visibilityState)==="visible"}function H1(t,e){const{DocumentTouch:n,matchMedia:r,navigator:i}=se,s=r==null?void 0:r("(pointer:coarse)").matches;let o=!1;if(e)if(i&&"maxTouchPoints"in i)o=i.maxTouchPoints>0;else if("ontouchmove"in se||n&&Ye instanceof n)o=!0;else if(s)o=!0;else{const c=i.userAgent;o=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!s&&(r==null?void 0:r("(pointer:fine)").matches)&&"mouse"||o&&"touch"||"mouse"}function Ph(t,e){t.pendingRaf!==null?(se.cancelAnimationFrame(t.pendingRaf),t.pendingRaf=se.requestAnimationFrame(()=>{t.pendingRaf=null,e()})):(t.pendingRaf=se.requestAnimationFrame(()=>{t.pendingRaf=null}),e())}const wc={mouse:(()=>{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,r=t())=>{e.dispatchEvent(new MouseEvent(n,r))}}catch(e){return(n,r,i=t())=>{const s=Ye.createEvent("MouseEvent");s.initMouseEvent(r,i.bubbles,i.cancelable,se,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(s)}}})(),touch:(t,e,n)=>{const r=new Touch(Xr({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},{setTimeout:Y1,clearTimeout:K1}=se;function Z1(t,e){const n=[];let r,i=null;const s=function(){s.clear(),e&&i===null&&(i=$f(()=>{i=null,e()})),t===!1?r=Bf(()=>{r=null,n.forEach(o=>o())},{timeout:200}):r=Y1(()=>{r=null,n.forEach(o=>o())},ae(t)?t:200)};return s.clear=()=>{r&&((t===!1?by:K1)(r),r=null)},s.clearLive=()=>{i!==null&&(Ty(i),i=null)},s.add=o=>n.push(o),s.remove=o=>{const l=n.indexOf(o);l!==-1&&n.splice(l,1)},s}function Mh(){let t=[];const e=function(n,r){function i(){var s;let o=0;for(let l=0,c;c=t[l];l++){if(c===!0||(s=c.empty)!=null&&s.call(c)){o++;continue}if(os()===!1){o=t.length;break}try{c.transition()}catch(u){o++}}return o===t.length}Hf(()=>{r==null||r()},i)};return e.add=function(n){qe(n)?t=t.concat(n):t.push(n)},e}const Dr={},Ao=new Set,Ba=new Map,J1=5e3,Lh=3;let Q1=0;function _1(){try{return"var bbWorker=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=[];return e.forEach(function(e,n){let r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function n(e){let t=e[0],n=[];return e.forEach(function(e,r){if(r>0){let i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function r(e,r){let i=[],a,o;if(Array.isArray(e)){let t=function(e,t){if(e[t]!==void 0)return e[t];let n=t.replace(/\\[(\\w+)\\]/g,`.$1`).replace(/^\\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&typeof r==`object`&&e in r?r[e]:void 0)}),r};a=r.x?r.value.concat(r.x):r.value,i.push(a),e.forEach(function(e){let n=a.map(function(n){let r=t(e,n);return r===void 0&&(r=null),r});i.push(n)}),o=n(i)}else Object.keys(e).forEach(function(t){let n=[].concat(e[t]);n.unshift?.(t),i.push(n)}),o=t(i);return o}let i={columns:t,json:r,rows:n},a=self;function o({data:e}){let{args:t,id:n,op:r}=e;try{let e=i[r];if(!e)throw Error(`Unknown worker op: ${r}`);a.postMessage({id:n,result:e(...t)})}catch(e){a.postMessage({id:n,error:e&&(e.message||e.name)||String(e)})}}return typeof window>`u`&&(a.onmessage=o),e.handleMessage=o,e.ops=i,e})({});"}catch(t){return""}}function Oc(){const{Blob:t,Worker:e,URL:n}=se;return e&&t&&(n!=null&&n.createObjectURL)&&(n!=null&&n.revokeObjectURL)?{Blob:t,Worker:e,URL:n}:null}function Dh(){return se.Worker||null}function q1(t){var e,n;return typeof t=="number"?{timeout:t,workerUrl:""}:{timeout:(e=t==null?void 0:t.timeout)!=null?e:J1,workerUrl:(n=t==null?void 0:t.workerUrl)!=null?n:""}}function Fh(t,e=!1){var n,r;const i=Dr[t];e&&Ao.add(t),i&&((n=i.worker)==null||n.terminate(),i.revoke&&((r=Oc())==null||r.URL.revokeObjectURL(i.src)),delete Dr[t]);for(const s of Ba.keys())s.startsWith(`${t}:`)&&Ba.delete(s)}function tb(t,e){if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return!0}}function eb(t){const[e,...n]=t;return Array.isArray(e)?[e.slice(0,Lh).map(r=>Array.isArray(r)?r.slice(0,Lh+1):r),...n]:t}function Nh(t,e,n,r){const i=++Q1;let s=!1,o;const l=new Promise((c,u)=>{const f=(S,E)=>{s||(s=!0,o(),S(E))},d=function(S){var E;((E=S.data)==null?void 0:E.id)===i&&(S.data.error?f(u,new Error(S.data.error)):f(c,S.data.result))},h=function(){f(u,new Error("worker error"))},m=setTimeout(()=>f(u,new Error("worker timeout")),r);o=()=>{clearTimeout(m),t.removeEventListener("message",d),t.removeEventListener("error",h)},t.addEventListener("message",d),t.addEventListener("error",h)});try{t.postMessage({args:n,id:i,op:e})}catch(c){throw s=!0,o(),c}return l}function nb(t,e,n,r,i,s){const o=eb(i),l=Nh(t,n,o,s).then(c=>tb(c,r(...o)),()=>!1).then(c=>(c?Ba.set(e,!0):Ba.delete(e),c));return Ba.set(e,l),l}function rb(t,e=""){const n=!!Dh(),r=e?null:Oc(),i=e?"":_1(),s=e||"blob";if(!n||!e&&(!r||!i)||Ao.has(s))return null;if(!(s in Dr))try{if(e)Dr[s]={revoke:!1,src:e,worker:null};else if(r){const o=new r.Blob([i],{type:"text/javascript"});Dr[s]={revoke:!0,src:r.URL.createObjectURL(o),worker:null}}}catch(o){return null}return{key:s,src:Dr[s].src}}function ab(t,e){const n=Dr[t],r=Dh();if(!n||!r||Ao.has(t))return null;if(!n.worker)try{n.worker=new r(e)}catch(i){return Fh(t,!0),null}return n.worker}function Pc(t=!0,e,n,r,i){const{timeout:s,workerUrl:o}=q1(i),l=function(...u){const f=n(...u);r(f)};let c=l;if(t){const u=rb(e,o),f=u?ab(u.key,u.src):null;if(f&&u){const{key:d}=u;c=function(...h){var m;const S=()=>{Fh(d,!0),c=l,l(...h)};try{const E=`${d}:${e}`,C=(m=Ba.get(E))!=null?m:nb(f,E,e,n,h,s);Nh(f,e,h,s).then(w=>{C===!0?r(w):C.then($=>$?r(w):S())},S)}catch(E){S()}}}}return c}function ib(){const t=Oc();for(const e in Dr){const n=Dr[e];n.worker&&n.worker.terminate(),n.src&&n.revoke&&(t==null||t.URL.revokeObjectURL(n.src)),delete Dr[e]}Ao.clear(),Ba.clear()}const Mc=34,ls=10,Lc=13;function $h(t){const e=t.charCodeAt(0);function n(i,s){const o=[];let l=i.length,c=0,u=0,f=l<=0,d=!1;i.charCodeAt(0)===65279&&c++,i.charCodeAt(l-1)===ls&&--l,i.charCodeAt(l-1)===Lc&&--l;function h(){if(f)return null;if(d)return d=!1,null;const S=c;let E,C;if(i.charCodeAt(S)===Mc){for(;++c<l;)if(i.charCodeAt(c)===Mc){if(i.charCodeAt(c+1)!==Mc)break;c++}return(C=c++)>=l?f=!0:(E=i.charCodeAt(c++))===ls?d=!0:E===Lc&&(d=!0,i.charCodeAt(c)===ls&&++c),i.slice(S+1,C).replace(/""/g,'"')}for(;c<l;){if((E=i.charCodeAt(C=c++))===ls)d=!0;else if(E===Lc)d=!0,i.charCodeAt(c)===ls&&++c;else if(E!==e)continue;return i.slice(S,C)}return f=!0,i.slice(S,l)}let m;for(;(m=h())!==null;){const S=[];for(;m!==null;)S.push(m),m=h();if(s){const E=s(S,u++);E!=null&&o.push(E)}else o.push(S)}return o}function r(i,s){let o=[];return n(i,(l,c)=>{var u;if(c===0)return o=l,null;const f={};for(let d=0;d<o.length;d++)f[o[d]]=(u=l[d])!=null?u:"";return s?s(f,c-1,o):f})}return{parse:r,parseRows:n}}const Bh=$h(","),zh=$h(" "),sb=Bh.parse,ob=Bh.parseRows,lb=zh.parse,cb=zh.parseRows;function Uh(t){const e=[];return t.forEach(function(n,r){const i=n[0];n.forEach(function(s,o){if(o>0){if(typeof e[o-1]=="undefined"&&(e[o-1]={}),typeof s=="undefined")throw new Error(`Source data is missing a component at (${r}, ${o})!`);e[o-1][i]=s}})}),e}function kh(t){const e=t[0],n=[];return t.forEach(function(r,i){if(i>0){const s={};r.forEach(function(o,l){if(typeof o=="undefined")throw new Error(`Source data is missing a component at (${i}, ${l})!`);s[e[l]]=o}),n.push(s)}}),n}function Gh(t,e){const n=[];let r,i;if(Array.isArray(t)){const s=function(o,l){if(o[l]!==void 0)return o[l];const u=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let f=o;return u.some(function(d){return!(f=f&&typeof f=="object"&&d in f?f[d]:void 0)}),f};e.x?r=e.value.concat(e.x):r=e.value,n.push(r),t.forEach(function(o){const l=r.map(function(c){let u=s(o,c);return typeof u=="undefined"&&(u=null),u});n.push(l)}),i=kh(n)}else Object.keys(t).forEach(function(s){var o;const l=[].concat(t[s]);(o=l.unshift)==null||o.call(l,s),n.push(l)}),i=Uh(n);return i}function ub(t,e="csv",n,r,i){const s=new XMLHttpRequest,o={csv:fb,tsv:db,json:Gh};s.open("GET",t),n&&Object.keys(n).forEach(function(l){s.setRequestHeader(l,n[l])}),s.onreadystatechange=function(){if(s.readyState===4)if(s.status===200){const l=s.responseText;l&&i.call(this,o[e](e==="json"?JSON.parse(l):l,r))}else throw new Error(`${t}: Something went wrong loading!`)},s.send()}function Xh(t,e){const n=t.rows(e);let r;return n.length===1?(r=[{}],n[0].forEach(i=>{r[0][i]=null})):r=t.parse(e),r}function fb(t){return Xh({rows:ob,parse:sb},t)}function db(t){return Xh({rows:cb,parse:lb},t)}const hb=5e3;function vb(t){var e,n;const r=t[0];if(qe(r)){let i=0;for(let s=0,o=t.length;s<o;s++)i+=(n=(e=t[s])==null?void 0:e.length)!=null?n:0;return i}return t.length*Object.keys(r!=null?r:{}).length}function Wh(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function gb(t,e,n){const r=this,{config:i}=r;let s;t.forEach(o=>{const l=r.getXKey(o);if(n.customX||n.timeSeries?n.xs.indexOf(l)>=0?s=(n.appendXs&&r.data.xs[o]||[]).concat(e.map((c,u)=>{const f=c[l];return Ge(f)?r.generateTargetX(f,o,u):!1}).filter(c=>c!==!1)):i.data_x?s=this.getOtherTargetXs():vn(i.data_xs)&&(s=r.getXValuesOfXKey(l,r.data.targets)):s=e.map((c,u)=>u),s)r.data.xs[o]=s;else throw new Error(`x is not defined for id = "${o}".`)})}var pb={convertData(t,e){const{config:n}=this,r=o=>!(o!=null&&o.length)||lr(o[0])?!1:n.boost_useWorker==="auto"?vb(o)>=hb:!!n.boost_useWorker,i=n.boost_workerUrl?{workerUrl:n.boost_workerUrl}:void 0;let s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","rows","columns"].forEach(o=>{const l=`data_${o}`;l in t&&(s[o]=t[l])})),s.url&&e)ub(s.url,s.mimeType,s.headers,Wh(s.keys,n),e);else if(s.json)Pc(r(s.json),"json",Gh,e,i)(s.json,Wh(s.keys,n));else if(s.rows)Pc(r(s.rows),"rows",kh,e,i)(s.rows);else if(s.columns)Pc(r(s.columns),"columns",Uh,e,i)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:r,config:i,state:s}=n,o=i.data_type,l=Object.keys(t[0]||{}),{ids:c,xs:u}=l.length?l.reduce((S,E)=>(n.isX.call(n,E)?S.xs.push(E):S.ids.push(E),S),{ids:[],xs:[]}):{ids:[],xs:[]},f={appendXs:e,xs:u,categorized:r==null?void 0:r.isCategorized(),timeSeries:r==null?void 0:r.isTimeSeries(),customX:r==null?void 0:r.isCustomX()};gb.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((S,E)=>[S,E])):null,h=i.data_idConverter.bind(n.api),m=c.map((S,E)=>{const C=h(S),w=n.getXKey(S),$=f.customX&&f.categorized,z=$&&E===0&&(()=>{const H=Yf(i.axis_x_categories);return t.every(Q=>H.has(Q[w]))})(),B=t.__append__,W=w===null&&B?n.api.data.values(S).length:0;return{id:C,id_org:S,values:t.map((H,Q)=>{var q;const st=H[w];let it=H[S],ot;if(it=it!==null&&!isNaN(it)&&!He(it)?+it:qe(it)||He(it)?it:null,($||s.hasRadar)&&E===0&&!mn(st)){!z&&Q===0&&!B&&(i.axis_x_categories=[],d&&d.clear());const ct=String(st);ot=(q=d==null?void 0:d.get(ct))!=null?q:-1,ot===-1&&(ot=i.axis_x_categories.length,i.axis_x_categories.push(st),d==null||d.set(ct,ot))}else ot=n.generateTargetX(st,S,W+Q);return(mn(it)||n.data.xs[S].length<=Q)&&(ot=void 0),{x:ot,value:it,id:C,index:-1}}).filter(H=>sn(H.x))}});if(m.forEach(S=>{var E;i.data_xSort&&(S.values=S.values.sort((C,w)=>{const $=C.x||C.x===0?C.x:1/0,z=w.x||w.x===0?w.x:1/0;return $-z})),S.values.forEach((C,w)=>C.index=w),(E=n.data.xs[S.id])==null||E.sort((C,w)=>C-w)}),s.hasNegativeValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value<0)),s.hasPositiveValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value>0)),o&&n.isValidChartType(o)){const S=n.mapToIds(m).filter(E=>!(E in i.data_types)||!n.isValidChartType(i.data_types[E]));n.setTargetType(S,o)}return m.forEach(S=>n.cache.add(S.id_org,S,!0)),m}};const mb={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};function Vh(t){return qe(t)?t:[t]}var xb={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,i=vn(n.data_xs)&&ky(n.data_xs,t);return r||i},isStackNormalized(){const{config:t}=this;return!!((t.data_stack_normalize===!0||Kn(t.data_stack_normalize))&&t.data_groups.length)},isStackNormalizedPerGroup(){var t;const{config:e}=this;return!!(Kn(e.data_stack_normalize)&&((t=e.data_stack_normalize)!=null&&t.perGroup)&&e.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},hasAxisGroupedData(t){const e=this,{axis:n}=e;return e.data.targets.filter(s=>n.getId(s.id)===t).map(s=>s.id).some(s=>e.isGrouped(s))},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:vn(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,r=e&&vn(e)?n.mapToIds(e):[];let i;return r.forEach(s=>{n.getXKey(s)===t&&(i=n.data.xs[s])}),i},getIndexByX(t,e){const n=this;return e?e.indexOf(je(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&Ge(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs(t){const e=this,{config:n}=e;Object.keys(t).forEach(r=>{n.data_xs[r]=t[r]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(vn(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let r;return t&&(r=n.data_names[t.id],t.name=r!==void 0?r:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let r=n.filterTargetsToShow(n.data.targets).map(i=>n.addName(n.getValueOnIndex(i.values,t)));return e&&(r=r.filter(i=>i&&"value"in i&&Ge(i.value))),r},getValueOnIndex(t,e){var n;if(((n=t[e])==null?void 0:n.index)===e)return t[e];const r=t.filter(i=>i.index===e);return r.length?r[0]:null},updateTargetX(t,e){const n=this;t.forEach(r=>{r.values.forEach((i,s)=>{i.x=n.generateTargetX(e[s],r.id,s)}),n.data.xs[r.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(r=>{e[r.id]&&n.updateTargetX([r],e[r.id])})},generateTargetX(t,e,n){const r=this,{axis:i}=r;let s=i!=null&&i.isCategorized()?n:t||n;if(i!=null&&i.isTimeSeries()){const o=Wn.bind(r);s=o(t||r.getXValue(e,n))}else i!=null&&i.isCustomX()&&!(i!=null&&i.isCategorized())&&(s=Ge(t)?+t:r.getXValue(e,n));return s},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return sn(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return sn(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:r}=t;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n=1/0,r=-1/0;const i=t||this.data.targets.map(s=>s.values);for(let s=0;s<i.length;s++){const o=i[s];for(let l=0;l<o.length;l++){const c=e(o[l]);ae(c)&&(c<n&&(n=c),c>r&&(r=c))}}return{min:n,max:r}},getMinMaxData(){const t=this,e=Oe.dataMinMax;let n=t.cache.get(e);if(!n){const r=t.data.targets.map(u=>u.values),i=t.getMinMaxValue(r),s=[],o=[],{min:l,max:c}=i;r.forEach(u=>{const f=t.getFilteredDataByValue(u,l),d=t.getFilteredDataByValue(u,c);if(f.length)for(let h=0;h<f.length;h++)s.push(f[h]);if(d.length)for(let h=0;h<d.length;h++)o.push(d[h])}),t.cache.add(e,n={min:s,max:o})}return n},getTotalPerIndex(t){const e=this,{config:n}=e,r=t?`${Oe.dataTotalPerIndex}-${t}`:Oe.dataTotalPerIndex,i=e.cache.get(r);let s=(i==null?void 0:i.generation)===e.state.dataGeneration?i.value:null;if((e.config.data_groups.length||e.isStackNormalized())&&!s){s=[];let{targets:o}=e.data;if(e.isStackNormalizedPerGroup()&&t){const l=n.data_groups.find(c=>c.indexOf(t)>=0);if(l)o=o.filter(c=>l.indexOf(c.id)>=0);else return null}o.forEach(l=>{l.values.forEach((c,u)=>{s[u]||(s[u]=0),s[u]+=ae(c.value)?c.value:0})}),e.cache.add(r,{generation:e.state.dataGeneration,value:s})}return s},getVisibleTotalPerIndex(t){const e=this,{api:n,config:r,state:i,cache:s}=e;let o=s.get(Oe.visibleTotalPerIndex);if((!o||o.generation!==i.dataGeneration)&&(o=s.add(Oe.visibleTotalPerIndex,{generation:i.dataGeneration,values:new Map})),o.values.has(t))return o.values.get(t);const l=n.data.values.bind(n),{hiddenTargetIds:c}=i;let u=e.getTotalPerIndex(t);if(u===null)return o.values.set(t,u),u;if(c.size){let f=[...c];if(t){const d=r.data_groups.find(h=>h.indexOf(t)>=0);d&&(f=f.filter(h=>d.indexOf(h)>=0))}if(f.length){let d=l(f,!1);d.length&&(d=d.reduce((h,m)=>h.map((S,E)=>(ae(S)?S:0)+m[E])),u=u.map((h,m)=>h-d[m]))}}return o.values.set(t,u),u},getTotalDataSum(t){const e=this,n=Oe.dataTotalSum;let r=e.cache.get(n);return ae(r)||(r=e.data.targets.reduce((i,s)=>i+s.values.reduce((o,l)=>{var c;return o+((c=l.value)!=null?c:0)},0),0),e.cache.add(n,r)),t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let r=0;return n.size&&(r=e.data.values.bind(e)([...n]).reduce((i,s)=>i+s,0)),r},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){const{targets:t}=this.data;let e=0;for(let n=0;n<t.length;n++)t[n].values.length>e&&(e=t[n].values.length);return e},getMaxDataCountTarget(){const t=this,{cache:e,state:n}=t,r=e.get(Oe.maxDataCountTarget);if(r&&r.generation===n.dataGeneration)return r.value;let i=t.filterTargetsToShow()||[];const s=i.length,o=t.config.axis_x_inverted;if(s>1){const l=[];for(let c=0;c<i.length;c++){const u=i[c].values;for(let f=0;f<u.length;f++)l.push(u[f].x)}i=l,i=ti(zl(i)).map((c,u,f)=>({x:c,index:o?f.length-u-1:u}))}else s&&(i=i[0].values.concat());return e.add(Oe.maxDataCountTarget,{value:i,generation:n.dataGeneration}),i},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?qe(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let r=0,i;i=n[r];r++)if(i===e)return!0;return!1},isTargetToShow(t){return!this.state.hiddenTargetIds.has(t)},isLegendToShow(t){return!this.state.hiddenLegendIds.has(t)},getTargetsToShow(){var t;const{state:e}=this;return(t=e._targetsToShow)!=null?t:this.filterTargetsToShow()},filterTargetsToShow(t){const e=this;if(!t){const{cache:n,data:r,state:i}=e,s=Oe.filteredTargets,o=n.get(s);if(o&&o.generation===i.dataGeneration)return o.value;const l=r.targets.filter(c=>e.isTargetToShow(c.id));return n.add(s,{value:l,generation:i.dataGeneration}),l}return t.filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let r=[];return t!=null&&t.length&&(r=zl(Wy(t.map(i=>i.values.map(s=>+s.x)))),r=n!=null&&n.isTimeSeries()?r.map(i=>new Date(+i)):r.map(Number)),ti(r)},addTargetIds(t,e){const{state:n}=this;Vh(e).forEach(r=>n[t].add(r))},removeTargetIds(t,e){const{state:n}=this;Vh(e).forEach(r=>n[t].delete(r))},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t),this.cache.remove(Oe.visibleTotalPerIndex)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t),this.cache.remove(Oe.visibleTotalPerIndex)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,r={},i=e.isMultipleX();let s=null;if(i){const o=e.cache.get(Oe.valuesXIndexMap);if(o&&o.generation===e.state.dataGeneration)s=o.value;else{const l=e.mapTargetsToUniqueXs(e.data.targets).map(c=>je(c)?c:+c);s=new Map(l.map((c,u)=>[c,u])),e.cache.add(Oe.valuesXIndexMap,{value:s,generation:e.state.dataGeneration})}}return t.forEach(o=>{const l=[];o.values.filter(({value:c})=>Ge(c)||c===null).forEach(c=>{let{value:u}=c;if(u!==null&&e.isCandlestickType(c)&&(u=qe(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),qe(u))l.push(...u);else if(He(u)&&"high"in u)l.push(...Object.values(u));else if(e.isBubbleZType(c))l.push(n&&e.getBubbleZData(u,"y"));else if(i&&s){const f=je(c.x)?c.x:+c.x,d=s.get(f);d!==void 0&&(l[d]=u)}else l.push(u)}),r[o.id]=l}),r},hasMultiTargets(){return this.filterTargetsToShow().length>1},orderTargets(t){const e=this,n=t.slice(),r=e.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,r=n.data_order,i=/asc/i.test(r),s=/desc/i.test(r);let o;if(i||s){const l=(u,f)=>u+Math.abs(f.value),c=u=>ae(u)?u:"values"in u?u.values.reduce(l,0):u.value;o=(u,f)=>{const d=c(u),h=c(f);return t?i?d-h:h-d:i?h-d:d-h}}else ie(r)&&(o=r.bind(e.api));return o||null},filterByX(t,e){return this.getValuesByX(t).get(this.getXCacheKey(e))||[]},filterNullish(t){const e=n=>Ge(n.value);return t&&t.filter(n=>"value"in n?e(n):n.values.some(e))},filterRemoveNull(t){return t.filter(e=>Ge(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(r=>e[0]<=r.x&&r.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return Ra(t)&&t||Kn(t)&&vn(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:r,state:{hasRadar:i,inputType:s,eventReceiver:{coords:o,rect:l}}}=e;let c;if(i){let u=t.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);const f=Yt(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=Oh(n.chart.node()),d=s==="touch"&&t.changedTouches?t.changedTouches[0]:t;let h=u?d.clientY+f.y:d.clientX+f.x;if(Rc(n.svg)){const m=[h,0];u&&m.reverse(),h=So(n.eventRect.node(),...m)[u?"y":"x"]}else h-=u?l.top:l.left;c=Ul(o,h,0,o.length-1,u)}return c},getDataLabelLength(t,e,n){var r,i,s;const o=this,l=1.3,c=[t,e].map(u=>o.dataLabelFormat()(u));if(o.config.render_mode==="canvas"&&!o.$el.svg){const u=(i=(r=o.$el.chart)==null?void 0:r.node)==null?void 0:i.call(r),f=u==null?void 0:u.ownerDocument,d=f==null?void 0:f.createElementNS("http://www.w3.org/2000/svg","svg");if(u&&d){const h=c.map(S=>{const E=f.createElementNS("http://www.w3.org/2000/svg","text");return E.textContent=S,d.appendChild(E),E});d.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",u.appendChild(d);const m=h.map(S=>S.getBoundingClientRect()[n]*l);return d.remove(),m}}return((s=o.getTextRect(c))==null?void 0:s.map(u=>u[n]*l))||[0,0]},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,r=[];let i;for(i=e-1;i>=0&&n===t[i].x;i--)r.push(t[i]);for(i=e;i<t.length&&n===t[i].x;i++)r.push(t[i]);return r},getXCacheKey(t){return je(t)?t:+t},getValuesByX(t){const e=this,{cache:n,state:r}=e,i=t.map(l=>{const{values:c}=l,u=c[0],f=c[c.length-1];return`${l.id}:${c.length}:${u?e.getXCacheKey(u.x):""}:${f?e.getXCacheKey(f.x):""}`}).join("|"),s=n.get(Oe.valuesByX);if(s&&s.generation===r.dataGeneration&&s.targetKey===i)return s.value;const o=new Map;for(let l=0;l<t.length;l++){const c=t[l].values;for(let u=0;u<c.length;u++){const f=c[u],d=e.getXCacheKey(f.x),h=o.get(d);h?h.push(f):o.set(d,[f])}}return n.add(Oe.valuesByX,{generation:r.dataGeneration,targetKey:i,value:o}),o},getClosestCandidates(t,e,n=!0){const r=this,{config:i,scale:s}=r,o=t.length,l=t[0];if(!n||o<200||!l||!i.data_xSort)return t;const c=r.isBarType(l.id),u=r.isCandlestickType(l.id),f=i.point_sensitivity;if(!(c||u)&&!ae(f))return t;const d=s.zoom||s.x,h=e[+i.axis_rotated],m=d(t[0].x)<=d(t[o-1].x);let S=0,E=o-1;for(;S<E;){const B=S+E>>1,W=d(t[B].x);(m?W<h:W>h)?S=B+1:E=B}const C=[],w=new Set,$=B=>{B>=0&&B<o&&!w.has(B)&&(w.add(B),C.push(t[B]))},z=B=>{if(B<0||B>=o)return;const W=r.getXCacheKey(t[B].x);let H=B;for(;H>=0&&r.getXCacheKey(t[H].x)===W;)$(H--);for(H=B+1;H<o&&r.getXCacheKey(t[H].x)===W;)$(H++)};if(c||u)for(let B=S-2;B<=S+2;B++)z(B);else{const B=f,W=(H,Q)=>{for(let q=H;q>=0&&q<o;q+=Q){const st=t[q];if(Math.abs(d(st.x)-h)>B)break;$(q)}};W(S,1),W(S-1,-1)}return C},findClosestFromTargets(t,e){const n=this,r=[];for(let i=0;i<t.length;i++){const s=n.findClosest(t[i].values,e);s&&r.push(s)}return n.findClosest(r,e,!1)},findClosest(t,e,n=!0){const r=this,{$el:{main:i}}=r,s=r.getClosestCandidates(t,e,n);let o,l;for(let c=0;c<s.length;c++){const u=s[c];if(!u||!Ge(u.value))continue;const f=r.isBarType(u.id),d=r.isCandlestickType(u.id);if(f||d){const h=f?`.${rr.chartBar}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${rr.bar}-${u.index}`:`.${Kr.chartCandlestick}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${Kr.candlestick}-${u.index} path`;!l&&r.isWithinBar(i.select(h).node())&&(l=u)}else{const h=r.dist(u,e),m=r.getPointSensitivity(u);h<m&&(o===void 0||h<o)&&(o=h,l=u)}}return l},dist(t,e){const n=this,{config:{axis_rotated:r},scale:i}=n,s=+r,o=+!r,l=n.circleY(t,t.index),u=(i.zoom||i.x)(t.x)-e[s],f=l-e[o];return Math.sqrt(u*u+f*f)},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,s=n?n.isCategorized():!1,o=qe(t)?t.concat():[t];if(!(s||/step\-(after|before)/.test(i)))return t;if(o.length){const l=o[0],c=o[o.length-1],{id:u}=l;let{x:f}=l;o.unshift({x:--f,value:l.value,id:u}),s&&i==="step-after"&&o.unshift({x:f-1,value:l.value,id:u}),f=c.x,o.push({x:++f,value:c.value,id:u}),s&&i==="step-before"&&o.push({x:f+1,value:c.value,id:u})}return o},convertValuesToRange(t){const e=qe(t)?t.concat():[t],n=[];return e.forEach(r=>{const{x:i,id:s}=r;n.push({x:i,id:s,value:r.value[0]}),n.push({x:i,id:s,value:r.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:r}=n,i=r[`data_${t}`];return mn(e)||(Object.keys(e).forEach(s=>{i[s]=e[s]}),n.redraw({withLegend:!0})),i},getRangedData(t,e="",n="areaRange"){var r,i;const s=t==null?void 0:t.value;if(qe(s)){if(n==="bar")return s.reduce((o,l)=>l-o);{const o=(i=(r=mb[n])==null?void 0:r[e])!=null?i:-1;return o>=0?s[o]:void 0}}else if(s&&e)return s[e];return s},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(r=>e.isGrouped(r.id))){const r=i=>e.getRatio("index",i,!0);t.forEach(i=>{"values"in i?i.values.forEach(r):r(i)})}},getRatio(t,e,n=!1){const r=this,{config:i,state:s}=r,o=r.api;let l=0;if(e&&o.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(r.pie.padAngle()())l=e.value/r.getTotalDataSum(!0);else{const c=i.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,u=r.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/u}else if(t==="index"){const c=r.getVisibleTotalPerIndex(r.isStackNormalizedPerGroup()?e.id:void 0);if(c===null)return l;const u=c[e.index];e.ratio=ae(e.value)&&c&&u?e.value/u:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/s.current.dataMax*i.radar_size_ratio;else if(t==="bar"){const u=r.getYScaleById.bind(r)(e.id).domain().reduce((f,d)=>d-f);l=u===0?0:Math.abs(r.getRangedData(e,null,t)/u)}else t==="treemap"&&(l/=r.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((r,i,s)=>(r[Number(i.x)]=s,r),{});e.data.targets.forEach(r=>{r.values.forEach((i,s)=>{let o=n[Number(i.x)];o===void 0&&(o=s),i.index=o})})},isBubbleZType(t){return this.isBubbleType(t)&&(He(t.value)&&("z"in t.value||"y"in t.value)||qe(t.value)&&t.value.length>=2)},isBarRangeType(t){var e;const n=this,{value:r}=t;return n.isBarType(t)&&!((e=n.isSubchartSourceTypeOf)!=null&&e.call(n,t,qt.CANDLESTICK))&&qe(r)&&r.length>=2&&r.every(ae)},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function Eo(t,e=!1){const n=this,{api:r}=n;e&&n.api.flush(!0),t==null||t.call(r)}var yb={load(t,e){const n=this,{axis:r,data:i,org:s,scale:o}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let u=t;if(u){e.filter&&(u=u.filter(e.filter)),(e.type||e.types)&&u.forEach(d=>{var h;const m=((h=e.types)==null?void 0:h[d.id])||e.type;n.setTargetType(d.id,m)});const f=new Map(u.map(d=>[d.id,d]));i.targets.forEach(d=>{const h=f.get(d.id);if(h){if(l){const m=h.values;for(let S=0;S<m.length;S++)d.values.push(m[S])}else d.values=h.values;f.delete(d.id)}}),f.forEach(d=>i.targets.push(d))}if(n.state.isCanvasMode){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),Eo.call(n,e.done,e.resizeAfter);return}n.updateTargets(i.targets),o.zoom&&(c.x=r.isCategorized()?o.x.orgScale():(s.xScale||o.x).copy(),c.domain=n.getXDomain(i.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(o.x.domain(c.domain),o.zoom=null,n.$el.eventRect.property("__zoom",null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.zoom?(s.xDomain=c.domain,s.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),s.xDomain=n.getZoomDomainValue(s.xDomain),s.xScale=c.x.domain(s.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):s.xScale&&s.xScale.domain(s.xDomain),n.updateTypesElements(),Eo.call(n,e.done,e.resizeAfter)},loadFromArgs(t){const e=this;e.config&&(e.cache.reset(!1,[Oe.filteredTargets,Oe.maxDataCountTarget,Oe.valuesXIndexMap,Oe.maxTickSize]),e.convertData(t,n=>{const r=t.data||n;t.append&&(r.__append__=!0),r&&e.load(e.convertDataToTargets.call(e,r),t)}))},unload(t,e){var n;const r=this,{state:i,$el:s,$T:o}=r,l=!!((n=r.hasLegendDefsPoint)!=null&&n.call(r));let c=e,u=t;if(r.cache.reset(!1,[Oe.filteredTargets,Oe.maxDataCountTarget,Oe.valuesXIndexMap,Oe.maxTickSize]),c||(c=()=>{}),u=u.filter(h=>r.hasTarget(r.data.targets,h)),u.length===0){c();return}const f=new Set(u);if(i.isCanvasMode){u.forEach(h=>{i.withoutFadeIn[h]=!1}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),r.removeHiddenTargetIds(u),r.removeHiddenLegendIds(u),r.updateTypesElements(),c();return}u.forEach(h=>{var m;const S=r.getTargetSelectorSuffix(h);i.withoutFadeIn[h]=!1,s.legend&&s.legend.selectAll(`.${$e.legendItem}${S}`).remove(),l&&((m=s.defs)==null||m.select(`#${r.getDefsPointId(S)}`).remove())}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),i.hasFunnel&&r.updateFunnel(r.data.targets),i.hasTreemap&&r.updateTargetsForTreemap(r.data.targets),r.updateTypesElements();const d=s.svg.selectAll(u.map(h=>r.selectorTarget(h)));o(d).style("opacity","0").remove().call(eo,c)}},Tb={value:()=>{}};function jh(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Co(n)}function Co(t){this._=t}function bb(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Co.prototype=jh.prototype={constructor:Co,on:function(t,e){var n=this._,r=bb(t+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(t=r[s]).type)&&(i=Sb(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(i=(t=r[s]).type)n[i]=Hh(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Hh(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Co(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function Sb(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Hh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Tb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Io=jh;const Ab={passive:!1},cs={capture:!0,passive:!1};function Dc(t){t.stopImmediatePropagation()}function ui(t){t.preventDefault(),t.stopImmediatePropagation()}function Fc(t){var e=t.document.documentElement,n=Yt(t).on("dragstart.drag",ui,cs);"onselectstart"in e?n.on("selectstart.drag",ui,cs):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Nc(t,e){var n=t.document.documentElement,r=Yt(t).on("dragstart.drag",null);e&&(r.on("click.drag",ui,cs),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 Ro=(t=>()=>t);function $c(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:s,x:o,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}$c.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Eb(t){return!t.ctrlKey&&!t.button}function Cb(){return this.parentNode}function Ib(t,e){return e==null?{x:t.x,y:t.y}:e}function Rb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yh(){var t=Eb,e=Cb,n=Ib,r=Rb,i={},s=Io("start","drag","end"),o=0,l,c,u,f,d=0;function h(B){B.on("mousedown.drag",m).filter(r).on("touchstart.drag",C).on("touchmove.drag",w,Ab).on("touchend.drag touchcancel.drag",$).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(B,W){if(!(f||!t.call(this,B,W))){var H=z(this,e.call(this,B,W),B,W,"mouse");H&&(Yt(B.view).on("mousemove.drag",S,cs).on("mouseup.drag",E,cs),Fc(B.view),Dc(B),u=!1,l=B.clientX,c=B.clientY,H("start",B))}}function S(B){if(ui(B),!u){var W=B.clientX-l,H=B.clientY-c;u=W*W+H*H>d}i.mouse("drag",B)}function E(B){Yt(B.view).on("mousemove.drag mouseup.drag",null),Nc(B.view,u),ui(B),i.mouse("end",B)}function C(B,W){if(t.call(this,B,W)){var H=B.changedTouches,Q=e.call(this,B,W),q=H.length,st,it;for(st=0;st<q;++st)(it=z(this,Q,B,W,H[st].identifier,H[st]))&&(Dc(B),it("start",B,H[st]))}}function w(B){var W=B.changedTouches,H=W.length,Q,q;for(Q=0;Q<H;++Q)(q=i[W[Q].identifier])&&(ui(B),q("drag",B,W[Q]))}function $(B){var W=B.changedTouches,H=W.length,Q,q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),Q=0;Q<H;++Q)(q=i[W[Q].identifier])&&(Dc(B),q("end",B,W[Q]))}function z(B,W,H,Q,q,st){var it=s.copy(),ot=ur(st||H,W),ct,gt,tt;if((tt=n.call(B,new $c("beforestart",{sourceEvent:H,target:h,identifier:q,active:o,x:ot[0],y:ot[1],dx:0,dy:0,dispatch:it}),Q))!=null)return ct=tt.x-ot[0]||0,gt=tt.y-ot[1]||0,function ft(lt,bt,St){var Mt=ot,Ot;switch(lt){case"start":i[q]=ft,Ot=o++;break;case"end":delete i[q],--o;case"drag":ot=ur(St||bt,W),Ot=o;break}it.call(lt,B,new $c(lt,{sourceEvent:bt,subject:tt,target:h,identifier:q,active:Ot,x:ot[0]+ct,y:ot[1]+gt,dx:ot[0]-Mt[0],dy:ot[1]-Mt[1],dispatch:it}),Q)}}return h.filter=function(B){return arguments.length?(t=typeof B=="function"?B:Ro(!!B),h):t},h.container=function(B){return arguments.length?(e=typeof B=="function"?B:Ro(B),h):e},h.subject=function(B){return arguments.length?(n=typeof B=="function"?B:Ro(B),h):n},h.touchable=function(B){return arguments.length?(r=typeof B=="function"?B:Ro(!!B),h):r},h.on=function(){var B=s.on.apply(s,arguments);return B===s?h:B},h.clickDistance=function(B){return arguments.length?(d=(B=+B)*B,h):Math.sqrt(d)},h}var wb={setExpand(t,e,n){const r=this,{config:i,$el:{circle:s}}=r;s&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes(t=!0,e,n,r){const i=this;["bar","candlestick"].filter(s=>i.$el[s]).forEach(s=>{r&&i.$el[s].classed(ze.EXPANDED,!1),i.getShapeByIndex(s,e,n).classed(ze.EXPANDED,t)})},setOverOut(t,e){const n=this,{config:r,state:{hasFunnel:i,hasRadar:s,hasTreemap:o},$el:{main:l}}=n,c=He(e);if(c||e!==-1){const u=r[t?"data_onover":"data_onout"].bind(n.api);if(r.color_onover&&n.setOverColor(t,e,c),c){const f=n.getTargetSelectorSuffix(e.id),d=i||o?`${ze.target+f} .${Tn.shape}`:Ze.arc+f;u(e,l.select(`.${d}`).node())}else if(r.tooltip_grouped)t&&(s&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&l.selectAll(`.${Tn.shape}-${e}`).each(function(f){u(f,this)});else{const f=n.cache.get(Oe.setOverOut)||[],d=l.selectAll(`.${Tn.shape}-${e}`).filter(function(m){return n.isWithinShape(this,m)}),h=d.filter(function(){return f.every(m=>m!==this)});if(!t||d.empty()||f.length===h.size()&&h.nodes().every((m,S)=>m!==f[S]))for(;f.length;){const m=f.pop();r.data_onout.bind(n.api)(Yt(m).datum(),m)}h.each(function(){t&&(u(Yt(this).datum(),this),f.push(this))}),n.cache.add(Oe.setOverOut,f)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(Oe.callOverOutForTouch);(He(t)&&n?t.id!==n.id:t!==n)&&((n||ae(n))&&e.setOverOut(!1,n),(t||ae(t))&&e.setOverOut(!0,t),e.cache.add(Oe.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Yh().on("drag",function(r){n.event=r,t.drag(Jn(r,this))}).on("start",function(r){n.event=r,t.dragstart(Jn(r,this))}).on("end",r=>{n.event=r,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var r,i,s;const o=this,{config:l,state:{eventReceiver:c,hasAxis:u,hasFunnel:f,hasRadar:d,hasTreemap:h},$el:{eventRect:m,funnel:S,radar:E,svg:C,treemap:w}}=o;let $=(s=(i=(f||h)&&c.rect||d&&E.axes.select(`.${Rn.axis}-${e} text`)||m||((r=o.getArcElementByIdOrIndex)==null?void 0:r.call(o,e)))==null?void 0:i.node)==null?void 0:s.call(i);if($){const z=o.isMultipleX(),B=l.axis_rotated;let{width:W,left:H,top:Q}=ln($);if(u&&!d&&!z){const ot=c.coords[e];ot?(W=ot.w,H+=ot.x,Q+=ot.y):(W=0,H=0,Q=0)}let q=H+(n?n[0]:0)+(z||B?0:W/2),st=Q+(n?n[1]:0)+(B?4:0);if(Rc(C)&&o.$el.eventRect){const ot=So(o.$el.eventRect.node(),q,st,!1);q=ot.x,st=ot.y}const it={screenX:q,screenY:st,clientX:q,clientY:st,bubbles:d};(f||h)&&($=(S!=null?S:w).node()),wc[/^(mouse|click)/.test(t)?"mouse":"touch"]($,t,it)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{canvas:e,eventRect:n,svg:r,zoomResetBtn:i}}=t;n==null||n.on(".zoom wheel.zoom .drag",null),e==null||e.on(".zoom wheel.zoom .drag",null),r==null||r.on("wheel",null),i==null||i.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:r,legend:i,region:s,svg:o,treemap:l},brush:c}=e,u=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[o,r,s==null?void 0:s.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),i==null?void 0:i.selectAll("g"),l].forEach(f=>f==null?void 0:f.on(u,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},Ob={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const Pb=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var Mb={generateClass(t,e){const n=this.state.generateClassCache,r=`${t}\0${e}`;let i=n.get(r);return i||(i=` ${t} ${t+this.getTargetSelectorSuffix(e)}`,n.set(r,i)),i},getClass(t,e){const n=/s$/.test(t),r=/^(area|arc|line|funnel|treemap)s?$/.test(t),i=n?"id":"index";return s=>{const o=s.data||s;return((e?this.generateClass(Re[n?"shapes":"shape"],o[i]):"")+this.generateClass(Re[t],o[r?"id":i])).trim()}},getChartClass(t){return e=>Re[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(r){var i;const s=r.id||((i=r.data)==null?void 0:i.id)||r;return n.indexOf(s)<0&&n.push(s),e[n.indexOf(s)%e.length]}},classRegion(t,e){return`${this.generateClass(Re.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${Re.target}-${e}`),this.generateClass(Re.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?Re.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?Re.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(Pb,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${Re.target+r} ${n}, ${e}.${Re.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${Re.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};const Lb=(t,e,n)=>{const r=Yt(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}};function Db(t){const e=Oe.colorPattern,{body:n}=Ye;let r=n[e];if(!r){const s=t.classed(Ac.colorPattern,!0).style("background-image");t.classed(Ac.colorPattern,!1),s.indexOf(";")>-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(o=>o.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=r)}return r}const Fb=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Nb={generateColor(){const t=this,{$el:e,config:n}=t,r=[],i=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient;let s=vn(n.color_pattern)?n.color_pattern:[...Db(e.chart)||Fb];const o=s;if(ie(n.color_tiles)){const l=n.color_tiles.bind(t.api)(),c=s.map((u,f)=>{const d=u.replace(/[#\(\)\s,]/g,""),h=`${t.state.datetimeId}-pattern-${d}-${f}`;return Lb(l[f%l.length],u,h)});s=c.map(u=>`url(#${u.id})`),t.patterns=c}return function(l){var c;const u=n.data_colors,f=n.data_color,d=l.id||((c=l.data)==null?void 0:c.id)||l,h=t.isTypeOf(d,["line","spline","step"])||!n.data_types[d];let m;if(ie(u[d]))m=u[d].bind(t.api)(l);else if(u[d])m=u[d];else{let S=r.indexOf(d);S<0&&(r.push(d),S=r.length-1),m=h?o[S%o.length]:s[S%s.length],u[d]=m}if(m=ie(f)?f.call(t.api,m,l):m,i&&e.defs){const S=t.$el.defs.selectAll(`[id$='-gradient${t.getTargetSelectorSuffix(d)}'] stop`);let E;S.each(function(C,w){E=w===0?this.style.stopColor:this.style.stopColor===E}),E===!0&&S.attr("stop-color",m)}return m}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,r=e.color_threshold,i=r.unit==="value",s=r.max||100,o=r.values&&r.values.length?r.values:[];return vn(r)?function(l){const c=i?l:l*100/s;let u=n[n.length-1];for(let f=0,d=o.length;f<d;f++)if(c<=o[f]){u=n[f];break}return u}:null},generateTextBGColorFilter(t,e={x:0,y:0,width:1,height:1}){const n=this,{$el:{defs:r},state:i}=n;if(t){let s=[];je(t)?s.push(""):He(t)?s=Object.keys(t):ie(t)&&(s=n.mapToTargetIds()),s.forEach(o=>{const l=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(o)}${je(t)?n.getTargetSelectorSuffix(t):""}`,c=pr(o===""?t:(t==null?void 0:t[o])||"");if(r.select(`#${l}`).empty()){const u=r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l);u.append("feFlood").attr("flood-color",c),u.append("feComposite").attr("in","SourceGraphic")}})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:r},$el:{defs:i}}=t;n.forEach(s=>{const o=`${r}-gradient${t.getTargetSelectorSuffix(s.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(s)&&"area"||t.isBarType(s)&&"bar";if((l||c)&&i.select(`#${o}`).empty()){const u=t.color(s),f={defs:null,stops:[]};if(l){const{cx:d=.3,cy:h=.3,r:m=.7,stops:S=[[.1,u,0],[.9,u,1]]}=l;f.stops=S,f.defs=i.append("radialGradient").attr("id",`${o}`).attr("cx",d).attr("cy",h).attr("r",m)}else{const d=e.axis_rotated,{x:h=d?[1,0]:[0,0],y:m=d?[0,0]:[0,1],stops:S=[[0,u,1],[1,u,0]]}=e[`${c}_linearGradient`];f.stops=S,f.defs=i.append("linearGradient").attr("id",`${o}`).attr("x1",h[0]).attr("x2",h[1]).attr("y1",m[0]).attr("y2",m[1])}f.stops.forEach(d=>{const[h,m,S]=d,E=ie(m)?m.bind(t.api)(s.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",E||u).attr("stop-opacity",S)})}})},setOverColor(t,e){const n=this,{config:r,$el:{main:i}}=n,s=r.color_onover;let o=t?s:n.color;He(o)?o=({id:l})=>l in s?s[l]:n.color(l):je(o)?o=()=>s:ie(s)&&(o=o.bind(n.api)),i.selectAll(He(e)?`.${Ze.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${Tn.shape}-${e}`).style("fill",o)}},fi=0,us=0,fs=0,Kh=1e3,wo,ds,Oo=0,za=0,Po=0,hs=typeof performance=="object"&&performance.now?performance:Date,Zh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bc(){return za||(Zh($b),za=hs.now()+Po)}function $b(){za=0}function Mo(){this._call=this._time=this._next=null}Mo.prototype=Jh.prototype={constructor:Mo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Bc():+n)+(e==null?0:+e),!this._next&&ds!==this&&(ds?ds._next=this:wo=this,ds=this),this._call=t,this._time=n,zc()},stop:function(){this._call&&(this._call=null,this._time=1/0,zc())}};function Jh(t,e,n){var r=new Mo;return r.restart(t,e,n),r}function Bb(){Bc(),++fi;for(var t=wo,e;t;)(e=za-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fi}function Qh(){za=(Oo=hs.now())+Po,fi=us=0;try{Bb()}finally{fi=0,Ub(),za=0}}function zb(){var t=hs.now(),e=t-Oo;e>Kh&&(Po-=e,Oo=t)}function Ub(){for(var t,e=wo,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:wo=n);ds=t,zc(r)}function zc(t){if(!fi){us&&(us=clearTimeout(us));var e=t-za;e>24?(t<1/0&&(us=setTimeout(Qh,t-hs.now()-Po)),fs&&(fs=clearInterval(fs))):(fs||(Oo=hs.now(),fs=setInterval(zb,Kh)),fi=1,Zh(Qh))}}function _h(t,e,n){var r=new Mo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var kb=Io("start","end","cancel","interrupt"),Gb=[],qh=0,tv=1,Uc=2,Lo=3,ev=4,kc=5,Do=6;function Fo(t,e,n,r,i,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Xb(t,n,{name:e,index:r,group:i,on:kb,tween:Gb,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:qh})}function Gc(t,e){var n=br(t,e);if(n.state>qh)throw new Error("too late; already scheduled");return n}function Fr(t,e){var n=br(t,e);if(n.state>Lo)throw new Error("too late; already running");return n}function br(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Xb(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Jh(s,0,n.time);function s(u){n.state=tv,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var f,d,h,m;if(n.state!==tv)return c();for(f in r)if(m=r[f],m.name===n.name){if(m.state===Lo)return _h(o);m.state===ev?(m.state=Do,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete r[f]):+f<e&&(m.state=Do,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete r[f])}if(_h(function(){n.state===Lo&&(n.state=ev,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Uc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Uc){for(n.state=Lo,i=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(m=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=m);i.length=d+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=kc,1),d=-1,h=i.length;++d<h;)i[d].call(t,f);n.state===kc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Do,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function di(t,e){var n=t.__transition,r,i,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){s=!1;continue}i=r.state>Uc&&r.state<kc,r.state=Do,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}s&&delete t.__transition}}function Wb(t){return this.each(function(){di(this,t)})}var nv=180/Math.PI,Xc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rv(t,e,n,r,i,s){var o,l,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*nv,skewX:Math.atan(c)*nv,scaleX:o,scaleY:l}}var No;function Vb(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Xc:rv(e.a,e.b,e.c,e.d,e.e,e.f)}function jb(t){return t==null||(No||(No=document.createElementNS("http://www.w3.org/2000/svg","g")),No.setAttribute("transform",t),!(t=No.transform.baseVal.consolidate()))?Xc:(t=t.matrix,rv(t.a,t.b,t.c,t.d,t.e,t.f))}function av(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function s(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push("translate(",null,e,null,n);S.push({i:E-4,x:gr(u,d)},{i:E-2,x:gr(f,h)})}else(d||h)&&m.push("translate("+d+e+h+n)}function o(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:gr(u,f)})):f&&d.push(i(d)+"rotate("+f+r)}function l(u,f,d,h){u!==f?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:gr(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function c(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push(i(m)+"scale(",null,",",null,")");S.push({i:E-4,x:gr(u,d)},{i:E-2,x:gr(f,h)})}else(d!==1||h!==1)&&m.push(i(m)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),s(u.translateX,u.translateY,f.translateX,f.translateY,d,h),o(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(m){for(var S=-1,E=h.length,C;++S<E;)d[(C=h[S]).i]=C.x(m);return d.join("")}}}var Hb=av(Vb,"px, ","px)","deg)"),Yb=av(jb,", ",")",")");function Kb(t,e){var n,r;return function(){var i=Fr(this,t),s=i.tween;if(s!==n){r=n=s;for(var o=0,l=r.length;o<l;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Zb(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Fr(this,t),o=s.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=l;break}c===u&&i.push(l)}s.tween=i}}function Jb(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=br(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?Kb:Zb)(n,t,e))}function Wc(t,e,n){var r=t._id;return t.each(function(){var i=Fr(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return br(i,r).value[e]}}function iv(t,e){var n;return(typeof e=="number"?gr:e instanceof ba?Gs:(n=ba(e))?(e=n,Gs):_u)(t,e)}function Qb(t){return function(){this.removeAttribute(t)}}function _b(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qb(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttribute(t);return o===i?null:o===r?s:s=e(r=o,n)}}function tS(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?s:s=e(r=o,n)}}function eS(t,e,n){var r,i,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=l+"",o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l)))}}function nS(t,e,n){var r,i,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=l+"",o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l)))}}function rS(t,e){var n=Nt(t),r=n==="transform"?Yb:iv;return this.attrTween(t,typeof e=="function"?(n.local?nS:eS)(n,r,Wc(this,"attr."+t,e)):e==null?(n.local?_b:Qb)(n):(n.local?tS:qb)(n,r,e))}function aS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function iS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function sS(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&iS(t,s)),n}return i._value=e,i}function oS(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&aS(t,s)),n}return i._value=e,i}function lS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Nt(t);return this.tween(n,(r.local?sS:oS)(r,e))}function cS(t,e){return function(){Gc(this,t).delay=+e.apply(this,arguments)}}function uS(t,e){return e=+e,function(){Gc(this,t).delay=e}}function fS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cS:uS)(e,t)):br(this.node(),e).delay}function dS(t,e){return function(){Fr(this,t).duration=+e.apply(this,arguments)}}function hS(t,e){return e=+e,function(){Fr(this,t).duration=e}}function vS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dS:hS)(e,t)):br(this.node(),e).duration}function gS(t,e){if(typeof e!="function")throw new Error;return function(){Fr(this,t).ease=e}}function pS(t){var e=this._id;return arguments.length?this.each(gS(e,t)):br(this.node(),e).ease}function mS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Fr(this,t).ease=n}}function xS(t){if(typeof t!="function")throw new Error;return this.each(mS(this._id,t))}function yS(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new Qr(r,this._parents,this._name,this._id)}function TS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,s=Math.min(r,i),o=new Array(r),l=0;l<s;++l)for(var c=e[l],u=n[l],f=c.length,d=o[l]=new Array(f),h,m=0;m<f;++m)(h=c[m]||u[m])&&(d[m]=h);for(;l<r;++l)o[l]=e[l];return new Qr(o,this._parents,this._name,this._id)}function bS(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function SS(t,e,n){var r,i,s=bS(e)?Gc:Fr;return function(){var o=s(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}function AS(t,e){var n=this._id;return arguments.length<2?br(this.node(),n).on.on(t):this.each(SS(n,t,e))}function ES(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function CS(){return this.on("end.remove",ES(this._id))}function IS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=x(t));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var l=r[o],c=l.length,u=s[o]=new Array(c),f,d,h=0;h<c;++h)(f=l[h])&&(d=t.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,Fo(u[h],e,n,h,u,br(f,n)));return new Qr(s,this._parents,e,n)}function RS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=I(t));for(var r=this._groups,i=r.length,s=[],o=[],l=0;l<i;++l)for(var c=r[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var h=t.call(f,f.__data__,d,c),m,S=br(f,n),E=0,C=h.length;E<C;++E)(m=h[E])&&Fo(m,e,n,E,h,S);s.push(h),o.push(f)}return new Qr(s,o,e,n)}var wS=bn.prototype.constructor;function OS(){return new wS(this._groups,this._parents)}function PS(t,e){var n,r,i;return function(){var s=zt(this,t),o=(this.style.removeProperty(t),zt(this,t));return s===o?null:s===n&&o===r?i:i=e(n=s,r=o)}}function sv(t){return function(){this.style.removeProperty(t)}}function MS(t,e,n){var r,i=n+"",s;return function(){var o=zt(this,t);return o===i?null:o===r?s:s=e(r=o,n)}}function LS(t,e,n){var r,i,s;return function(){var o=zt(this,t),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(t),zt(this,t))),o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l))}}function DS(t,e){var n,r,i,s="style."+e,o="end."+s,l;return function(){var c=Fr(this,t),u=c.on,f=c.value[s]==null?l||(l=sv(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(o,i=f),c.on=r}}function FS(t,e,n){var r=(t+="")=="transform"?Hb:iv;return e==null?this.styleTween(t,PS(t,r)).on("end.style."+t,sv(t)):typeof e=="function"?this.styleTween(t,LS(t,r,Wc(this,"style."+t,e))).each(DS(this._id,t)):this.styleTween(t,MS(t,r,e),n).on("end.style."+t,null)}function NS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $S(t,e,n){var r,i;function s(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&NS(t,o,n)),r}return s._value=e,s}function BS(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,$S(t,e,n==null?"":n))}function zS(t){return function(){this.textContent=t}}function US(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function kS(t){return this.tween("text",typeof t=="function"?US(Wc(this,"text",t)):zS(t==null?"":t+""))}function GS(t){return function(e){this.textContent=t.call(this,e)}}function XS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&GS(i)),e}return r._value=t,r}function WS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,XS(t))}function VS(){for(var t=this._name,e=this._id,n=lv(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)if(c=o[u]){var f=br(c,e);Fo(c,t,n,u,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Qr(r,this._parents,t,n)}function jS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var l={value:o},c={value:function(){--i===0&&s()}};n.each(function(){var u=Fr(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(c)),u.on=e}),i===0&&s()})}var HS=0;function Qr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ov(t){return bn().transition(t)}function lv(){return++HS}var _r=bn.prototype;Qr.prototype=ov.prototype={constructor:Qr,select:IS,selectAll:RS,selectChild:_r.selectChild,selectChildren:_r.selectChildren,filter:yS,merge:TS,selection:OS,transition:VS,call:_r.call,nodes:_r.nodes,node:_r.node,size:_r.size,empty:_r.empty,each:_r.each,on:AS,attr:rS,attrTween:lS,style:FS,styleTween:BS,text:kS,textTween:WS,remove:CS,tween:Jb,delay:fS,duration:vS,ease:pS,easeVarying:xS,end:jS,[Symbol.iterator]:_r[Symbol.iterator]};function Rw(t){return t*t*t}function ww(t){return--t*t*t+1}function YS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var KS={time:null,delay:0,duration:250,ease:YS};function ZS(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function JS(t){var e,n;t instanceof Qr?(e=t._id,t=t._name):(e=lv(),(n=KS).time=Bc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&Fo(c,t,e,u,o,n||ZS(c,e));return new Qr(r,this._parents,t,e)}bn.prototype.interrupt=Wb,bn.prototype.transition=JS;var Vc=(t=>()=>t);function QS(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:s}){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:s}})}function _S(t){t.stopImmediatePropagation()}function jc(t){t.preventDefault(),t.stopImmediatePropagation()}var cv={name:"drag"},Hc={name:"space"},hi={name:"handle"},vi={name:"center"};const{abs:uv,max:Bn,min:zn}=Math;function fv(t){return[+t[0],+t[1]]}function Yc(t){return[fv(t[0]),fv(t[1])]}var $o={name:"x",handles:["w","e"].map(vs),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Bo={name:"y",handles:["n","s"].map(vs),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},qS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(vs),input:function(t){return t==null?null:Yc(t)},output:function(t){return t}},qr={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"},dv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},hv={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},tA={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},eA={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function vs(t){return{type:t}}function nA(t){return!t.ctrlKey&&!t.button}function rA(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function aA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Kc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function iA(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function vv(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function sA(){return Zc($o)}function oA(){return Zc(Bo)}function Ow(){return Zc(qS)}function Zc(t){var e=rA,n=nA,r=aA,i=!0,s=Io("start","brush","end"),o=6,l;function c(C){var w=C.property("__brush",E).selectAll(".overlay").data([vs("overlay")]);w.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",qr.overlay).merge(w).each(function(){var z=Kc(this).extent;Yt(this).attr("x",z[0][0]).attr("y",z[0][1]).attr("width",z[1][0]-z[0][0]).attr("height",z[1][1]-z[0][1])}),C.selectAll(".selection").data([vs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",qr.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var $=C.selectAll(".handle").data(t.handles,function(z){return z.type});$.exit().remove(),$.enter().append("rect").attr("class",function(z){return"handle handle--"+z.type}).attr("cursor",function(z){return qr[z.type]}),C.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(C,w,$){C.tween?C.on("start.brush",function(z){f(this,arguments).beforestart().start(z)}).on("interrupt.brush end.brush",function(z){f(this,arguments).end(z)}).tween("brush",function(){var z=this,B=z.__brush,W=f(z,arguments),H=B.selection,Q=t.input(typeof w=="function"?w.apply(this,arguments):w,B.extent),q=Ya(H,Q);function st(it){B.selection=it===1&&Q===null?null:q(it),u.call(z),W.brush()}return H!==null&&Q!==null?st:st(1)}):C.each(function(){var z=this,B=arguments,W=z.__brush,H=t.input(typeof w=="function"?w.apply(z,B):w,W.extent),Q=f(z,B).beforestart();di(z),W.selection=H===null?null:H,u.call(z),Q.start($).brush($).end($)})},c.clear=function(C,w){c.move(C,null,w)};function u(){var C=Yt(this),w=Kc(this).selection;w?(C.selectAll(".selection").style("display",null).attr("x",w[0][0]).attr("y",w[0][1]).attr("width",w[1][0]-w[0][0]).attr("height",w[1][1]-w[0][1]),C.selectAll(".handle").style("display",null).attr("x",function($){return $.type[$.type.length-1]==="e"?w[1][0]-o/2:w[0][0]-o/2}).attr("y",function($){return $.type[0]==="s"?w[1][1]-o/2:w[0][1]-o/2}).attr("width",function($){return $.type==="n"||$.type==="s"?w[1][0]-w[0][0]+o:o}).attr("height",function($){return $.type==="e"||$.type==="w"?w[1][1]-w[0][1]+o:o})):C.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(C,w,$){var z=C.__brush.emitter;return z&&(!$||!z.clean)?z:new d(C,w,$)}function d(C,w,$){this.that=C,this.args=w,this.state=C.__brush,this.active=0,this.clean=$}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(C,w){return this.starting?(this.starting=!1,this.emit("start",C,w)):this.emit("brush",C),this},brush:function(C,w){return this.emit("brush",C,w),this},end:function(C,w){return--this.active===0&&(delete this.state.emitter,this.emit("end",C,w)),this},emit:function(C,w,$){var z=Yt(this.that).datum();s.call(C,this.that,new QS(C,{sourceEvent:w,target:c,selection:t.output(this.state.selection),mode:$,dispatch:s}),z)}};function h(C){if(l&&!C.touches||!n.apply(this,arguments))return;var w=this,$=C.target.__data__.type,z=(i&&C.metaKey?$="overlay":$)==="selection"?cv:i&&C.altKey?vi:hi,B=t===Bo?null:tA[$],W=t===$o?null:eA[$],H=Kc(w),Q=H.extent,q=H.selection,st=Q[0][0],it,ot,ct=Q[0][1],gt,tt,ft=Q[1][0],lt,bt,St=Q[1][1],Mt,Ot,Kt=0,ee=0,Ae,Ee=B&&W&&i&&C.shiftKey,Te,De,me=Array.from(C.touches||[C],be=>{const un=be.identifier;return be=ur(be,w),be.point0=be.slice(),be.identifier=un,be});di(w);var Pe=f(w,arguments,!0).beforestart();if($==="overlay"){q&&(Ae=!0);const be=[me[0],me[1]||me[0]];H.selection=q=[[it=t===Bo?st:zn(be[0][0],be[1][0]),gt=t===$o?ct:zn(be[0][1],be[1][1])],[lt=t===Bo?ft:Bn(be[0][0],be[1][0]),Mt=t===$o?St:Bn(be[0][1],be[1][1])]],me.length>1&&We(C)}else it=q[0][0],gt=q[0][1],lt=q[1][0],Mt=q[1][1];ot=it,tt=gt,bt=lt,Ot=Mt;var Zt=Yt(w).attr("pointer-events","none"),he=Zt.selectAll(".overlay").attr("cursor",qr[$]);if(C.touches)Pe.moved=Wt,Pe.ended=Xe;else{var ge=Yt(C.view).on("mousemove.brush",Wt,!0).on("mouseup.brush",Xe,!0);i&&ge.on("keydown.brush",pn,!0).on("keyup.brush",Cn,!0),Fc(C.view)}u.call(w),Pe.start(C,z.name);function Wt(be){for(const un of be.changedTouches||[be])for(const an of me)an.identifier===un.identifier&&(an.cur=ur(un,w));if(Ee&&!Te&&!De&&me.length===1){const un=me[0];uv(un.cur[0]-un[0])>uv(un.cur[1]-un[1])?De=!0:Te=!0}for(const un of me)un.cur&&(un[0]=un.cur[0],un[1]=un.cur[1]);Ae=!0,jc(be),We(be)}function We(be){const un=me[0],an=un.point0;var $r;switch(Kt=un[0]-an[0],ee=un[1]-an[1],z){case Hc:case cv:{B&&(Kt=Bn(st-it,zn(ft-lt,Kt)),ot=it+Kt,bt=lt+Kt),W&&(ee=Bn(ct-gt,zn(St-Mt,ee)),tt=gt+ee,Ot=Mt+ee);break}case hi:{me[1]?(B&&(ot=Bn(st,zn(ft,me[0][0])),bt=Bn(st,zn(ft,me[1][0])),B=1),W&&(tt=Bn(ct,zn(St,me[0][1])),Ot=Bn(ct,zn(St,me[1][1])),W=1)):(B<0?(Kt=Bn(st-it,zn(ft-it,Kt)),ot=it+Kt,bt=lt):B>0&&(Kt=Bn(st-lt,zn(ft-lt,Kt)),ot=it,bt=lt+Kt),W<0?(ee=Bn(ct-gt,zn(St-gt,ee)),tt=gt+ee,Ot=Mt):W>0&&(ee=Bn(ct-Mt,zn(St-Mt,ee)),tt=gt,Ot=Mt+ee));break}case vi:{B&&(ot=Bn(st,zn(ft,it-Kt*B)),bt=Bn(st,zn(ft,lt+Kt*B))),W&&(tt=Bn(ct,zn(St,gt-ee*W)),Ot=Bn(ct,zn(St,Mt+ee*W)));break}}bt<ot&&(B*=-1,$r=it,it=lt,lt=$r,$r=ot,ot=bt,bt=$r,$ in dv&&he.attr("cursor",qr[$=dv[$]])),Ot<tt&&(W*=-1,$r=gt,gt=Mt,Mt=$r,$r=tt,tt=Ot,Ot=$r,$ in hv&&he.attr("cursor",qr[$=hv[$]])),H.selection&&(q=H.selection),Te&&(ot=q[0][0],bt=q[1][0]),De&&(tt=q[0][1],Ot=q[1][1]),(q[0][0]!==ot||q[0][1]!==tt||q[1][0]!==bt||q[1][1]!==Ot)&&(H.selection=[[ot,tt],[bt,Ot]],u.call(w),Pe.brush(be,z.name))}function Xe(be){if(_S(be),be.touches){if(be.touches.length)return;l&&clearTimeout(l),l=setTimeout(function(){l=null},500)}else Nc(be.view,Ae),ge.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Zt.attr("pointer-events","all"),he.attr("cursor",qr.overlay),H.selection&&(q=H.selection),iA(q)&&(H.selection=null,u.call(w)),Pe.end(be,z.name)}function pn(be){switch(be.keyCode){case 16:{Ee=B&&W;break}case 18:{z===hi&&(B&&(lt=bt-Kt*B,it=ot+Kt*B),W&&(Mt=Ot-ee*W,gt=tt+ee*W),z=vi,We(be));break}case 32:{(z===hi||z===vi)&&(B<0?lt=bt-Kt:B>0&&(it=ot-Kt),W<0?Mt=Ot-ee:W>0&&(gt=tt-ee),z=Hc,he.attr("cursor",qr.selection),We(be));break}default:return}jc(be)}function Cn(be){switch(be.keyCode){case 16:{Ee&&(Te=De=Ee=!1,We(be));break}case 18:{z===vi&&(B<0?lt=bt:B>0&&(it=ot),W<0?Mt=Ot:W>0&&(gt=tt),z=hi,We(be));break}case 32:{z===Hc&&(be.altKey?(B&&(lt=bt-Kt*B,it=ot+Kt*B),W&&(Mt=Ot-ee*W,gt=tt+ee*W),z=vi):(B<0?lt=bt:B>0&&(it=ot),W<0?Mt=Ot:W>0&&(gt=tt),z=hi),he.attr("cursor",qr[$]),We(be));break}default:return}jc(be)}}function m(C){f(this,arguments).moved(C)}function S(C){f(this,arguments).ended(C)}function E(){var C=this.__brush||{selection:null};return C.extent=Yc(e.apply(this,arguments)),C.dim=t,C}return c.extent=function(C){return arguments.length?(e=typeof C=="function"?C:Vc(Yc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:Vc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Vc(!!C),c):r},c.handleSize=function(C){return arguments.length?(o=+C,c):o},c.keyModifiers=function(C){return arguments.length?(i=!!C,c):i},c.on=function(){var C=s.on.apply(s,arguments);return C===s?c:C},c}function gv(t){const{event:e,$el:n}=t,r=n.subchart.main||n.main;let i;return e&&e.type==="brush"?i=e.selection:r&&(i=r.select(".bb-brush").node())&&(i=vv(i)),i}function pv(t){const e=gv(t);return e?e[0]===e[1]:!0}function mv(t,e){return e.map(n=>{var r,i,s,o,l,c,u,f,d;const{values:h}=n,m=h[0],S=h[h.length-1],E=m?(i=(r=t.getXCacheKey)==null?void 0:r.call(t,m.x))!=null?i:m.x:"",C=S?(o=(s=t.getXCacheKey)==null?void 0:s.call(t,S.x))!=null?o:S.x:"",w=(c=(l=t.getTargetType)==null?void 0:l.call(t,n))!=null?c:"",$=(d=(f=(u=t.state)==null?void 0:u.subchartSourceTypes)==null?void 0:f[n.id])!=null?d:"";return`${n.id}:${w}:${$}:${h.length}:${E}:${C}`}).join("|")}function xv(t,e){var n;const r=(n=t.data)==null?void 0:n.targets;if(!r)return!1;for(let i=0;i<e.length;i++){const s=e[i],o=r.find(l=>l.id===s.id);if(!o||o.values!==s.values)return!1}return!0}function Jc(t,e){vn(e)&&((t.min===void 0||e<t.min)&&(t.min=e),(t.max===void 0||e>t.max)&&(t.max=e))}function yv(t,e){for(let n=0;n<e.length;n++)Jc(t,e[n])}function lA(t,e){var n,r,i,s;const o={min:void 0,max:void 0},l=t.state.hasAxis;for(let c=0;c<e.length;c++){const u=e[c],f=(n=t.isCandlestickType)==null?void 0:n.call(t,u),d=!f&&!!((r=t.isSubchartSourceTypeOf)!=null&&r.call(t,u,qt.CANDLESTICK)),{values:h}=u;for(let m=0;m<h.length;m++){const S=h[m];let E=S.value;if(!(Ge(E)||E===null))continue;const C=d?(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,S,!0):void 0;ae(C)?E=C:E!==null&&(f||d)&&(E=Array.isArray(E)?E.slice(0,4):[E.open,E.high,E.low,E.close]),Array.isArray(E)?yv(o,E):He(E)&&"high"in E?yv(o,Object.values(E)):(s=t.isBubbleZType)!=null&&s.call(t,S)?Jc(o,l&&t.getBubbleZData(E,"y")):Jc(o,E)}}return[o.min,o.max]}function cA(t,e){let n;for(let r=0;r<t.length;r++){const{values:i}=t[r];for(let s=0;s<i.length;s++){const{x:o}=i[s];vn(o)&&(n===void 0||(e==="min"?o<n:o>n))&&(n=o)}}return n}var uA={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:i,state:s}=e,l=xv(e,t)?`${Oe.domainMinMax}_y_${mv(e,t)}`:null,c=l&&r.get(l);if(c&&c.generation===s.dataGeneration)return c.value;const u=i.data_groups,f=e.mapToIds(t),d=Yf(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),S=t.some(W=>W.values.some(H=>H.value<0)),E=t.some(W=>W.values.some(H=>H.value>0)),C=new Map(f.map(W=>[W,n.getId(W)])),w={},$={};for(const W in m)w[W]=m[W].slice(),$[W]=m[W].slice();u.forEach(W=>{const H=W.filter(Q=>d.has(Q));if(H.length){const Q=H[0],q=C.get(Q);w[Q]&&S&&(w[Q]=w[Q].map(st=>st<0?st:0)),$[Q]&&E&&($[Q]=$[Q].map(st=>st>0?st:0)),H.filter((st,it)=>it>0).forEach(st=>{if(w[st]){const it=C.get(st);w[st].forEach((ot,ct)=>{const gt=+ot;it===q&&!(S&>>0)&&(w[Q][ct]+=gt)})}if($[st]){const it=C.get(st);$[st].forEach((ot,ct)=>{const gt=+ot;it===q&&!(E&><0)&&($[Q][ct]+=gt)})}})}});const z=[],B=[];for(const W in w)z.push(mr("min",w[W])),B.push(mr("max",$[W]));h=[mr("min",z),mr("max",B)]}else h=lA(e,t);return l&&r.add(l,{generation:s.dataGeneration,value:h}),h},isHiddenTargetWithYDomain(t){const e=this;for(const n of e.state.hiddenTargetIds)if(e.axis.getId(n)===t)return!0;return!1},getYDomain(t,e,n){const r=this,{axis:i,config:s,scale:o}=r,l=`axis_${e}`;if(r.isStackNormalized()&&t.filter(tt=>i.getId(tt.id)===e).map(tt=>tt.id).some(tt=>r.isGrouped(tt)))return[0,100];const c=(o==null?void 0:o[e])&&o[e].type==="log",u=t.filter(ct=>i.getId(ct.id)===e),f=n?r.filterByXDomain(u,n):u;if(f.length===0)return r.isHiddenTargetWithYDomain(e)?o[e].domain():e==="y2"?o.y.domain():r.getYDomain(t,"y2",n);const d=s[`${l}_min`],h=s[`${l}_max`],m=s[`${l}_center`],S=s[`${l}_inverted`],E=r.hasDataLabel()&&s.axis_rotated,C=r.hasDataLabel()&&!s.axis_rotated,[w,$]=r.getYDomainMinMaxBoth(f);let z=w,B=$,W=[qt.BAR,qt.BUBBLE,qt.SCATTER,...en.Line].some(ct=>{const gt=ct.indexOf("area")>-1?"area":ct;return r.hasType(ct,f,!0)&&s[`${gt}_zerobased`]});z=Ge(d)?d:Ge(h)?z<=h?z:h-10:z,B=Ge(h)?h:Ge(d)?d<=B?B:d+10:B,isNaN(z)&&(z=0),isNaN(B)&&(B=z),z===B&&(z<0?B=0:z=0);const H=z>=0&&B>=0,Q=z<=0&&B<=0;(Ge(d)&&H||Ge(h)&&Q)&&(W=!1),W&&(H&&(z=0),Q&&(B=0));const q=Math.abs(B-z);let st={top:q*.1,bottom:q*.1};if(sn(m)){const ct=Math.max(Math.abs(z),Math.abs(B));B=m+ct,z=m-ct}if(E){const ct=wa(o.y.range()),gt=r.getDataLabelLength(z,B,"width").map(tt=>{const ft=tt/ct;return isFinite(ft)?ft:0});["bottom","top"].forEach((tt,ft)=>{st[tt]+=q*(gt[ft]/(1-gt[0]-gt[1]))})}else if(C){const ct=r.getDataLabelLength(z,B,"height");["bottom","top"].forEach((gt,tt)=>{st[gt]+=r.convertPixelToScale("y",ct[tt],q)})}st=r.getResettedPadding(st);const it=s[`${l}_padding`];vn(it)&&["bottom","top"].forEach(ct=>{st[ct]=i.getPadding(it,ct,st[ct],q)}),W&&(H&&(st.bottom=z),Q&&(st.top=-B));const ot=c?[z,B].map(ct=>ct<0?0:ct):[z-st.bottom,B+st.top];return S?ot.reverse():ot},getXDomainMinMax(t,e){var n;const r=this,{cache:i,state:s}=r,o=r.config[`axis_x_${e}`],c=xv(r,t)?`${Oe.domainMinMax}_x_${e}_${mv(r,t)}`:null,u=c&&i.get(c);let f=(u==null?void 0:u.generation)===s.dataGeneration?u.value:void 0;f===void 0&&(f=cA(t,e),c&&i.add(c,{generation:s.dataGeneration,value:f}));let d=He(o)?o.value:o;return d=sn(d)&&((n=r.axis)!=null&&n.isTimeSeries())?Wn.bind(this)(d):d,He(o)&&o.fit&&(e==="min"&&d<f||e==="max"&&d>f)&&(d=void 0),sn(d)?d:f},getXDomainPadding(t,e){const n=this,{axis:r,config:i}=n,s=i.axis_x_padding,o=r.isTimeSeries()&&e,l=wa(t);let c;if(r.isCategorized()||o)c=0;else if(n.hasType("bar")){const d=n.getMaxDataCount();c=d>1?l/(d-1)/2:.5}else c=n.getResettedPadding(l*.01);let{left:u=c,right:f=c}=ae(s)?{left:s,right:s}:s;if(s.unit==="px"){const d=Math.abs(l+l*.2);u=r.getPadding(s,"left",c,d),f=r.getPadding(s,"right",c,d)}else{const d=l+u+f;if(o&&d){const h=l/e/d;u=u/d/h,f=f/d/h}}return{left:u,right:f}},getXDomain(t){const e=this,{axis:n,config:r,scale:{x:i}}=e,s=r.axis_x_inverted,o=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=o;if(i.type!=="log"){const u=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(o);let[h,m]=o;h-m===0&&!u&&(f?(h=new Date(h.getTime()*.5),m=new Date(m.getTime()*1.5)):(h=h===0?1:h*.5,m=m===0?-1:m*1.5)),(h||h===0)&&(l=f?new Date(h.getTime()-d.left):h-d.left),(m||m===0)&&(c=f?new Date(m.getTime()+d.right):m+d.right)}return s?[c,l]:[l,c]},updateXDomain(t,e,n,r,i){var s;const o=this,{config:l,org:c,scale:{x:u,subX:f}}=o,d=l.zoom_enabled;if(n&&(u.domain(i||ti(o.getXDomain(t),!l.axis_x_inverted)),c.xDomain=u.domain(),f.domain(u.domain()),(s=o.brush)==null||s.scale(f)),e){const h=i||!o.brush||pv(o)?c.xDomain:gv(o).map(f.invert);u.domain(h)}return(n||e)&&d&&o.zoom.updateScaleExtent(),r&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,r=e.getZoomDomain(),[i,s]=r;return(n?t[0]>=i:t[0]<=i)&&(t[1]=+t[1]+(i-t[0]),t[0]=i),(n?t[1]<=s:t[1]>=s)&&(t[0]=+t[0]-(t[1]-s),t[1]=s),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:r,scale:i,org:s}=n;let[o,l]=e&&i[t]?i[t].domain():s.xDomain;return t==="zoom"&&(sn(r.zoom_x_min)&&(o=mr("min",[o,r.zoom_x_min])),sn(r.zoom_x_max)&&(l=mr("max",[l,r.zoom_x_max]))),[o,l]},getZoomDomainValue(t){const e=this,{config:n,axis:r}=e;if(r.isCategorized()&&Array.isArray(t)){const i=n.axis_x_inverted;return t.map((o,l)=>Number(o)+(l===0?+i:+!i))}return t},convertPixelToScale(t,e,n){const r=this,{config:i,state:s}=r,o=i.axis_rotated;let l;return t==="x"?l=o?"height":"width":l=o?"width":"height",n*(e/s[l])},withinRange(t,e=[0,0],n){const i=this.config.axis_x_inverted,[s,o]=n;if(Array.isArray(t)){const l=i?t[1]:t[0],c=i?t[0]:t[1];if(l<c)return t.every((u,f)=>(f===0?i?+u<=s:+u>=s:i?+u>=o:+u<=o)&&!t.every((d,h)=>d===e[h]))}return!1}};function Tv(t,e,n){const{config:r}=t,i=`axis_${e}_tick_format`;return(r[i]?r[i]:t.defaultValueFormat).call(t.api,n)}var fA={yFormat(t){return Tv(this,"y",t)},y2Format(t){return Tv(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:r}=t,i=t.hasArcType(null,["gauge","polar","radar"]);return function(s,o,l){return(i?e:t.axis&&t.axis.getId(l)==="y2"?r:n).call(t,s,o)}},defaultValueFormat(t){return qe(t)?t.join("~"):Ge(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){const e=this,n=e.config.data_labels,r=s=>{let l=s;return qe(s)?l=s.join("~"):He(s)&&(l=Object.values(s).join("~")),l};let i=r;return ie(n.format)?i=n.format:Kn(n.format)&&(n.format[t]?i=n.format[t]===!0?r:n.format[t]:i=()=>""),i.bind(e.api)}};const bv=10,dA=750;function zo(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function hA(t,e=!0){var n;const{config:r}=this;let i=(n=r.data_names[t])!=null?n:t;return e&&ie(r.legend_format)&&(i=r.legend_format(i,t!==i?t:void 0)),i}function vA(t,e){var n;if(!e||e.empty())return;const r=(n=t.$el.legend)==null?void 0:n.selectAll(`.${$e.legendItem}`);r&&!r.empty()&&(e=r);const i=[];e.each(function(o){i.push({id:o,node:this})});const s=Kf(i,o=>o.id,o=>o.node);t.cache.add(Oe.legendItemMap,s)}function Sv(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function gA(t,e,n){const r=Sv(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Av(t,e){const n=t.state.legendTouch,r=n&&Sv(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>bv||Math.abs(r.clientY-n.y)>bv)}function pA(t,e,n){Av(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function mA(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function xA(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<dA;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function yA(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}var TA={initLegend(){var t;const e=this,{config:n,$el:r}=e;if(e.legendItemTextBox={},e.state.legendHasRendered=!1,e.state.isCanvasMode){n.legend_show?(t=e.updateHtmlLegend)==null||t.call(e):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets));return}n.legend_show?(n.legend_contents_bindto||(r.legend=e.$el.svg.append("g").classed($e.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets))},updateLegend(t,e,n){var r;const i=this,{config:s,state:o,scale:l,$el:c}=i,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=ia(u,"withTransition",!0),u.withTransitionForTransform=ia(u,"withTransitionForTransform",!0),s.legend_contents_bindto&&s.legend_contents_template?i.updateLegendTemplate():o.hasTreemap||i.updateLegendElement(t||i.mapToIds(i.data.targets),u),(r=c.legend)==null||r.selectAll(`.${$e.legendItem}`).classed($e.legendItemHidden,function(f){const d=!i.isTargetToShow(f);return d&&(this.style.opacity=null),d}),i.updateScales(!1,!l.zoom),i.updateSvgSize(),i.transformAll(u.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,r=Yt(e.legend_contents_bindto),i=e.legend_contents_template;if(!r.empty()){const s=t.mapToIds(t.data.targets),o=[];let l="";s.forEach(u=>{const f=ie(i)?pr(i.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Pa(i,{COLOR:t.color(u),TITLE:u});f&&(o.push(u),l+=f)});const c=r.html(pr(l)).selectAll(function(){return this.children}).data(o);t.setLegendItem(c),n.legend=r}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:r,isLegendLeft:i,isLegendRight:s,isLegendInset:o,current:l}}=e,{width:c,height:u}=t,f={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-u-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:i?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:s?0:o?f.top:l.height-u,right:NaN,bottom:0,left:s?l.width-c:o?f.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:r}=e;r(n,t).attr("transform",e.getTranslate("legend"))},updateLegendItemColor(t,e){const n=this,{legend:r}=n.$el;if(r){const i=n.getLegendItemById(t);i&&Yt(i).select("line").style("stroke",e)}},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:r,legendItemWidth:i,legendStep:s}=t.state;return t.config.legend_show?n||r?i*(s+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:r,legendItemHeight:i,legendStep:s}=e.state,l=((t=e.config.padding)==null?void 0:t.mode)==="fit"?10:20;return e.config.legend_show?r?n.height:Math.max(l,i)*(s+1):0},opacityForUnfocusedLegend(t){return t.classed($e.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:r},$T:i}=n,s=n.mapToTargetIds(t);r&&i(r.selectAll(`.${$e.legendItem}`).filter(o=>s.indexOf(o)>=0).classed(nn.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,Yt(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:r,$T:i}=e;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),i(r.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:r}}=e;n.legend_show&&lr(t)&&(n.legend_show=!1,r==null||r.style("visibility","hidden")),e.addHiddenLegendIds(t),r==null||r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:r,state:i}=n;let s;const o=Oe.legendItemTextBox;return t&&(s=!i.redrawing&&r.get(o)||{},s[t]||(s[t]=n.getTextRect(e,$e.legendItem),r.add(o,s)),s=s[t]),s},setLegendItem(t){const e=this,{$el:n,api:r,config:i,state:s}=e,o=s.inputType==="touch",l=e.hasType("gauge"),c=i.boost_useCssRule,u=i.legend_item_interaction,f=u.dblclick?"dblclick":"click",d=u||ie(i.legend_item_onclick),h=o?yA(e):void 0,m=function(S,E){var C;if(!Ne(i.legend_item_onclick,r,E,!s.hiddenTargetIds.has(E))){const{altKey:w,type:$}=S,z=Yt(this);$==="dblclick"||w?s.hiddenTargetIds.size&&!z.classed($e.legendItemHidden)?r.show():(r.hide(),r.show(E)):(r.toggle(E),z.classed(nn.legendItemFocused,!1))}o&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(S){const E=Yt(this);return(!E.empty()&&E.attr("class")||"")+e.generateClass($e.legendItem,S)}).style("visibility",S=>e.isLegendToShow(S)?null:"hidden"),i.interaction_enabled&&(c&&[[`.${$e.legendItem}`,"cursor:pointer"],[`.${$e.legendItem} text`,"pointer-events:none"],[`.${$e.legendItemPoint} text`,"pointer-events:none"],[`.${$e.legendItemTile}`,"pointer-events:none"],[`.${$e.legendItemEvent}`,"fill-opacity:0"]].forEach(S=>{const[E,C]=S;e.setCssRule(!1,E,[C])(n.legend)}),t.on(f,d?function(S,E){o&&S.type==="click"&&xA(e,E)||m.call(this,S,E)}:null),o&&f==="click"&&d&&t.on("touchstart",function(S,E){gA(e,E,S)},h).on("touchmove",S=>{Av(e,S)},h).on("touchend",function(S,E){pA(e,E,S)&&(mA(e,E),m.call(this,S,E))},h),!o&&t.on("mouseout",u||ie(i.legend_item_onout)?function(S,E){Ne(i.legend_item_onout,r,E,!s.hiddenTargetIds.has(E))||(Yt(this).classed(nn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${ar.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||ie(i.legend_item_onover)?function(S,E){Ne(i.legend_item_onover,r,E,!s.hiddenTargetIds.has(E))||(Yt(this).classed(nn.legendItemFocused,!0),l&&e.markOverlapped(E,e,`.${ar.gaugeValue}`),!s.transiting&&e.isTargetToShow(E)&&r.focus(E))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer"))),vA(e,t)},getLegendItemById(t){var e;const n=this,r=n.cache.get(Oe.legendItemMap);if(r&&r instanceof Map)return r.get(t)||null;const i=(e=n.$el.legend)==null?void 0:e.selectAll(`.${$e.legendItem}`).filter(s=>s===t);return(i==null?void 0:i.node())||null},updateLegendElement(t,e){const n=this,{config:r,state:i,$el:{legend:s},$T:o}=n,c=r.legend_item_tile_type!=="circle",u=r.legend_item_tile_r,f={width:c?r.legend_item_tile_width:u*2,height:c?r.legend_item_tile_height:u*2},d={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},h={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let m,S,E;const C=t.filter(q=>!sn(r.data_names[q])||r.data_names[q]!==null),w=e.withTransition,$=i.isLegendRight||i.isLegendInset,z=hA.bind(n),B=n.getUpdateLegendPositions(C,d,h,$);i.isLegendInset&&(d.step=r.legend_inset_step?r.legend_inset_step:C.length,i.legendStep=d.step),i.isLegendRight?(m=q=>d.max.width*h.steps[q],S=q=>h.margins[h.steps[q]]+h.offsets[q]):i.isLegendInset?(m=q=>d.max.width*h.steps[q]+10,S=q=>h.margins[h.steps[q]]+h.offsets[q]):(m=q=>h.margins[h.steps[q]]+h.offsets[q],S=q=>d.max.height*h.steps[q]);const W={xText:(q,st)=>m(q,st)+4+f.width,xRect:(q,st)=>m(q,st),x1Tile:(q,st)=>m(q,st)-2,x2Tile:(q,st)=>m(q,st)-2+f.width,yText:(q,st)=>S(q,st)+9,yRect:(q,st)=>S(q,st)-5,yTile:(q,st)=>S(q,st)+4};n.generateLegendItem(C,f,B,W,$,z),E=s.select(`.${$e.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&E.size()===0&&(E=s.insert("g",`.${$e.legendItem}`).attr("class",$e.legendBackground).append("rect")),r.legend_tooltip&&s.selectAll("title").data(C).text(q=>z(q,!1));const H=s.selectAll("text").data(C).text(q=>z(q)).each(function(q,st){B(this,q,st)});o(H,w).attr("x",W.xText).attr("y",W.yText);const Q=s.selectAll(`rect.${$e.legendItemEvent}`).data(C);o(Q,w).attr("width",q=>h.widths[q]).attr("height",q=>h.heights[q]).attr("x",W.xRect).attr("y",W.yRect),n.updateLegendItemPos(C,w,W),E&&o(E,w).attr("height",n.getLegendHeight()-12).attr("width",d.max.width*(d.step+1)+10),i.legendItemWidth=d.max.width,i.legendItemHeight=d.max.height,i.legendStep=d.step},getUpdateLegendPositions(t,e,n,r){const i=this,{config:s,state:o}=i;return function(l,c,u){const f=u===0,d=u===t.length-1,h=i.getLegendItemTextBox(c,l),m=h.width+e.tileWidth+(d&&!r?0:e.padding.right)+s.legend_padding,S=h.height+e.padding.top,E=r?S:m,C=r?i.getLegendHeight():i.getLegendWidth();let w;const $=function(B,W){W||(w=(C-e.totalLength-E)/2,w<e.posMin&&(w=(C-E)/2,e.totalLength=0,e.step++)),n.steps[B]=e.step,n.margins[e.step]=o.isLegendInset?10:w,n.offsets[B]=e.totalLength,e.totalLength+=E};if(f&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),s.legend_show&&!i.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=m,n.heights[c]=S,(!e.max.width||m>=e.max.width)&&(e.max.width=m),(!e.max.height||S>=e.max.height)&&(e.max.height=S);const z=r?e.max.height:e.max.width;if(s.legend_equally){for(const B in n.widths)n.widths[B]=e.max.width;for(const B in n.heights)n.heights[B]=e.max.height;w=(C-z*t.length)/2,w<e.posMin?(e.totalLength=0,e.step=0,t.forEach(B=>$(B))):$(c,!0)}else $(c)}},generateLegendItem(t,e,n,r,i,s){const o=this,{config:l,state:c,$el:{legend:u}}=o,f=l.legend_usePoint,d=l.legend_item_tile_r,h=l.legend_item_tile_type,m=h!=="circle",S=-200,E=u.selectAll(`.${$e.legendItem}`).data(t).enter().append("g");if(o.setLegendItem(E),l.legend_tooltip&&E.append("title").text(C=>C),E.append("text").text(C=>s(C)).each(function(C,w){n(this,C,w)}).style("pointer-events",o.getStylePropValue("none")).attr("x",i?r.xText:S).attr("y",i?S:r.yText),E.append("rect").attr("class",$e.legendItemEvent).style("fill-opacity",o.getStylePropValue("0")).attr("x",i?r.xRect:S).attr("y",i?S:r.yRect),f){const C=[],w=o.getValidPointPattern();E.append($=>{C.indexOf($)===-1&&C.push($);let z=w[C.indexOf($)%w.length];return z==="rectangle"&&(z="rect"),Ye.createElementNS(_t.svg,"hasValidPointType"in o&&o.hasValidPointType(z)?z:"use")}).attr("class",$e.legendItemPoint).style("fill",zo.bind(o)).style("pointer-events",o.getStylePropValue("none")).attr("href",($,z,B)=>{const H=B[z].nodeName.toLowerCase(),Q=o.getTargetSelectorSuffix($);return H==="use"?`#${c.datetimeId}-point${Q}`:void 0})}else E.append(m?"line":h).attr("class",$e.legendItemTile).style("stroke",zo.bind(o)).style("pointer-events",o.getStylePropValue("none")).call(C=>{h==="circle"?C.attr("r",d).style("fill",zo.bind(o)).attr("cx",i?r.x2Tile:S).attr("cy",i?S:r.yTile):m&&C.attr("stroke-width",e.height).attr("x1",i?r.x1Tile:S).attr("y1",i?S:r.yTile).attr("x2",i?r.x2Tile:S).attr("y2",i?S:r.yTile)})},updateLegendItemPos(t,e,n){const r=this,{config:i,$el:{legend:s},$T:o}=r,l=i.legend_usePoint,c=i.legend_item_tile_type,u=c!=="circle";if(l){const f=s.selectAll(`.${$e.legendItemPoint}`).data(t),d=i.legend_item_tile_type!=="circle",h=d?i.legend_item_tile_width:i.legend_item_tile_r*2,m=d?i.legend_item_tile_height:i.legend_item_tile_r*2,S=h*.75,E=m*.75,C=h/8,w=m/8;o(f,e).each(function(){const $=this.nodeName.toLowerCase();let z="x",B="y",W=null,H=null,Q=null;$==="circle"?(z="cx",B="cy",W=Math.min(S,E)/2):$==="rect"&&(H=S,Q=E);const q=Yt(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",W).attr("width",H).attr("height",Q);$==="use"?q.attr("transform",st=>`translate(${n.x1Tile(st)} ${n.yTile(st)-m/2}) scale(${C} ${w})`):q.attr(z,st=>n.x1Tile(st)+(h-(H||0))/2).attr(B,st=>n.yTile(st)-(Q||0)/2)})}else{const f=s.selectAll(`.${$e.legendItemTile}`).data(t);o(f,e).style("stroke",zo.bind(r)).call(d=>{c==="circle"?d.attr("cx",h=>{const m=n.x2Tile(h);return m-(m-n.x1Tile(h))/2}).attr("cy",n.yTile):u&&d.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},bA={redraw(t={}){var e,n,r,i,s,o,l,c,u,f;const d=this,{config:h,state:m,$el:S}=d,{main:E,treemap:C}=S;m.redrawing=!0,m.redrawGeneration++,(m.dirty.data||m.dirty.visibility||t.initializing)&&m.dataGeneration++,(t.initializing||m.dirty.size||m.dirty.data||!m.rendered)&&d.cache.remove([Oe.svgLeft]);const w=d.filterTargetsToShow(d.data.targets);m._targetsToShow=w;const $={data:m.dirty.data,visibility:m.dirty.visibility,size:m.dirty.size};m.dirty.data=!1,m.dirty.visibility=!1,m.dirty.size=!1;const{flow:z,initializing:B}=t,W=d.getWithOption(t),H=W.Transition?h.transition_duration:0,Q=W.TransitionForExit?H:0,q=W.TransitionForAxis?H:0,st=(e=d.axis)==null?void 0:e.generateTransitions(q),it=$.data||$.visibility||B;if(m.isCanvasMode&&(d.setContainerSize(),(n=d.updateHtmlLegend)==null||n.call(d)),d.updateSizes(B),m.isCanvasMode){const ot=d.scale.zoom,ct=ot==null?void 0:ot.domain();ot&&(d.scale.zoom=null),d.updateScales(B,W.UpdateXDomain),ot&&(ot.range(d.scale.x.range()),ct&&ot.domain(ct),d.scale.zoom=d.getCustomizedXScale(ot),d.axis.x.scale(d.scale.zoom),d.scale.x.domain(h.zoom_rescale?ct:d.org.xDomain),d.scale.subX.domain(d.org.xDomain)),m.hasAxis&&d.axis.syncAxisDomains(w,W,z),m.hasAxis&&((r=d.applyCanvasSubchartDomain)==null||r.call(d));const gt=it?d.getDrawShape():m._cachedDrawShape||d.getDrawShape();it&&(m._cachedDrawShape=gt),h.legend_show&&S.legend&&!(h.legend_contents_bindto&&h.legend_contents_template)&&((i=d.positionHtmlLegend)==null||i.call(d)),(s=d.resizeCanvas)==null||s.call(d),m.canvasFocusKey=null,d.renderCanvasFrame(gt,null,!0),B&&d.updateTypesElements(),d.callPluginHook("$redraw",t,0),m.redrawing=!1,m._targetsToShow=null,m._cachedDrawShape=null,d.mapToIds(d.data.targets).forEach(tt=>{m.withoutFadeIn[tt]=!0}),Ne(h.onrendered,d.api);return}W.Legend&&h.legend_show?(t.withTransition=!!H,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,st)):W.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&E.select(`text.${En.text}.${ze.empty}`).attr("x",m.width/2).attr("y",m.height/2).text(h.data_empty_label_text).style("display",w.length?"none":null),(o=d.redrawTitle)==null||o.call(d),m.hasAxis?(d.axis.redrawAxis(w,W,st,z,B),(l=d.hasGrid)!=null&&l.call(d)&&d.updateGrid(),h.regions.length&&((c=d.updateRegion)==null||c.call(d)),["bar","candlestick","line","area"].forEach(ot=>{const ct=Ln(ot);(/^(line|area)$/.test(ot)&&d.hasTypeOf(ct)||d.hasType(ot))&&it&&d[`update${ct}`](W.TransitionForExit)}),S.text&&E.selectAll(`.${on.selectedCircles}`).filter(d.isBarType.bind(d)).selectAll("circle").remove(),h.interaction_enabled&&!z&&W.EventRect&&(d.redrawEventRect(),(u=d.bindZoomEvent)==null||u.call(d))):(S.arcs&&d.redrawArc(H,Q,W.Transform),S.radar&&d.redrawRadar(),S.polar&&d.redrawPolar(),S.funnel&&d.redrawFunnel(),C&&d.updateTreemap(Q)),!m.resizing&&!C&&(d.hasPointType()||m.hasRadar)?it&&d.updateCircle():(f=d.hasLegendDefsPoint)!=null&&f.call(d)&&d.data.targets.forEach(d.point("create",this)),d.hasDataLabel()&&!d.hasArcType(null,["radar"])&&it&&d.updateText(),B&&d.updateTypesElements(),d.generateRedrawList(w,z,H,W.Subchart,it),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,H)},generateRedrawList(t,e,n,r,i=!0){const s=this,{config:o,state:l}=s,c=i?s.getDrawShape():l._cachedDrawShape||s.getDrawShape();i&&(l._cachedDrawShape=c),l.hasAxis&&o.subchart_show&&s.redrawSubchart(r,n,c);const u=e&&s.generateFlow({targets:t,flow:e,duration:e.duration,shape:c,xv:s.xv.bind(s)}),f=(n||u)&&os(),d=s.getRedrawList(c,e,u,f),h=()=>{u&&u(),l.redrawing=!1,l._targetsToShow=null,l._cachedDrawShape=null,Ne(o.onrendered,s.api)};if(f&&d.length){const m=Mh();ov().duration(n).each(()=>{d.flatMap(S=>S).forEach(S=>m.add(S))}).call(m,h)}else l.transiting||h();s.mapToIds(s.data.targets).forEach(m=>{l.withoutFadeIn[m]=!0})},getRedrawList(t,e,n,r){const i=this,{config:s,state:{hasAxis:o,hasRadar:l,hasTreemap:c},$el:{grid:u}}=i,{cx:f,cy:d,xForText:h,yForText:m}=t.pos,S=[];if(o){i.redrawGrid&&(s.grid_x_lines.length||s.grid_y_lines.length)&&S.push(i.redrawGrid(r)),i.redrawRegion&&s.regions.length&&S.push(i.redrawRegion(r));for(const E in t.type){const C=Ln(E),w=t.type[E];(/^(area|line)$/.test(E)&&i.hasTypeOf(C)||i.hasType(E))&&S.push(i[`redraw${C}`](w,r))}!e&&u.main&&i.updateGridFocus&&S.push(i.updateGridFocus())}return(!i.hasArcType()||l)&&vn(s.data_labels)&&s.data_labels!==!1&&S.push(i.redrawText(h,m,e,r)),(i.hasPointType()||l)&&!i.isPointFocusOnly()&&i.redrawCircle&&S.push(i.redrawCircle(f,d,r,n)),c&&S.push(i.redrawTreemap(r)),S},updateAndRedraw(t={}){const e=this,{config:n,state:r}=e;let i;t.withTransition=ia(t,"withTransition",!0),t.withTransform=ia(t,"withTransform",!1),t.withLegend=ia(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=ia(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(r.hasAxis&&(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t)}},SA={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentRectValue("width")},getCurrentHeight(){var t,e;const n=this,{config:r,state:i,$el:s}=n;let o=r.size_height;if(!o){const l=i.isCanvasMode?(t=s.chart)==null?void 0:t.node():null,c=l==null?void 0:l.style.minHeight;c&&(l.style.minHeight=""),o=n.getParentHeight(),c&&(l.style.minHeight=c);const u=l&&parseFloat((e=n.canvasEngine)==null?void 0:e.canvas.style.height)||0,f=i.current.height-u;f>0&&Math.round(o)===Math.round(u)&&(o+=f)}return o>0?o:320/(n.hasType("gauge")&&!r.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${Ln(t)}`;let n=this.$el.chart.node(),r=0;for(;r<30&&n&&n.tagName!=="BODY";){try{r=ln(n,!0)[t]}catch(s){e in n&&(r=n[e])}n=n.parentNode}const i=Ye.body[e];return r>i&&(r=i),r},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){var e,n,r;const i=this,{cache:s,config:o,state:{hasAxis:l},$el:c}=i;if(t){const st=s.get(Oe.svgLeft);if(st!==null)return st}const u=o.axis_rotated,f=u||!u&&!o.axis_y_inner,d=u?Rn.axisX:Rn.axisY,h=c.main.select(`.${d}`).node(),m=l&&o[`axis_${u?"x":"y"}_label`],E=l&&(je(m)||je(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=E&&!E.empty()?E.node():null,w=!t,$={label:C?ln(C,w):null,leftAxis:h&&f?ln(h,w):null,chart:ln(c.chart.node(),w)},z=(n=(e=$.label)==null?void 0:e.left)!=null?n:0,B=(r=$.leftAxis)!=null?r:{right:0},W=$.chart.left+z,H=i.hasArcType(),Q=B.right-W-(H?0:i.getCurrentPaddingByDirection("left",t)),q=Q>0?Q:0;return s.add(Oe.svgLeft,q),q},previewResize(){var t,e,n;const r=this,{state:i,$el:s}=r,{current:o}=i,l=r.getCurrentWidth(),c=r.getCurrentHeight();if(!(!l||!c||!o.width||!o.height||l===o.width&&c===o.height)){if(i.isCanvasMode){const u=(t=r.canvasEngine)==null?void 0:t.canvas;if(!u)return;s.chart.style("min-height",`${c}px`),u.style.width=`${l}px`,u.style.height=`${Math.max(0,c-((n=(e=r.getCanvasBottomLegendHeight)==null?void 0:e.call(r))!=null?n:0))}px`}else if(s.svg)s.svg.attr("viewBox",`0 0 ${o.width} ${o.height}`).attr("preserveAspectRatio","none").attr("width",l).attr("height",c);else return;i.resizePreview=!0}},clearResizePreview(){const t=this,{config:e,state:n,$el:r}=t;n.resizePreview&&(n.resizePreview=!1,!n.isCanvasMode&&r.svg&&e.resize_auto!=="viewBox"&&r.svg.attr("viewBox",null).attr("preserveAspectRatio",null))},updateDimension(t){var e,n;const r=this,{config:i,state:{hasAxis:s,isCanvasMode:o},$el:l}=r;if(s&&!t&&r.axis.x&&i.axis_rotated&&((e=r.axis.subX)==null||e.create(l.axis.subX)),r.updateScales(t),o){(n=r.resizeCanvas)==null||n.call(r);return}r.updateSvgSize(),r.transformAll(!1)},updateSvgSize(){var t;const e=this,{config:n,state:{clip:r,current:i,hasAxis:s,width:o,height:l},$el:{svg:c}}=e;if(!c){(t=e.resizeCanvas)==null||t.call(e);return}if(e.clearResizePreview(),n.resize_auto==="viewBox"?c.attr("viewBox",`0 0 ${i.width} ${i.height}`):c.attr("width",i.width).attr("height",i.height),s){const u=c.select(`.${Th.brush} .overlay`),f={width:0,height:0};u.size()&&(f.width=+u.attr("width"),f.height=+u.attr("height")),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select("rect").attr("width",o).attr("height",l),c.select(`#${r.idXAxis}`).select("rect").call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select("rect").call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select("rect").attr("width",o).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var r;const i=this,{config:s,$el:o,state:{hasAxis:l,isCanvasMode:c}}=i,u=s.axis_rotated,f=((r=s.padding)==null?void 0:r.mode)==="fit",d=ae(s[`padding_${t}`])?s[`padding_${t}`]:void 0,h=l?{top:u?"y2":null,bottom:u?"y":"x",left:u?"x":"y",right:u?null:"y2"}[t]:null,m=/^(left|right)$/.test(t),S=h&&s[`axis_${h}_inner`],E=h&&s[`axis_${h}_show`],C=h?s[`axis_${h}_axes`].length:0;let w=h?m?i.getAxisWidthByAxisId(h,e):i.getHorizontalAxisHeight(h):0;const $=20;let z=0;!f&&m&&(w=py(w));let B=l&&m&&(S||mn(d)&&!E)?0:f?(E?w:0)+(d!=null?d:0):mn(d)?w:d;return m&&l?(h&&(f||S)&&s[`axis_${h}_label`].text&&(B+=i.axis.getAxisLabelPosition(h).isOuter?$:0),t==="right"?(B+=u?!f&&mn(d)?10:2:!E||S?f?2:1:0,B+=n?i.axis.getXAxisTickTextY2Overflow($):0):t==="left"&&u&&mn(d)&&(B=s.axis_x_show?f?w:Math.max(w,40):1)):t==="top"?((o.title&&o.title.node()||c&&s.title_text)&&(B+=i.getTitlePadding()),z=u&&!S?C:0):t==="bottom"&&l&&u&&!E&&(B+=1),B+w*C-z},getCurrentPadding(t=!1){const e=this,[n,r,i,s]=["top","bottom","left","right"].map(o=>e.getCurrentPaddingByDirection(o,null,t));return{top:n,bottom:r,left:i,right:s}},getResettedPadding(t){const e=this,{config:n}=e,r=ae(t);let i=r?0:{};return n.padding===!1?!r&&Object.keys(t).forEach(s=>{i[s]=!lr(n.data_labels)&&n.data_labels!==!1&&s==="top"?t[s]:0}):i=t,i},updateSizes(t){var e,n,r,i,s;const o=this,{config:l,state:c,$el:{legend:u}}=o,f=l.axis_rotated,d=o.hasArcType()||c.hasFunnel||c.hasTreemap,h=((e=l.padding)==null?void 0:e.mode)==="fit";!t&&o.setContainerSize();const m=u?o.getLegendWidth():0,S=u?o.getLegendHeight():0,E={width:m,height:S};!d&&l.axis_x_show&&l.axis_x_tick_autorotate&&o.updateXAxisTickClip();const C={right:l.legend_show&&c.isLegendRight?m+(h?0:20):0,bottom:!l.legend_show||c.isLegendRight||c.isLegendInset?0:S},w=f||d?0:o.getHorizontalAxisHeight("x"),$=l.subchart_axis_x_show&&l.subchart_axis_x_tick_text_show?w:30,z=l.subchart_show&&!d?l.subchart_size_height+$:0,B=o.hasType("gauge")&&l.arc_needle_show&&!l.gauge_fullCircle&&!l.gauge_label_show?10:0,W=o.getCurrentPadding(!0);if(c.margin=!d&&f?{top:W.top,right:d?0:W.right+C.right,bottom:C.bottom+W.bottom,left:z+(d?0:W.left)}:{top:(h?0:4)+W.top,right:d?0:W.right+C.right,bottom:B+z+C.bottom+W.bottom,left:d?0:W.left},c.margin=o.getResettedPadding(c.margin),c.margin2=f?{top:c.margin.top,right:NaN,bottom:20+C.bottom,left:o.state.rotatedPadding.left}:{top:c.current.height-z-C.bottom,right:NaN,bottom:$+C.bottom,left:c.margin.left},c.margin3={top:0,right:NaN,bottom:0,left:0},(n=o.updateSizeForLegend)==null||n.call(o,E),c.width=c.current.width-c.margin.left-c.margin.right,c.height=c.current.height-c.margin.top-c.margin.bottom,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c.width2=f?c.margin.left-c.rotatedPadding.left-c.rotatedPadding.right:c.width,c.height2=f?c.height:c.current.height-c.margin2.top-c.margin2.bottom,c.width2<0&&(c.width2=0),c.height2<0&&(c.height2=0),o.hasArcType()){const H=o.hasType("gauge"),Q=l.legend_show&&c.isLegendRight,q=(r=c.hasRadar&&o.cache.get(Oe.radarTextWidth))!=null?r:0;c.arcWidth=c.width-(Q?E.width+10:0)-q,c.arcHeight=c.height-(Q&&!H?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(H?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),H&&!l.gauge_fullCircle&&(c.arcHeight+=c.height-o.getPaddingBottomForGauge()),(s=o.updateRadius)==null||s.call(o)}c.isLegendRight&&d&&(c.margin3.left=c.arcWidth/2+c.radiusExpanded*1.1)}},AA={setCssRule(t,e,n,r){const i=this,{config:s,state:{cssRule:o,style:l}}=i;return s.boost_useCssRule?c=>{c.each(u=>{const f=r&&(r==null?void 0:r.call(i,u)),d=`${t?`.${Tn.shapes+i.getTargetSelectorSuffix(u.id)}`:""}${e}`;e in o&&l.sheet.deleteRule(o[d]),i.state.cssRule[d]=W1(l,d,n.filter(Boolean).map(h=>je(f)&&h.indexOf(":")===-1?`${h}: ${f}`:h||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:ie(t)?t.bind(this):t}};function Ev(t){return typeof t=="string"?new fn([document.querySelectorAll(t)],[document.documentElement]):new fn([b(t)],hr)}function EA(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function CA(t,e,n,r,i){var s;const o=this,{value:l}=t,c=o.isCandlestickType(t),u=ae(l)&&l<0||c&&!((s=o.getCandlestickData(t))!=null&&s._isUp);let{x:f,y:d}=e;const h=4,m=h*2;return r?n==="start"?(f+=u?0:m,d+=h):n==="middle"?(f+=m,d-=m):n==="end"&&(u&&(f-=m),d+=h):(n==="start"?(f+=h,u&&(d+=m*2)):n==="middle"?d-=m:n==="end"&&(f-=h,u&&(d+=m*2)),i&&(d+=u?-17:c?13:7)),{x:f,y:d}}function Cv(t,e){var n;const r=this.config.data_labels_position,{id:i,index:s,value:o}=t;return(n=ie(r)?r.bind(this.api)(e,o,i,s,this.$el.text):(i in r?r[i]:r)[e])!=null?n:0}function IA(t,e,n){var r,i;const s=this,{config:o,$T:l}=s,c=o.axis_rotated,{border:{padding:u="3 5",radius:f=10,stroke:d="#000",strokeWidth:h=1,fill:m="none"}}=o.data_labels,S=jf(u),E=o.data_labels.border!==!0,C=ha(t);let w=Yt(t.previousElementSibling);(w.empty()||((r=w.node())==null?void 0:r.tagName)!=="rect"||!((i=w.attr("class"))!=null&&i.includes(n)))&&(w=Yt(t.parentNode).insert("rect",()=>t).attr("class",`${En.textBorderRect} ${n}`).attr("width",C.width+(E?S.left+S.right:0)).attr("height",C.height+(E?S.top+S.bottom:0)),E&&w.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(w).attr("x",e.x-(E?S.left:0)-(c?0:C.width/2)).attr("y",e.y-(E?S.top:0)-C.height/4*3.2)}function Qc(t=0,e){const n=this,{config:r}=n,i=r[`${e}_label_threshold`]||0;return t>=i}function Iv(){const t=this,{$el:{text:e},config:n}=t;(t.state.arcWidth?t.getArcLabelConfig("image"):n.data_labels.image)&&e.filter(function(){const i=this.previousElementSibling;return i?i.tagName!=="image"||!i.classList.contains(En.textLabelImage):!0}).each(function(i){var s,o,l,c;const u=RA.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const S=Yt(this.parentNode);S==null||S.insert("image",`${(o=(s=this.getAttribute("class"))==null?void 0:s.replace(/(?:^(.)|\s)/g,".$1"))!=null?o:"text"}`).style("opacity","0").attr("href",E=>Pa(f,{ID:"id"in E?E.id:E.data.id})).attr("class",En.textLabelImage).style("pointer-events","none").attr("width",d).attr("height",h).attr("transform",m?`translate(${(l=m.x)!=null?l:0} ${(c=m.y)!=null?c:0})`:null)}})}function RA(t){var e;const n=this,{config:r,state:i}=n,s=i.arcWidth?n.getArcLabelConfig("image"):r.data_labels.image;if(ie(s))return(e=s.call(n.api,t.value,t.id,t.index))!=null?e:{url:"",width:0,height:0,pos:{x:0,y:0}};if(s){const{url:o="",width:l=0,height:c=0,pos:u}=s;return{url:o,width:l,height:c,pos:u}}return null}function Rv(t,e,n){var r;const i=this,{config:s,state:{arcWidth:o,hasTreemap:l}}=i,c=s.axis_rotated,u=Yt(t.previousElementSibling),f=d=>{var h;const m=d.style.opacity!=="0"&&d.style.fillOpacity!=="0";return(o?d.textContent:m)&&((h=this.previousElementSibling)==null?void 0:h.tagName)!=="image"};if(!u.empty()&&((r=u.node())==null?void 0:r.tagName)==="image"){const d=n||ln(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let S=e.x-h,E=e.y-m-d.height/2;c?e.x+=h:(l&&(S=-h,E=-(m*2+d.height)),i.hasType("pie")||i.hasType("polar")||(e.y+=m)),i.$T(u).style("opacity",f(t)?null:"0").attr("x",S).attr("y",E)}}function wA(t){return Kf(t,e=>e,e=>ha(e,!0))}var OA={opacityForText(t){const e=this;return e.isBarType(t)&&!Qc.call(e,Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel()?null:"0"},initText(){const{$el:t}=this;t.main.select(`.${ze.chart}`).append("g").attr("class",En.chartTexts).style("pointer-events",t.funnel||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select(`.${En.chartTexts}`).selectAll(`.${En.chartText}`).data(e.filterNullish(t)).attr("class",l=>`${n(l)}${i(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${En.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",r)},updateText(){const t=this,{$el:e,$T:n,config:r,axis:i}=t,s=t.getClass("text","index"),o=r.data_labels.centered,l=e.main.selectAll(`.${En.texts}`).selectAll(`.${En.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",s).attr("text-anchor",c=>{let f=r[`axis_${i==null?void 0:i.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const d=t.getCandlestickData(c);f=!(d!=null&&d._isUp)}else if(t.isTreemapType(c))return o?"middle":"start";return r.axis_rotated?f?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,u,f){const d=Yt(this);let{value:h}=c;if(t.isBubbleZType(c))h=t.getBubbleZData(h,"z");else if(t.isCandlestickType(c)){const m=t.getCandlestickData(c);m&&(h=m.close)}h=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(d):t.dataLabelFormat(c.id)(h,c.id,c.index,f),ae(h)?this.textContent=h:ci(d,h,void 0,!0)}),Iv.call(t)},updateTextColor(t){const e=this,{config:n}=e,r=n.data_labels_colors,i=e.isArcType(t)&&!e.isRadarType(t)||e.isFunnelType(t)||e.isTreemapType(t)?null:e.color(t);let s;if(je(r))s=r;else if(He(r)){const{id:o}=t.data||t;s=r[o]}else ie(r)&&(s=r.bind(e.api)(i,t));if(e.isCandlestickType(t)&&!ie(r)){const o=e.getCandlestickData(t);if(!(o!=null&&o._isUp)){const l=n.candlestick_color_down;s=He(l)?l[t.id]:l}}return s||i},updateTextBGColor(t,e){const n=this,{$el:{defs:r}}=n;let i="";if(e){const s=je(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),o=r.select(["filter[id*='labels-bg","']"].join(s));if(o.size()&&(i=`url(#${o.attr("id")})`),ie(e)){n.generateTextBGColorFilter(e);const l=n.color(t),c=e.bind(n.api)(l,t);c?o.select("feFlood").attr("flood-color",c):i=""}}return i||null},redrawText(t,e,n,r){const i=this,{$T:s,axis:o,config:l,state:{hasTreemap:c}}=i,u=Ir(!0),f=l.axis_rotated,d=l.data_labels.rotate,h=EA(d),m=d?`rotate(${d})`:"",S=i.$el.text.style("fill",i.getStylePropValue(i.updateTextColor)).attr("filter",w=>i.updateTextBGColor.bind(i)(w,l.data_labels_backgroundColors)).style("fill-opacity",n?0:i.opacityForText.bind(i)),E=new Map,C=[];return S.each(function(w){const $=this;E.set($,{rect:ln($)}),l.data_labels.centered&&(i.isBarType(w)||i.isTreemapType(w))&&C.push($)}),C.length>0&&wA(C).forEach((w,$)=>{const z=E.get($);z&&(z.bbox=w)}),S.each(function(w,$){var z;const B=E.get(this),W=s(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute("x")||this.getAttribute("transform"))),u),H=l[`axis_${o==null?void 0:o.getId(w.id)}_inverted`];let Q={x:t.call(this,w,$,B),y:e.call(this,w,$,B)};d&&(Q=CA.bind(i)(w,Q,h,f,H),W.attr("text-anchor",h)),Rv.call(i,this,Q,B==null?void 0:B.rect),this.childElementCount||d?W.attr("transform",`translate(${Q.x} ${Q.y}) ${m}`):(W.attr("x",Q.x).attr("y",Q.y),c&&((z=this.parentNode)==null||z.removeAttribute("transform"))),l.data_labels.border&&IA.call(i,W.node(),Q,`${En.textBorderRect}-${$}`)}),!0},getTextRect(t,e){var n,r;const i=this;let s,o,l;Array.isArray(t)?s=`${Oe.textRect}-${t.join("_")}`:(o=(r=(n=t.node)==null?void 0:n.call(t))!=null?r:t,/text/i.test(o.tagName)||(o=o.querySelector("text")),l=o.textContent,s=`${Oe.textRect}-${l.replace(/\W/g,"_")}`);const c=i.cache.get(s)||[];return c.length===0&&((i.$el.svg||i.$el.chart.select("svg")).selectAll(`.${ze.dummy}`).data(l?[l]:t).enter().append("text").style("visibility","hidden").style("font",o?Yt(o).style("font"):null).classed(e||ze.dummy,!0).text(u=>u).each(function(u,f){c[f]=ln(this)}).remove(),i.cache.add(s,c)),c.length>1?c:c[0]},generateXYForText(t,e){const n=this,{state:{hasRadar:r,hasFunnel:i,hasTreemap:s}}=n,o=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return i&&o.push("funnel"),r&&o.push("radar"),s&&o.push("treemap"),o.forEach(u=>{l[u]=n[`generateGet${Ln(u)}Points`](t[u],!1)}),function(u,f,d){const h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isCandlestickType(u)&&"candlestick"||n.isFunnelType(u)&&"funnel"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return c.call(n,l[h](u,f),u,this,d)}},getCenteredTextPos(t,e,n,r,i){const s=this,{config:o}=s,l=o.axis_rotated,c=s.isBarType(t),u=s.isTreemapType(t);if(o.data_labels.centered&&(c||u)){const f=(i==null?void 0:i.bbox)||ha(n);if(c){const d=s.getRangedData(t,null,"bar")>=0;if(l){const h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return d?-h-3:h+2}else{const h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return d?h:-h-2}}else if(u){const d=f.y-(n.childElementCount?0:+(n.getAttribute("y")||0));return r==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2-d-f.height/2}}return 0},getXForText(t,e,n,r){var i,s,o;const l=this,{config:c}=l,u=c.axis_rotated,f=l.isFunnelType(e),d=l.isTreemapType(e);let h=t?t[0][0]:0;if(l.isCandlestickType(e))u?h=(i=l.getCandlestickData(e))!=null&&i._isUp?t[2][2]+4:t[2][1]-4:h+=(t[1][0]-h)/2;else if(f)if(t)h=(o=(s=t[2])==null?void 0:s[0])!=null?o:h;else return Ic(n,"x");else if(d)h+=c.data_labels.centered?0:5;else if(u){const m=c[`axis_${l.axis.getId(e.id)}_inverted`],S=l.isBarType(e)?4:6,E=e.value;h=t[2][1],h+=S*((m?E>0:E<0)?-1:1)}else h=l.hasType("bar")?(t[2][0]+t[0][0])/2:h;return(u||d||f)&&(h+=l.getCenteredTextPos(e,t,n,"x",r)),h+Cv.call(this,e,"x")},getYForText(t,e,n,r){var i,s;const o=this,{axis:l,config:c,state:u}=o,f=c.axis_rotated,d=c[`axis_${l==null?void 0:l.getId(e.id)}_inverted`],h=o.isBarType(e),m=o.isFunnelType(e),S=o.isTreemapType(e),E=c.point_r,C=(r==null?void 0:r.rect)||ln(n);let{value:w}=e,$=3,z;if(o.isCandlestickType(e))w=o.getCandlestickData(e),f?(z=t[0][0],z+=(t[1][0]-z)/2+$):(z=w&&w._isUp?t[2][2]-$:t[2][1]+$*4,d&&(z+=15*(w._isUp?1:-1)));else if(m)if(t)z=((s=(i=t[2])==null?void 0:i[1])!=null?s:t[0][1])+C.height/2-3;else return Ic(n,"y");else if(S)z=t[0][1]+(c.data_labels.centered?0:C.height+5);else if(f)z=(t[0][0]+t[2][0]+C.height*.6)/2;else if(z=t[2][1],ae(E)&&E>5&&(o.isLineType(e)||o.isScatterType(e))&&($+=c.point_r/2.3),w<0||w===0&&!u.hasPositiveValue&&u.hasNegativeValue)z+=d?h?-3:-5:C.height+(h?-$:$);else{let B=-$*2;h?B=-$:o.isBubbleType(e)&&(B=$),d&&(B=h?10:15),z+=B}return(!f||S)&&(z+=o.getCenteredTextPos(e,t,n,"y",r)),z+Cv.call(this,e,"y")},markOverlapped(t,e,n){const r=e.$el.arcs.selectAll(n),i=r.filter(f=>f.data.id!==t),s=r.filter(f=>f.data.id===t),o=Cc(s.node()),l=(f,d)=>Math.sqrt(f*f+d*d);if(!s.node())return;const c=parseInt(s.style("font-size"),10),u=[];i.each(function(){const f=Cc(this),d=l(o.e,o.f)>l(f.e,f.f)?s:Yt(this),h=Math.ceil(Math.abs(o.e-f.e))<Math.ceil(d.node().getComputedTextLength()),m=Math.ceil(Math.abs(o.f-f.f))<c;u.push({node:this,overlaps:h&&m})}),u.forEach(({node:f,overlaps:d})=>{Yt(f).classed(En.TextOverlapping,d)})},undoMarkOverlapped(t,e){t.$el.arcs.selectAll(e).each(function(){Ev([this,this.previousSibling]).classed(En.TextOverlapping,!1)})}};function wv(t="left",e){const n=ae(e);return t.includes("center")?n?e/2:"middle":t.includes("right")?n?e:"end":n?0:"start"}function PA(t){var e,n,r,i,s,o,l,c;const{config:u,$el:f}=t,d=((r=(n=(e=t.canvasTheme)==null?void 0:e.style)==null?void 0:n.title)==null?void 0:r.font)||((o=(s=(i=t.canvasTheme)==null?void 0:i.style)==null?void 0:s.label)==null?void 0:o.font)||"14px sans-serif",h=(c=(l=f.chart)==null?void 0:l.node)==null?void 0:c.call(l),m=h==null?void 0:h.ownerDocument;if(h&&m&&u.title_text){const S=m.createElementNS("http://www.w3.org/2000/svg","svg"),E=m.createElementNS("http://www.w3.org/2000/svg","text");S.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",E.setAttribute("class",En.title),E.style.font=d,E.textContent=String(u.title_text),S.appendChild(E),h.appendChild(S);const C=ln(E).height;if(S.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var MA={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const r=n.title.append("text").style("text-anchor",wv(e.title_position)).attr("class",En.title);ci(r,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:r}}=t;if(r){const i=wv(e.title_position,n.width),s=(e.title_padding.top||0)+t.getTextRect(t.$el.title,En.title).height;r.attr("transform",`translate(${i}, ${s})`)}},getCanvasTitleHeight(){return PA(this)},getTitlePadding(){const t=this,{$el:{title:e},config:n,state:r}=t,i=n.title_padding.top||0,s=n.title_padding.bottom||0;if(r.isCanvasMode&&n.title_text)return i+t.getCanvasTitleHeight()+s;if(!(e!=null&&e.node()))return i+s;const o=e.node(),l=Ic(o,"y");if(l){const c=ha(o);return l+c.y+c.height+s}return i+t.getTextRect(e,En.title).height+s}};const LA=/(\r?\n|\t)/g,DA=/{{(.*)}}/;var FA={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=Yt(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",bo.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:r,state:{hasAxis:i,hasRadar:s}}=e;if(n.tooltip_init_show){const o=!(i||s);(t=e.axis)!=null&&t.isTimeSeries()&&je(n.tooltip_init_x)&&(n.tooltip_init_x=Wn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[o?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!lr(l)){const{top:c=0,left:u=50}=l;r.tooltip.style("top",je(c)?c:`${c}px`).style("left",je(u)?u:`${u}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:r}=e;return pr(ie(r.tooltip_contents)?r.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t))},getTooltipContent(t,e,n,r){var i;const s=this,{api:o,config:l,state:c,$el:u}=s,f=l.tooltip_format_title,d=l.tooltip_format_name,h=l.tooltip_format_value,m=ie(f)?f.bind(o):e,S=ie(d)?d.bind(o):(tt=>tt),E=ie(h)?h.bind(o):null,C=(tt,ft,lt,bt)=>{let St=E;return St||(c.hasTreemap||s.isStackNormalized()&&(!s.isStackNormalizedPerGroup()||s.isGrouped(lt))?St=(Mt,Ot)=>`${(Ot*100).toFixed(2)}%`:St=n),St(tt,ft,lt,bt)},w=l.tooltip_order,$=tt=>s.axis&&s.isBubbleZType(tt)?s.getBubbleZData(tt.value,"z"):s.getBaseValue(tt),z=s.levelColor?tt=>s.levelColor(tt.value):tt=>r(tt),B=l.tooltip_contents,W=B.template,H=s.mapToTargetIds();if(w===null&&l.data_groups.length){const tt=s.orderTargets(s.data.targets).map(ft=>ft.id).reverse();t.sort((ft,lt)=>{let bt=ft?ft.value:null,St=lt?lt.value:null;return bt>0&&St>0&&(bt=ft.id?tt.indexOf(ft.id):null,St=lt.id?tt.indexOf(lt.id):null),bt-St})}else if(/^(asc|desc)$/.test(w)){const tt=w==="asc";t.sort((ft,lt)=>{const bt=ft?$(ft):null,St=lt?$(lt):null;return tt?bt-St:St-bt})}else ie(w)&&t.sort(w.bind(o));const Q=s.getTooltipContentTemplate(W),q=t.length;let st,it,ot,ct,gt;for(gt=0;gt<q;gt++){it=t[gt];const tt=it&&$(it);if(!(!it||!(tt||tt===0))){if(mn(st)){const ft=(c.hasAxis||c.hasRadar)&&m(it.x);st=Pa(Q[0],{CLASS_TOOLTIP:bo.tooltip,TITLE:Ge(ft)?W?ft:`<tr><th colspan="2">${ft}</th></tr>`:""})}if(!it.ratio&&u.arcs&&(ot=["arc",s.$el.arcs.select(`path.${Ze.arc}-${it.id}`).data()[0]],it.ratio=s.getRatio(...ot)),ot=[it.ratio,it.id,it.index],s.isAreaRangeType(it)){const[ft,lt]=["high","low"].map(St=>C(s.getRangedData(it,St),...ot));ct=`<b>Mid:</b> ${C($(it),...ot)} <b>High:</b> ${ft} <b>Low:</b> ${lt}`}else if(s.isCandlestickType(it)){const[ft,lt,bt,St,Mt]=["open","high","low","close","volume"].map(Ot=>s.getRangedData(it,Ot,"candlestick")?C(s.getRangedData(it,Ot,"candlestick"),...ot):void 0);ct=`<b>Open:</b> ${ft} <b>High:</b> ${lt} <b>Low:</b> ${bt} <b>Close:</b> ${St}${Mt?` <b>Volume:</b> ${Mt}`:""}`}else if(s.isBarRangeType(it)){const{value:ft,id:lt,index:bt}=it;ct=`${C(ft,void 0,lt,bt)}`}else ct=C($(it),...ot);if(ct!==void 0){if(it.name===null)continue;const ft=S((i=it.name)!=null?i:it.id,...ot),lt=z(it),bt={CLASS_TOOLTIP_NAME:bo.tooltipName+s.getTargetSelectorSuffix(it.id),COLOR:W||!s.patterns?lt:`<svg><rect style="fill:${lt}" width="10" height="10"></rect></svg>`,NAME:ft,VALUE:ct};if(W&&He(B.text)){const St=H.indexOf(it.id);Object.keys(B.text).forEach(Mt=>{bt[Mt]=B.text[Mt][St]})}st+=Pa(Q[1],bt)}}}return`${st}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
|
|
42
|
+
`,Tt.head.appendChild(Hn);try{return v("bb-shapes bb-shapes-canvas-probe","circle",xn,Bn)}finally{Hn.remove()}},N=v("bb-axis bb-axis-x","path","domain",["stroke","stroke-width"]),k=x("bb-axis-x","line",["stroke","stroke-width"]),B=x("bb-axis-x","text",["fill","font"]),G=x("bb-axis-x","text",["fill"],"_active_"),V=x("bb-axis-y","text",["fill","font"]),Z=x("bb-axis-y2","text",["fill","font"]),Y=v("bb-axis bb-axis-x","text","bb-axis-x-label",["fill","font"]),et=v("bb-axis bb-axis-y","text","bb-axis-y-label",["fill","font"]),it=v("bb-axis bb-axis-y2","text","bb-axis-y2-label",["fill","font"]),at=h("circle","",["fill","stroke","stroke-width"]),ot=v("bb-grid","line","bb-ygrid",["stroke","stroke-width","stroke-dasharray"]),st=v("bb-grid","text","",["fill","font"]),_=b("bb-grid","bb-xgrid-focus","line","bb-xgrid-focus",["stroke","stroke-width","stroke-dasharray"]),lt=h("text","bb-text bb-empty",["fill","font"]),nt=v("bb-region","rect","",["fill","fill-opacity"]),dt=v("bb-region","text","",["fill","font"]),bt=h("path","bb-bar",["opacity","fill-opacity","stroke","stroke-width"]),At=h("path","bb-bar _expanded_",["opacity","fill-opacity"]),Et=h("path","bb-candlestick",["stroke","stroke-width"]),Rt=h("path","bb-candlestick _expanded_",["opacity","fill-opacity"]),Vt=h("path","bb-line",["stroke-width"]),ae=v("bb-target bb-focused","path","bb-line",["stroke-width"]),re=h("g","bb-target bb-defocused",["opacity"]),ve=h("path","bb-area",["opacity","fill-opacity"]),xe=h("circle","bb-circle",["fill","stroke","stroke-width"]),ge=h("circle","bb-selected-circle",["fill","stroke","stroke-width"]),Le=w("bb-circle _expanded_",["fill","stroke","stroke-width"]),Yt=h("rect","bb-zoom-brush",["fill","fill-opacity","opacity"]),pe=v("bb-brush","rect","extent",["fill","fill-opacity","opacity"]),be=v("bb-brush","rect","selection",["fill","fill-opacity","opacity"]),Gt=v("bb-brush","path","handle--custom",["fill","fill-opacity","opacity","stroke","stroke-width"]),We=v("bb-chart-treemaps","rect","",["stroke","stroke-width"]),Be=h("text","bb-text",["fill","font"]),cn=v("","text","bb-title",["fill","font"]),hn=ze(Yt.fill,"#000"),Ae=Pe(Yt["fill-opacity"]||Yt.opacity,.1),an=ze(be.fill,ze(pe.fill,hn)),Qa=(c=(l=(o=(s=wi(be["fill-opacity"],1))!=null?s:wi(be.opacity,1))!=null?o:wi(pe["fill-opacity"],1))!=null?l:wi(pe.opacity,1))!=null?c:Ae,Cr=ze(Gt.stroke,"transparent"),sn={axis:{lineColor:ze(N.stroke,"#000"),lineWidth:Pe(N["stroke-width"],1),tickColor:ze(k.stroke,ze(N.stroke,"#000")),tickWidth:Pe(k["stroke-width"],Pe(N["stroke-width"],1)),labelFont:et.font||V.font||"10px sans-serif",xTickFont:B.font||V.font||"10px sans-serif",yTickFont:V.font||"10px sans-serif",y2TickFont:Z.font||V.font||"10px sans-serif",labelColor:ze(V.fill,"#000"),xLabelColor:ze(Y.fill,ze(B.fill,"#000")),yLabelColor:ze(et.fill,ze(V.fill,"#000")),y2LabelColor:ze(it.fill,ze(et.fill,ze(V.fill,"#000"))),activeLabelColor:Ci(G.fill,B.fill)||ze(V.fill,"#000")},grid:{lineColor:ze(ot.stroke,"#aaa"),lineWidth:Pe(ot["stroke-width"],1),dashArray:Cs(ot["stroke-dasharray"]),labelFont:st.font||V.font||"10px sans-serif",labelColor:ze(st.fill,"#aaa")},focusGrid:{lineColor:ze(_.stroke,ze(ot.stroke,"#aaa")),lineWidth:Pe(_["stroke-width"],Pe(ot["stroke-width"],1)),dashArray:Cs(_["stroke-dasharray"]||ot["stroke-dasharray"])},emptyLabel:{font:lt.font||Be.font||V.font||"20px sans-serif",color:ze(lt.fill,"#808080")},region:{fill:ze(nt.fill,"steelblue"),opacity:Pe(nt["fill-opacity"],.1),labelFont:dt.font||V.font||"10px sans-serif",labelColor:ze(dt.fill,"#000")},shape:{barOpacity:Wa(bt,1),barExpandedOpacity:Pe(Wa(At,Wa(bt,1)),Wa(bt,1)),barStrokeColor:ze(bt.stroke,"#000"),barLineWidth:Pe(bt["stroke-width"],0),barConnectLineColor:ze(Vt.stroke,"#000"),barConnectLineWidth:Pe(Vt["stroke-width"],1),candlestickStrokeColor:ze(Et.stroke,"#000"),candlestickLineWidth:Pe(Et["stroke-width"],1),candlestickExpandedOpacity:Pe(Wa(Rt,1),1),lineWidth:Pe(Vt["stroke-width"],1),lineFocusedWidth:Pe(ae["stroke-width"],2),areaOpacity:Wa(ve,.2),targetDefocusedOpacity:Pe(re.opacity,.3),pointFillColor:Ci(xe.fill,at.fill),pointStrokeColor:Ci(xe.stroke,at.stroke),pointLineWidth:wi(xe["stroke-width"],at["stroke-width"])},selectedPoint:{fill:ze(ge.fill,"#fff"),stroke:Ci(ge.stroke),lineWidth:Pe(ge["stroke-width"],2)},focusPoint:{fill:Ci(Le.fill,E),stroke:Ci(Le.stroke,E),lineWidth:Pe(Le["stroke-width"],1)},zoomBrush:{fill:hn,opacity:Ae},subchartBrush:{fill:an,opacity:Qa,handleFill:ze(Gt.fill,"transparent"),handleOpacity:Wa(Gt,1),handleStroke:Cr,handleLineWidth:Pe(Gt["stroke-width"],Cr==="transparent"?0:1)},treemap:{stroke:ze(We.stroke,"#fff"),lineWidth:Pe(We["stroke-width"],1)},label:{font:Be.font||V.font||"10px sans-serif",color:ze(Be.fill,"#000")},title:{font:cn.font||Be.font||V.font||"14px sans-serif",color:ze(cn.fill,"#000")}},Ca=this.extension;Ca&&(sn[Ca.section]=Ca.probe({probeIn:v,probeInNested:b,axisFont:V.font||"10px sans-serif",toColor:ze,toNumber:Pe}));const h3=_2(n,Ca),ee=dr(sn,h3),wa=n==null?void 0:n.axis,g3=!!wa&&Object.prototype.hasOwnProperty.call(wa,"labelColor"),v3=!!wa&&Object.prototype.hasOwnProperty.call(wa,"labelFont");if(ee.axis.lineWidth=Pe(ee.axis.lineWidth,sn.axis.lineWidth),ee.axis.tickWidth=Pe(ee.axis.tickWidth,ee.axis.lineWidth),v3){const xn=wa,Bn=ee.axis.labelFont;xn.xTickFont===void 0&&(ee.axis.xTickFont=Bn),xn.yTickFont===void 0&&(ee.axis.yTickFont=Bn),xn.y2TickFont===void 0&&(ee.axis.y2TickFont=Bn)}if(ee.axis.labelFont=ee.axis.labelFont||sn.axis.labelFont,ee.axis.xTickFont=ee.axis.xTickFont||ee.axis.labelFont,ee.axis.yTickFont=ee.axis.yTickFont||ee.axis.labelFont,ee.axis.y2TickFont=ee.axis.y2TickFont||ee.axis.yTickFont,ee.axis.labelColor=ze(ee.axis.labelColor,sn.axis.labelColor),g3){const xn=ee.axis.labelColor;wa.xLabelColor===void 0&&(ee.axis.xLabelColor=xn),wa.yLabelColor===void 0&&(ee.axis.yLabelColor=xn),wa.y2LabelColor===void 0&&(ee.axis.y2LabelColor=xn)}ee.axis.xLabelColor=ze(ee.axis.xLabelColor,ee.axis.labelColor),ee.axis.yLabelColor=ze(ee.axis.yLabelColor,ee.axis.labelColor),ee.axis.y2LabelColor=ze(ee.axis.y2LabelColor,ee.axis.yLabelColor),ee.axis.activeLabelColor=ze(ee.axis.activeLabelColor,ee.axis.labelColor),ee.grid.lineWidth=Pe(ee.grid.lineWidth,sn.grid.lineWidth),ee.grid.dashArray=Cs(ee.grid.dashArray),ee.focusGrid.lineWidth=Pe(ee.focusGrid.lineWidth,sn.focusGrid.lineWidth),ee.focusGrid.dashArray=Cs(ee.focusGrid.dashArray),ee.region.opacity=Pe(ee.region.opacity,sn.region.opacity),ee.shape.barOpacity=Pe(ee.shape.barOpacity,sn.shape.barOpacity),ee.shape.barExpandedOpacity=Pe(ee.shape.barExpandedOpacity,ee.shape.barOpacity),ee.shape.barLineWidth=Pe(ee.shape.barLineWidth,sn.shape.barLineWidth),ee.shape.barConnectLineWidth=Pe(ee.shape.barConnectLineWidth,sn.shape.barConnectLineWidth),ee.shape.candlestickLineWidth=Pe(ee.shape.candlestickLineWidth,sn.shape.candlestickLineWidth),ee.shape.candlestickStrokeColor=ze(ee.shape.candlestickStrokeColor,sn.shape.candlestickStrokeColor),ee.shape.candlestickExpandedOpacity=Pe(ee.shape.candlestickExpandedOpacity,sn.shape.candlestickExpandedOpacity),ee.shape.lineWidth=Pe(ee.shape.lineWidth,sn.shape.lineWidth),ee.shape.lineFocusedWidth=Pe(ee.shape.lineFocusedWidth,sn.shape.lineFocusedWidth),ee.shape.areaOpacity=Pe(ee.shape.areaOpacity,sn.shape.areaOpacity),ee.shape.targetDefocusedOpacity=Pe(ee.shape.targetDefocusedOpacity,sn.shape.targetDefocusedOpacity),ee.shape.pointLineWidth=wi(ee.shape.pointLineWidth),ee.selectedPoint.lineWidth=Pe(ee.selectedPoint.lineWidth,sn.selectedPoint.lineWidth),ee.focusPoint.lineWidth=Pe(ee.focusPoint.lineWidth,sn.focusPoint.lineWidth),ee.zoomBrush.opacity=Pe(ee.zoomBrush.opacity,sn.zoomBrush.opacity),ee.subchartBrush.opacity=Pe(ee.subchartBrush.opacity,sn.subchartBrush.opacity),ee.subchartBrush.handleOpacity=Pe(ee.subchartBrush.handleOpacity,sn.subchartBrush.handleOpacity),ee.subchartBrush.handleLineWidth=Pe(ee.subchartBrush.handleLineWidth,sn.subchartBrush.handleLineWidth),ee.treemap.lineWidth=Pe(ee.treemap.lineWidth,sn.treemap.lineWidth),(u=Ca==null?void 0:Ca.normalize)==null||u.call(Ca,ee[Ca.section],{toNumber:Pe}),this.style=ee,this.cacheContainer=e,this.cacheKey=Pv(e,n),f.remove()}reload(e,n){const r=Pv(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}getGridLineStyle(e,n={},r="line"){const a={};for(const s of this.gridLineSelectorOverrides)Z2(s.selector,e,n.class,r)&&Iv(a,s.style,this.directGridOverrideKeys);return xu(a).length?a:void 0}}var tC=Object.defineProperty,eC=(t,e,n)=>e in t?tC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sr=(t,e,n)=>eC(t,typeof e!="symbol"?e+"":e,n);const Ga=24,Mv=64,bu=[mr,_n,zn];function Ii(t,e){return Math.floor(t/e)}function Lv(t,e,n){var r,a;const s=Ii(e.x,n),o=Ii(e.x+((r=e.w)!=null?r:0),n),l=Ii(e.y,n),c=Ii(e.y+((a=e.h)!=null?a:0),n);for(let u=s;u<=o;u++)for(let f=l;f<=c;f++){const d=`${u}:${f}`,h=t.get(d);h?h.push(e):t.set(d,[e])}}function Dv(t,e,n,r,a=0){const s=Ii(e,r),o=Ii(n,r),l=[];for(let c=-a;c<=a;c++)for(let u=-a;u<=a;u++){const f=t.get(`${s+c}:${o+u}`);if(f!=null&&f.length)for(let d=0;d<f.length;d++)l.push(f[d])}return l}function nC(t,e){var n,r,a;const s=t.config.point_sensitivity;if(Number.isFinite(s))return s;(n=t.pointR)==null||n.call(t,e);const o=(a=(r=t.getPointSensitivity)==null?void 0:r.call(t,e))!=null?a:Ga;return Number.isFinite(o)?o:Ga}function rC(t,e){return fa(t,e)&&e.values.length>Fd&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class aC{constructor(){Sr(this,"bars",[]),Sr(this,"points",[]),Sr(this,"indices",[]),Sr(this,"barGrid",new Map),Sr(this,"pointGrid",new Map),Sr(this,"plot",{x:0,y:0,w:0,h:0}),Sr(this,"pointCellSize",Ga),Sr(this,"maxPointSensitivity",Ga),Sr(this,"grouped",!1),Sr(this,"pointBased",!1),Sr(this,"indexAxis","x")}rebuild(e,n){var r,a,s,o,l,c,u,f;const{current:d,margin:h,width:v,height:b}=e.state,x=e.filterTargetsToShow();this.bars=[],this.points=[],this.indices=[],this.barGrid=new Map,this.pointGrid=new Map,this.maxPointSensitivity=Ga,this.indexAxis=e.config.axis_rotated?"y":"x",this.plot=e.state.customType||e.state.hasTreemap?{x:0,y:0,w:d.width,h:d.height}:{x:h.left,y:h.top,w:v,h:b},this.grouped=!!e.config.tooltip_grouped&&!e.state.customType&&!e.state.hasTreemap,this.pointBased=!(e.config.axis_x_forceAsSingle&&this.grouped)&&(!!((r=e.isMultipleX)!=null&&r.call(e))||x.some(V=>fa(e,V)||da(e,V)));const w=this.grouped&&(!this.pointBased||e.config.data_selection_enabled&&e.config.data_selection_grouped)?new Map:null,N=(V,Z,Y)=>{var et,it;if(!w)return;const at=(it=(et=e.getXCacheKey)==null?void 0:et.call(e,Y.x))!=null?it:Y.index;Number.isFinite(Y.index)&&!w.has(at)&&ln(V,Z)&&w.set(at,{x:V,y:Z,data:Y})};if(e.state.customType){(o=(s=(a=e.getCustomTypeParts())==null?void 0:a.canvas)==null?void 0:s.hits)==null||o.call(e,this),this.indices=[];return}const k=(l=e.getCanvasTypeParts)==null?void 0:l.call(e).find(V=>V.exclusive);if(k){(c=k.hits)==null||c.call(e,this),this.indices=[];return}if(n.indices[ne.BAR]||x.some(_n.bind(null,e))){const V=_n.bind(null,e),Z=Pn(e,n,ne.BAR,V),Y=e.generateGetBarPoints(Z,!1);x.filter(V).filter(et=>oi(e,et,bu)).forEach(et=>{const it=pr(e,et);for(let at=it.start;at<it.end;at++){const ot=et.values[at];if(!gn(e,ot))continue;const st=ns(e,Y,ot,at);if(!st)continue;const{rect:_}=st,lt=h.left+_.x,nt=h.top+_.y,{w:dt,h:bt}=_;this.addBar({x:lt,y:nt,w:dt,h:bt,data:ot}),N(lt+dt/2,nt+bt/2,ot)}})}if(n.indices[ne.CANDLESTICK]||x.some(zn.bind(null,e))){const V=zn.bind(null,e),Z=Pn(e,n,ne.CANDLESTICK,V),Y=(u=e.generateGetCandlestickPoints)==null?void 0:u.call(e,Z,!1);Y&&x.filter(V).filter(et=>oi(e,et,bu)).forEach(et=>{var it;const at=pr(e,et);for(let ot=at.start;ot<at.end;ot++){const st=et.values[ot];if(!((it=e.getCandlestickData)==null?void 0:it.call(e,st)))continue;const lt=rs(e,Y,st,ot);if(!lt)continue;const{body:nt}=lt,dt=h.left+nt.x,bt=h.top+nt.y,{w:At,h:Et}=nt;this.addBar({x:dt,y:bt,w:Math.max(1,At),h:Math.max(1,Et),data:st}),N(dt+At/2,bt+Et/2,st)}})}(f=e.getAxisTypeParts)==null||f.call(e).forEach(V=>{var Z,Y;return(Y=(Z=V.canvas)==null?void 0:Z.hits)==null?void 0:Y.call(e,this,{shape:n,targets:x,margin:h,addIndex:N})});const{cx:B,cy:G}=n.pos;B&&G&&x.filter(mr.bind(null,e)).filter(V=>oi(e,V,bu)).forEach(V=>{const Z=pr(e,V),Y=rC(e,V)?$d(v,b,e.config.point_r):null;for(let et=Z.start;et<Z.end;et++){const it=V.values[et];if(!gn(e,it))continue;const at=h.left+B(it,et),ot=h.top+G(it,et),st=nC(e,it);ln(at,ot)&&(Y&&!Bd(Y,at-h.left,ot-h.top)||(this.addPoint({x:at,y:ot,sensitivity:st,data:it}),N(at,ot,it)))}}),this.buildPointGrid(),this.indices=w?Array.from(w.values()).sort((V,Z)=>V[this.indexAxis]-Z[this.indexAxis]):[]}hitBar(e,n){for(const r of Dv(this.barGrid,e,n,Mv)){const{w:a=0,h:s=0}=r;if(e>=r.x&&e<=r.x+a&&n>=r.y&&n<=r.y+s&&(!r.hit||r.hit(e,n)))return r.data}return null}hitPoint(e,n){var r,a;let s=null,o=Number.POSITIVE_INFINITY;for(const l of Dv(this.pointGrid,e,n,this.pointCellSize,1)){const c=l.x-e,u=l.y-n,f=Math.sqrt(c*c+u*u),d=(r=l.sensitivity)!=null?r:Ga;f<=d&&f<o&&(o=f,s=l)}return(a=s==null?void 0:s.data)!=null?a:null}findNearest(e,n){const r=this.hitBar(e,n);if(r)return r;if(!this.pointBased&&this.grouped&&this.isWithinPlot(e,n)){const a=this.findNearestIndexItem(e,n);if(a)return a.data}return this.hitPoint(e,n)}findNearestShape(e,n){var r;return(r=this.hitBar(e,n))!=null?r:this.hitPoint(e,n)}findNearestIndexByCoord(e,n){var r,a;return(a=(r=this.findNearestIndexItem(e,n))==null?void 0:r.data)!=null?a:null}findInRect(e,n=!1){const r=Math.min(e.x,e.x+e.w),a=Math.max(e.x,e.x+e.w),s=Math.min(e.y,e.y+e.h),o=Math.max(e.y,e.y+e.h),l=new Set,c=[],u=f=>{const d=f.data,h=`${d.id}:${d.index}`;l.has(h)||(l.add(h),c.push(d))};if(n){const f=this.indexAxis,d=f==="y"?s:r,h=f==="y"?o:a;return this.indices.filter(v=>v[f]>=d&&v[f]<=h).forEach(u),c}return this.bars.filter(f=>{var d,h;const v=(d=f.w)!=null?d:0,b=(h=f.h)!=null?h:0;return!(a<f.x||f.x+v<r)&&!(o<f.y||f.y+b<s)}).forEach(u),this.points.filter(f=>f.x>=r&&f.x<=a&&f.y>=s&&f.y<=o).forEach(u),c}addBar(e){this.bars.push(e),Lv(this.barGrid,e,Mv)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:Ga;this.maxPointSensitivity=Math.max(this.maxPointSensitivity,r),this.points.push(e)}buildPointGrid(){this.pointCellSize=Math.max(1,this.maxPointSensitivity),this.pointGrid=new Map;for(const e of this.points)Lv(this.pointGrid,e,this.pointCellSize)}isWithinPlot(e,n){const{plot:r}=this;return e>=r.x&&e<=r.x+r.w&&n>=r.y&&n<=r.y+r.h}findNearestIndexItem(e,n){const{indexAxis:r,indices:a}=this,s=r==="y"?n:e;if(!a.length)return null;let o=0,l=a.length-1;for(;o<l;){const f=o+l>>1;a[f][r]<s?o=f+1:l=f}const c=a[o],u=a[o-1];return u&&Math.abs(u[r]-s)<Math.abs(c[r]-s)?u:c}}var iC=Object.defineProperty,Fv=Object.getOwnPropertySymbols,sC=Object.prototype.hasOwnProperty,oC=Object.prototype.propertyIsEnumerable,Nv=(t,e,n)=>e in t?iC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rn=(t,e)=>{for(var n in e||(e={}))sC.call(e,n)&&Nv(t,n,e[n]);if(Fv)for(var n of Fv(e))oC.call(e,n)&&Nv(t,n,e[n]);return t};const Oe={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},Ye={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},Yo={area:"bb-area",areas:"bb-areas"},yn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},tr={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},Qr={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},Ln={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},Tu={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},Ha={dragarea:"bb-dragarea",INCLUDED:"_included_"},ws={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},er={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},Ne={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},$r={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},_r={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},Ke={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",xgridFocusContinuous:"bb-xgrid-focus-continuous",ygridFocus:"bb-ygrid-focus"},un={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},qr={level:"bb-level",levels:"bb-levels"},$v={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},Is={region:"bb-region",regions:"bb-regions"},_e={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},nn={shape:"bb-shape",shapes:"bb-shapes"},Bv={brush:"bb-brush",subchart:"bb-subchart"},vn={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},Ko={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},kv={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},Su={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var Se=rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn(rn({},Oe),Ye),Yo),yn),tr),Qr),Ln),Tu),Ha),er),Ne),$r),_r),Ke),un),qr),$v),Is),_e),nn),Bv),vn),Ko),kv),Su),lC={boost_useCssRule:!1,boost_useWorker:!1,boost_workerUrl:void 0},cC={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},uC={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},fC={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,resize_live:!1,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},render_mode:"svg",canvas_theme:{},regions:[]},dC={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},hC={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},gC={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},vC={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},pC=Object.defineProperty,mC=(t,e,n)=>e in t?pC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yC=(t,e,n)=>mC(t,typeof e!="symbol"?e+"":e,n);const zv=class Jx{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return _a(fC,lC,gC,cC,vC,uC,dC,hC,Jx.data)}};yC(zv,"data",{});let Br=zv;class xC{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null,subY:null,subY2:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class bC{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,customType:null,hasRadar:!1,hasTreemap:!1,isCanvasMode:!1,canvasShape:null,canvasFocusKey:null,canvasFocusData:null,canvasSubchartBrushDragging:!1,canvasSubchartBrushMode:null,canvasSubchartBrushStart:null,canvasSubchartBrushOrigin:null,canvasSubchartBrushMoved:!1,canvasFlowFrame:null,canvasFlowFinish:null,canvasFocusMainRedraw:!1,cssRule:{},loading:void 0,domain:void 0,subchartSourceTypes:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,canvasInlineStyle:{minHeight:""},canvasSelection:new Set,canvasSelectionDragStart:null,canvasSelectionDragIncluded:new Set,canvasSelectionDragging:!1,canvasSelectionDragMoved:!1,canvasSelectionDragMoveHandler:null,canvasSelectionDragEndHandler:null,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,resizePreview:!1,resizeRedrawTime:0,resizeLiveScale:null,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:new Set,hiddenLegendIds:new Set,focusedTargetIds:new Set,defocusedTargetIds:new Set,radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[],dirty:{data:!1,visibility:!1,size:!1},redrawGeneration:0,dataGeneration:0,_targetsToShow:null,_cachedDrawShape:null,_canvasVisibleRangeCache:null,_canvasXDataTickCache:null,_canvasXTickValuesCache:null,_eventRectFingerprint:null,_lastTooltipMouse:null,_gridFocusEl:null,generateClassCache:new Map}}}const Uv={element:xC,state:bC};class TC{constructor(){Object.keys(Uv).forEach(e=>{this[e]=new Uv[e]})}getStore(e){return this[e]}}var SC=Object.defineProperty,AC=(t,e,n)=>e in t?SC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EC=(t,e,n)=>AC(t,typeof e!="symbol"?e+"":e,n);const Me={bubbleBaseLength:"$baseLength",bubbleMaxValue:"$bubbleMaxValue",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",visibleTotalPerIndex:"$visibleTotalPerIndex",domainMinMax:"$domainMinMax",filteredTargets:"$filteredTargets",svgLeft:"$svgLeft",valuesByX:"$valuesByX",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset",maxTickSize:"$maxTickSize",maxDataCountTarget:"$maxDataCountTarget",valuesXIndexMap:"$valuesXIndexMap"};class CC{constructor(){EC(this,"cache",new Map)}add(e,n,r=!1){const a=r?this.cloneTarget(n):n;return this.cache.set(e,a),a}remove(e){const n=$(e)?[e]:e;for(let r=0;r<n.length;r++)this.cache.delete(n[r])}get(e,n=!1){if(n&&Array.isArray(e)){const r=[];for(let a=0,s;s=e[a];a++)this.cache.has(s)&&r.push(this.cache.get(s));return r}else return this.cache.has(e)?this.cache.get(e):null}has(e){return this.cache.has(e)}getKeys(){return Array.from(this.cache.keys())}reset(e,n){e?this.cache.clear():this.cache.forEach((r,a)=>{/^\$/.test(a)&&(n!=null&&n.some(s=>a.startsWith(s))||this.cache.delete(a))})}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const Au="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function wC(t){const e=t,{config:n}=e,r=(tt(n.data_types)?[n.data_type]:Object.values(n.data_types)).filter(s=>!tt(s)),a=(r.length?r:["line"]).find(s=>Dd[s]&&!e[Dd[s]]);a&&Cu(`Please, make sure if %c${Yi(a)}`,"module has been imported and specified correctly.",Au)}function Eu(t,e){return t[e]||Cu(`Please, make sure if the module of %c${e}`,`is imported for render.mode='${t.config.render_mode}'. The modules of "billboard.js/canvas" draw only with render.mode='canvas'.`,Au),t[e]}function kN(t){const e=ab[t];e&&Cu(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",Au)}function Cu(t,e,n){var r;const a="[billboard.js]";if((r=yt.console)==null?void 0:r.error){const o=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${a} ${t}`,"background:red;color:white;display:block;font-size:15px",...o),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${a} ${t.replace(/\%c([a-z-]+)/i,"'$1'")}${e?` ${e}`:""}`)}const IC=/\s?(bb-)/g,RC=/\.+/g;function OC(t){return t.replace(IC,".$1").replace(RC,".")}function Wv(t,e,n=!1){const r=s=>s[t?"getBoundingClientRect":"getBBox"](),a=t?"rectClient":"rectBBox";return n?r(e):!(a in e)||e.hasAttribute("width")&&e[a].width!==+(e.getAttribute("width")||0)?e[a]=r(e):e[a]}function Ri(t,e,n=[-1,1],r=!1){if(!(!t||!$(e)))if(e.indexOf(`
|
|
43
|
+
`)===-1)t.text(e);else{const a=[t.text(),e].map(s=>s.replace(/[\s\n]/g,""));if(a[0]!==a[1]){const s=e.split(`
|
|
44
|
+
`),o=r?s.length-1:1;t.html(""),s.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*o:n[1]}em`).text(l)})}}}function Gv(t){const{x:e,y:n,width:r,height:a}=ba(t,!0);return[{x:e,y:n+a},{x:e,y:n},{x:e+r,y:n},{x:e+r,y:n+a}]}function Hv(t){const{width:e,height:n}=en(t),r=Gv(t),a=r[0].x,s=Math.min(r[0].y,r[1].y);return{x:a,y:s,width:e,height:n}}function Zn(t,e){var n;const r=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let a=[0,0];try{a=qn(r||t,e)}catch(s){}return a.map(s=>isNaN(s)?0:s)}function en(t,e=!1){return Wv(!0,t,e)}function ba(t,e=!1){return Wv(!1,t,e)}function PC(t,e,n){const{rootSelector:r="",sheet:a}=t,s=`${r} ${OC(e)} {${n.join(";")}}`;return a[a.insertRule?"insertRule":"addRule"](s,a.cssRules.length)}function MC(t){let e=[];return t.forEach(n=>{var r;try{n.cssRules&&n.cssRules.length&&(e=e.concat(Rn(n.cssRules)))}catch(a){(r=yt.console)==null||r.warn(`Error while reading rules from ${n.href}: ${String(a)}`)}}),e}function Xv(t){var e,n,r,a,s,o;return{x:((n=(e=yt.pageXOffset)!=null?e:yt.scrollX)!=null?n:0)+((r=t.scrollLeft)!=null?r:0),y:((s=(a=yt.pageYOffset)!=null?a:yt.scrollY)!=null?s:0)+((o=t.scrollTop)!=null?o:0)}}function Rs(t,e=0,n=0,r=!0){const a=new DOMPoint(e,n),s=t.getScreenCTM(),o=a.matrixTransform(r?s==null?void 0:s.inverse():s);if(r===!1){const l=en(t);o.x-=l.x,o.y-=l.y}return o}function wu(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Os(t,e){var n;const r=(n=t==null?void 0:t.getAttribute)==null?void 0:n.call(t,e);if(r)return parseFloat(r);const a=wu(t);return e==="x"?a.e:a.f}function Iu(t){const e=t.attr("viewBox");return e?e.trim().split(/[\s,]+/).length===4:!1}function LC(t,e,n=!1){const r=!!t.node;let a=!1;for(const[s,o]of Object.entries(e))if(a=r?t.style(s)===o:t.style[s]===o,n?!a:a)break;return a}function Ps(){var t,e;return((t=Tt)==null?void 0:t.hidden)===!1||((e=Tt)==null?void 0:e.visibilityState)==="visible"}function DC(t,e){const{DocumentTouch:n,matchMedia:r,navigator:a}=yt,s=r==null?void 0:r("(pointer:coarse)").matches;let o=!1;if(e)if(a&&"maxTouchPoints"in a)o=a.maxTouchPoints>0;else if("ontouchmove"in yt||n&&Tt instanceof n)o=!0;else if(s)o=!0;else{const c=a.userAgent;o=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!s&&(r==null?void 0:r("(pointer:fine)").matches)&&"mouse"||o&&"touch"||"mouse"}function Vv(t,e){t.pendingRaf!==null?(yt.cancelAnimationFrame(t.pendingRaf),t.pendingRaf=yt.requestAnimationFrame(()=>{t.pendingRaf=null,e()})):(t.pendingRaf=yt.requestAnimationFrame(()=>{t.pendingRaf=null}),e())}const Ru={mouse:(()=>{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,r=t())=>{e.dispatchEvent(new MouseEvent(n,r))}}catch(e){return(n,r,a=t())=>{const s=Tt.createEvent("MouseEvent");s.initMouseEvent(r,a.bubbles,a.cancelable,yt,0,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(s)}}})(),touch:(t,e,n)=>{const r=new Touch(dr({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},{setTimeout:FC,clearTimeout:NC}=yt;function $C(t,e){const n=[];let r,a=null;const s=function(){s.clear(),e&&a===null&&(a=Ot(()=>{a=null,e()})),t===!1?r=Kt(()=>{r=null,n.forEach(o=>o())},{timeout:200}):r=FC(()=>{r=null,n.forEach(o=>o())},D(t)?t:200)};return s.clear=()=>{r&&((t===!1?qt:NC)(r),r=null)},s.clearLive=()=>{a!==null&&(Bt(a),a=null)},s.add=o=>n.push(o),s.remove=o=>{const l=n.indexOf(o);l!==-1&&n.splice(l,1)},s}function jv(){let t=[];const e=function(n,r){function a(){var s;let o=0;for(let l=0,c;c=t[l];l++){if(c===!0||(s=c.empty)!=null&&s.call(c)){o++;continue}if(Ps()===!1){o=t.length;break}try{c.transition()}catch(u){o++}}return o===t.length}Oa(()=>{r==null||r()},a)};return e.add=function(n){q(n)?t=t.concat(n):t.push(n)},e}const kr={},Zo=new Set,Xa=new Map,BC=5e3,Yv=3;let kC=0;function zC(){try{return"var bbWorker=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=[];return e.forEach(function(e,n){let r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function n(e){let t=e[0],n=[];return e.forEach(function(e,r){if(r>0){let i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function r(e,r){let i=[],a,o;if(Array.isArray(e)){let t=function(e,t){if(e[t]!==void 0)return e[t];let n=t.replace(/\\[(\\w+)\\]/g,`.$1`).replace(/^\\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&typeof r==`object`&&e in r?r[e]:void 0)}),r};a=r.x?r.value.concat(r.x):r.value,i.push(a),e.forEach(function(e){let n=a.map(function(n){let r=t(e,n);return r===void 0&&(r=null),r});i.push(n)}),o=n(i)}else Object.keys(e).forEach(function(t){let n=[].concat(e[t]);n.unshift?.(t),i.push(n)}),o=t(i);return o}let i={columns:t,json:r,rows:n},a=self;function o({data:e}){let{args:t,id:n,op:r}=e;try{let e=i[r];if(!e)throw Error(`Unknown worker op: ${r}`);a.postMessage({id:n,result:e(...t)})}catch(e){a.postMessage({id:n,error:e&&(e.message||e.name)||String(e)})}}return typeof window>`u`&&(a.onmessage=o),e.handleMessage=o,e.ops=i,e})({});"}catch(t){return""}}function Ou(){const{Blob:t,Worker:e,URL:n}=yt;return e&&t&&(n!=null&&n.createObjectURL)&&(n!=null&&n.revokeObjectURL)?{Blob:t,Worker:e,URL:n}:null}function Kv(){return yt.Worker||null}function UC(t){var e,n;return typeof t=="number"?{timeout:t,workerUrl:""}:{timeout:(e=t==null?void 0:t.timeout)!=null?e:BC,workerUrl:(n=t==null?void 0:t.workerUrl)!=null?n:""}}function Zv(t,e=!1){var n,r;const a=kr[t];e&&Zo.add(t),a&&((n=a.worker)==null||n.terminate(),a.revoke&&((r=Ou())==null||r.URL.revokeObjectURL(a.src)),delete kr[t]);for(const s of Xa.keys())s.startsWith(`${t}:`)&&Xa.delete(s)}function WC(t,e){if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return!0}}function GC(t){const[e,...n]=t;return Array.isArray(e)?[e.slice(0,Yv).map(r=>Array.isArray(r)?r.slice(0,Yv+1):r),...n]:t}function Jv(t,e,n,r){const a=++kC;let s=!1,o;const l=new Promise((c,u)=>{const f=(b,x)=>{s||(s=!0,o(),b(x))},d=function(b){var x;((x=b.data)==null?void 0:x.id)===a&&(b.data.error?f(u,new Error(b.data.error)):f(c,b.data.result))},h=function(){f(u,new Error("worker error"))},v=setTimeout(()=>f(u,new Error("worker timeout")),r);o=()=>{clearTimeout(v),t.removeEventListener("message",d),t.removeEventListener("error",h)},t.addEventListener("message",d),t.addEventListener("error",h)});try{t.postMessage({args:n,id:a,op:e})}catch(c){throw s=!0,o(),c}return l}function HC(t,e,n,r,a,s){const o=GC(a),l=Jv(t,n,o,s).then(c=>WC(c,r(...o)),()=>!1).then(c=>(c?Xa.set(e,!0):Xa.delete(e),c));return Xa.set(e,l),l}function XC(t,e=""){const n=!!Kv(),r=e?null:Ou(),a=e?"":zC(),s=e||"blob";if(!n||!e&&(!r||!a)||Zo.has(s))return null;if(!(s in kr))try{if(e)kr[s]={revoke:!1,src:e,worker:null};else if(r){const o=new r.Blob([a],{type:"text/javascript"});kr[s]={revoke:!0,src:r.URL.createObjectURL(o),worker:null}}}catch(o){return null}return{key:s,src:kr[s].src}}function VC(t,e){const n=kr[t],r=Kv();if(!n||!r||Zo.has(t))return null;if(!n.worker)try{n.worker=new r(e)}catch(a){return Zv(t,!0),null}return n.worker}function Pu(t=!0,e,n,r,a){const{timeout:s,workerUrl:o}=UC(a),l=function(...u){const f=n(...u);r(f)};let c=l;if(t){const u=XC(e,o),f=u?VC(u.key,u.src):null;if(f&&u){const{key:d}=u;c=function(...h){var v;const b=()=>{Zv(d,!0),c=l,l(...h)};try{const x=`${d}:${e}`,E=(v=Xa.get(x))!=null?v:HC(f,x,e,n,h,s);Jv(f,e,h,s).then(w=>{E===!0?r(w):E.then(N=>N?r(w):b())},b)}catch(x){b()}}}}return c}function jC(){const t=Ou();for(const e in kr){const n=kr[e];n.worker&&n.worker.terminate(),n.src&&n.revoke&&(t==null||t.URL.revokeObjectURL(n.src)),delete kr[e]}Zo.clear(),Xa.clear()}const Mu=34,Ms=10,Lu=13;function Qv(t){const e=t.charCodeAt(0);function n(a,s){const o=[];let l=a.length,c=0,u=0,f=l<=0,d=!1;a.charCodeAt(0)===65279&&c++,a.charCodeAt(l-1)===Ms&&--l,a.charCodeAt(l-1)===Lu&&--l;function h(){if(f)return null;if(d)return d=!1,null;const b=c;let x,E;if(a.charCodeAt(b)===Mu){for(;++c<l;)if(a.charCodeAt(c)===Mu){if(a.charCodeAt(c+1)!==Mu)break;c++}return(E=c++)>=l?f=!0:(x=a.charCodeAt(c++))===Ms?d=!0:x===Lu&&(d=!0,a.charCodeAt(c)===Ms&&++c),a.slice(b+1,E).replace(/""/g,'"')}for(;c<l;){if((x=a.charCodeAt(E=c++))===Ms)d=!0;else if(x===Lu)d=!0,a.charCodeAt(c)===Ms&&++c;else if(x!==e)continue;return a.slice(b,E)}return f=!0,a.slice(b,l)}let v;for(;(v=h())!==null;){const b=[];for(;v!==null;)b.push(v),v=h();if(s){const x=s(b,u++);x!=null&&o.push(x)}else o.push(b)}return o}function r(a,s){let o=[];return n(a,(l,c)=>{var u;if(c===0)return o=l,null;const f={};for(let d=0;d<o.length;d++)f[o[d]]=(u=l[d])!=null?u:"";return s?s(f,c-1,o):f})}return{parse:r,parseRows:n}}const _v=Qv(","),qv=Qv(" "),YC=_v.parse,KC=_v.parseRows,ZC=qv.parse,JC=qv.parseRows;function tp(t){const e=[];return t.forEach(function(n,r){const a=n[0];n.forEach(function(s,o){if(o>0){if(typeof e[o-1]=="undefined"&&(e[o-1]={}),typeof s=="undefined")throw new Error(`Source data is missing a component at (${r}, ${o})!`);e[o-1][a]=s}})}),e}function ep(t){const e=t[0],n=[];return t.forEach(function(r,a){if(a>0){const s={};r.forEach(function(o,l){if(typeof o=="undefined")throw new Error(`Source data is missing a component at (${a}, ${l})!`);s[e[l]]=o}),n.push(s)}}),n}function np(t,e){const n=[];let r,a;if(Array.isArray(t)){const s=function(o,l){if(o[l]!==void 0)return o[l];const u=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let f=o;return u.some(function(d){return!(f=f&&typeof f=="object"&&d in f?f[d]:void 0)}),f};e.x?r=e.value.concat(e.x):r=e.value,n.push(r),t.forEach(function(o){const l=r.map(function(c){let u=s(o,c);return typeof u=="undefined"&&(u=null),u});n.push(l)}),a=ep(n)}else Object.keys(t).forEach(function(s){var o;const l=[].concat(t[s]);(o=l.unshift)==null||o.call(l,s),n.push(l)}),a=tp(n);return a}function QC(t,e="csv",n,r,a){const s=new XMLHttpRequest,o={csv:_C,tsv:qC,json:np};s.open("GET",t),n&&Object.keys(n).forEach(function(l){s.setRequestHeader(l,n[l])}),s.onreadystatechange=function(){if(s.readyState===4)if(s.status===200){const l=s.responseText;l&&a.call(this,o[e](e==="json"?JSON.parse(l):l,r))}else throw new Error(`${t}: Something went wrong loading!`)},s.send()}function rp(t,e){const n=t.rows(e);let r;return n.length===1?(r=[{}],n[0].forEach(a=>{r[0][a]=null})):r=t.parse(e),r}function _C(t){return rp({rows:KC,parse:YC},t)}function qC(t){return rp({rows:JC,parse:ZC},t)}const tw=5e3;function ew(t){var e,n;const r=t[0];if(q(r)){let a=0;for(let s=0,o=t.length;s<o;s++)a+=(n=(e=t[s])==null?void 0:e.length)!=null?n:0;return a}return t.length*Object.keys(r!=null?r:{}).length}function ap(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function nw(t,e,n){const r=this,{config:a}=r;let s;t.forEach(o=>{const l=r.getXKey(o);if(n.customX||n.timeSeries?n.xs.indexOf(l)>=0?s=(n.appendXs&&r.data.xs[o]||[]).concat(e.map((c,u)=>{const f=c[l];return L(f)?r.generateTargetX(f,o,u):!1}).filter(c=>c!==!1)):a.data_x?s=this.getOtherTargetXs():J(a.data_xs)&&(s=r.getXValuesOfXKey(l,r.data.targets)):s=e.map((c,u)=>u),s)r.data.xs[o]=s;else throw new Error(`x is not defined for id = "${o}".`)})}var rw={convertData(t,e){const{config:n}=this,r=o=>!(o!=null&&o.length)||tt(o[0])?!1:n.boost_useWorker==="auto"?ew(o)>=tw:!!n.boost_useWorker,a=n.boost_workerUrl?{workerUrl:n.boost_workerUrl}:void 0;let s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","rows","columns"].forEach(o=>{const l=`data_${o}`;l in t&&(s[o]=t[l])})),s.url&&e)QC(s.url,s.mimeType,s.headers,ap(s.keys,n),e);else if(s.json)Pu(r(s.json),"json",np,e,a)(s.json,ap(s.keys,n));else if(s.rows)Pu(r(s.rows),"rows",ep,e,a)(s.rows);else if(s.columns)Pu(r(s.columns),"columns",tp,e,a)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:r,config:a,state:s}=n,o=a.data_type,l=Object.keys(t[0]||{}),{ids:c,xs:u}=l.length?l.reduce((b,x)=>(n.isX.call(n,x)?b.xs.push(x):b.ids.push(x),b),{ids:[],xs:[]}):{ids:[],xs:[]},f={appendXs:e,xs:u,categorized:r==null?void 0:r.isCategorized(),timeSeries:r==null?void 0:r.isTimeSeries(),customX:r==null?void 0:r.isCustomX()};nw.bind(n)(c,t,f);const d=f.customX&&f.categorized&&a.axis_x_categories.length?new Map(a.axis_x_categories.map((b,x)=>[b,x])):null,h=a.data_idConverter.bind(n.api),v=c.map((b,x)=>{const E=h(b),w=n.getXKey(b),N=f.customX&&f.categorized,k=N&&x===0&&(()=>{const V=ti(a.axis_x_categories);return t.every(Z=>V.has(Z[w]))})(),B=t.__append__,G=w===null&&B?n.api.data.values(b).length:0;return{id:E,id_org:b,values:t.map((V,Z)=>{var Y;const et=V[w];let it=V[b],at;if(it=it!==null&&!isNaN(it)&&!rt(it)?+it:q(it)||rt(it)?it:null,(N||s.hasRadar)&&x===0&&!z(et)){!k&&Z===0&&!B&&(a.axis_x_categories=[],d&&d.clear());const ot=String(et);at=(Y=d==null?void 0:d.get(ot))!=null?Y:-1,at===-1&&(at=a.axis_x_categories.length,a.axis_x_categories.push(et),d==null||d.set(ot,at))}else at=n.generateTargetX(et,b,G+Z);return(z(it)||n.data.xs[b].length<=Z)&&(at=void 0),{x:at,value:it,id:E,index:-1}}).filter(V=>H(V.x))}});if(v.forEach(b=>{var x;a.data_xSort&&(b.values=b.values.sort((E,w)=>{const N=E.x||E.x===0?E.x:1/0,k=w.x||w.x===0?w.x:1/0;return N-k})),b.values.forEach((E,w)=>E.index=w),(x=n.data.xs[b.id])==null||x.sort((E,w)=>E-w)}),s.hasNegativeValue=v.some(b=>b.values.some(x=>x.value!==null&&x.value<0)),s.hasPositiveValue=v.some(b=>b.values.some(x=>x.value!==null&&x.value>0)),o&&n.isValidChartType(o)){const b=n.mapToIds(v).filter(x=>!(x in a.data_types)||!n.isValidChartType(a.data_types[x]));n.setTargetType(b,o)}return v.forEach(b=>n.cache.add(b.id_org,b,!0)),v}};const aw={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};function ip(t){return q(t)?t:[t]}var iw={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,a=J(n.data_xs)&&Fe(n.data_xs,t);return r||a},isStackNormalized(){const{config:t}=this;return!!((t.data_stack_normalize===!0||K(t.data_stack_normalize))&&t.data_groups.length)},isStackNormalizedPerGroup(){var t;const{config:e}=this;return!!(K(e.data_stack_normalize)&&((t=e.data_stack_normalize)!=null&&t.perGroup)&&e.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},hasAxisGroupedData(t){const e=this,{axis:n}=e;return e.data.targets.filter(s=>n.getId(s.id)===t).map(s=>s.id).some(s=>e.isGrouped(s))},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:J(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,r=e&&J(e)?n.mapToIds(e):[];let a;return r.forEach(s=>{n.getXKey(s)===t&&(a=n.data.xs[s])}),a},getIndexByX(t,e){const n=this;return e?e.indexOf($(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&L(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs(t){const e=this,{config:n}=e;Object.keys(t).forEach(r=>{n.data_xs[r]=t[r]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(J(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let r;return t&&(r=n.data_names[t.id],t.name=r!==void 0?r:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let r=n.filterTargetsToShow(n.data.targets).map(a=>n.addName(n.getValueOnIndex(a.values,t)));return e&&(r=r.filter(a=>a&&"value"in a&&L(a.value))),r},getValueOnIndex(t,e){var n;if(((n=t[e])==null?void 0:n.index)===e)return t[e];const r=t.filter(a=>a.index===e);return r.length?r[0]:null},updateTargetX(t,e){const n=this;t.forEach(r=>{r.values.forEach((a,s)=>{a.x=n.generateTargetX(e[s],r.id,s)}),n.data.xs[r.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(r=>{e[r.id]&&n.updateTargetX([r],e[r.id])})},generateTargetX(t,e,n){const r=this,{axis:a}=r;let s=a!=null&&a.isCategorized()?n:t||n;if(a!=null&&a.isTimeSeries()){const o=bn.bind(r);s=o(t||r.getXValue(e,n))}else a!=null&&a.isCustomX()&&!(a!=null&&a.isCategorized())&&(s=L(t)?+t:r.getXValue(e,n));return s},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return H(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return H(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:r}=t;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n=1/0,r=-1/0;const a=t||this.data.targets.map(s=>s.values);for(let s=0;s<a.length;s++){const o=a[s];for(let l=0;l<o.length;l++){const c=e(o[l]);D(c)&&(c<n&&(n=c),c>r&&(r=c))}}return{min:n,max:r}},getMinMaxData(){const t=this,e=Me.dataMinMax;let n=t.cache.get(e);if(!n){const r=t.data.targets.map(u=>u.values),a=t.getMinMaxValue(r),s=[],o=[],{min:l,max:c}=a;r.forEach(u=>{const f=t.getFilteredDataByValue(u,l),d=t.getFilteredDataByValue(u,c);if(f.length)for(let h=0;h<f.length;h++)s.push(f[h]);if(d.length)for(let h=0;h<d.length;h++)o.push(d[h])}),t.cache.add(e,n={min:s,max:o})}return n},getTotalPerIndex(t){const e=this,{config:n}=e,r=t?`${Me.dataTotalPerIndex}-${t}`:Me.dataTotalPerIndex,a=e.cache.get(r);let s=(a==null?void 0:a.generation)===e.state.dataGeneration?a.value:null;if((e.config.data_groups.length||e.isStackNormalized())&&!s){s=[];let{targets:o}=e.data;if(e.isStackNormalizedPerGroup()&&t){const l=n.data_groups.find(c=>c.indexOf(t)>=0);if(l)o=o.filter(c=>l.indexOf(c.id)>=0);else return null}o.forEach(l=>{l.values.forEach((c,u)=>{s[u]||(s[u]=0),s[u]+=D(c.value)?c.value:0})}),e.cache.add(r,{generation:e.state.dataGeneration,value:s})}return s},getVisibleTotalPerIndex(t){const e=this,{api:n,config:r,state:a,cache:s}=e;let o=s.get(Me.visibleTotalPerIndex);if((!o||o.generation!==a.dataGeneration)&&(o=s.add(Me.visibleTotalPerIndex,{generation:a.dataGeneration,values:new Map})),o.values.has(t))return o.values.get(t);const l=n.data.values.bind(n),{hiddenTargetIds:c}=a;let u=e.getTotalPerIndex(t);if(u===null)return o.values.set(t,u),u;if(c.size){let f=[...c];if(t){const d=r.data_groups.find(h=>h.indexOf(t)>=0);d&&(f=f.filter(h=>d.indexOf(h)>=0))}if(f.length){let d=l(f,!1);d.length&&(d=d.reduce((h,v)=>h.map((b,x)=>(D(b)?b:0)+v[x])),u=u.map((h,v)=>h-d[v]))}}return o.values.set(t,u),u},getTotalDataSum(t){const e=this,n=Me.dataTotalSum;let r=e.cache.get(n);return D(r)||(r=e.data.targets.reduce((a,s)=>a+s.values.reduce((o,l)=>{var c;return o+((c=l.value)!=null?c:0)},0),0),e.cache.add(n,r)),t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let r=0;return n.size&&(r=e.data.values.bind(e)([...n]).reduce((a,s)=>a+s,0)),r},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){const{targets:t}=this.data;let e=0;for(let n=0;n<t.length;n++)t[n].values.length>e&&(e=t[n].values.length);return e},getMaxDataCountTarget(){const t=this,{cache:e,state:n}=t,r=e.get(Me.maxDataCountTarget);if(r&&r.generation===n.dataGeneration)return r.value;let a=t.filterTargetsToShow()||[];const s=a.length,o=t.config.axis_x_inverted;if(s>1){const l=[];for(let c=0;c<a.length;c++){const u=a[c].values;for(let f=0;f<u.length;f++)l.push(u[f].x)}a=l,a=wr(qa(a)).map((c,u,f)=>({x:c,index:o?f.length-u-1:u}))}else s&&(a=a[0].values.concat());return e.add(Me.maxDataCountTarget,{value:a,generation:n.dataGeneration}),a},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?q(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let r=0,a;a=n[r];r++)if(a===e)return!0;return!1},isTargetToShow(t){return!this.state.hiddenTargetIds.has(t)},isLegendToShow(t){return!this.state.hiddenLegendIds.has(t)},getTargetsToShow(){var t;const{state:e}=this;return(t=e._targetsToShow)!=null?t:this.filterTargetsToShow()},filterTargetsToShow(t){const e=this;if(!t){const{cache:n,data:r,state:a}=e,s=Me.filteredTargets,o=n.get(s);if(o&&o.generation===a.dataGeneration)return o.value;const l=r.targets.filter(c=>e.isTargetToShow(c.id));return n.add(s,{value:l,generation:a.dataGeneration}),l}return t.filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let r=[];return t!=null&&t.length&&(r=qa(kl(t.map(a=>a.values.map(s=>+s.x)))),r=n!=null&&n.isTimeSeries()?r.map(a=>new Date(+a)):r.map(Number)),wr(r)},addTargetIds(t,e){const{state:n}=this;ip(e).forEach(r=>n[t].add(r))},removeTargetIds(t,e){const{state:n}=this;ip(e).forEach(r=>n[t].delete(r))},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t),this.cache.remove(Me.visibleTotalPerIndex)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t),this.cache.remove(Me.visibleTotalPerIndex)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,r={},a=e.isMultipleX();let s=null;if(a){const o=e.cache.get(Me.valuesXIndexMap);if(o&&o.generation===e.state.dataGeneration)s=o.value;else{const l=e.mapTargetsToUniqueXs(e.data.targets).map(c=>$(c)?c:+c);s=new Map(l.map((c,u)=>[c,u])),e.cache.add(Me.valuesXIndexMap,{value:s,generation:e.state.dataGeneration})}}return t.forEach(o=>{var l,c;const u=[],f=(c=(l=e.getAxisTypeHooks)==null?void 0:l.call(e,o))==null?void 0:c.domainValues;o.values.filter(({value:d})=>L(d)||d===null).forEach(d=>{let{value:h}=d;if(f&&(h=f(e,d)),h!==null&&e.isCandlestickType(d)&&(h=q(h)?h.slice(0,4):[h.open,h.high,h.low,h.close]),q(h))u.push(...h);else if(rt(h)&&"high"in h)u.push(...Object.values(h));else if(e.isBubbleZType(d))u.push(n&&e.getBubbleZData(h,"y"));else if(a&&s){const v=$(d.x)?d.x:+d.x,b=s.get(v);b!==void 0&&(u[b]=h)}else u.push(h)}),r[o.id]=u}),r},hasMultiTargets(){return this.filterTargetsToShow().length>1},orderTargets(t){const e=this,n=t.slice(),r=e.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,r=n.data_order,a=/asc/i.test(r),s=/desc/i.test(r);let o;if(a||s){const l=(f,d)=>f+Math.abs(d.value),c=new WeakMap,u=f=>D(f)?f:(c.has(f)||c.set(f,"values"in f?f.values.reduce(l,0):f.value),c.get(f));o=(f,d)=>{const h=u(f),v=u(d);return t?a?h-v:v-h:a?v-h:h-v}}else M(r)&&(o=r.bind(e.api));return o||null},filterByX(t,e){return this.getValuesByX(t).get(this.getXCacheKey(e))||[]},filterNullish(t){const e=n=>L(n.value);return t&&t.filter(n=>"value"in n?e(n):n.values.some(e))},filterRemoveNull(t){return t.filter(e=>L(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(r=>e[0]<=r.x&&r.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return X(t)&&t||K(t)&&J(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:r,state:{hasRadar:a,inputType:s,eventReceiver:{coords:o,rect:l}}}=e;let c;if(a){let u=t.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);const f=Zt(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=Xv(n.chart.node()),d=s==="touch"&&t.changedTouches?t.changedTouches[0]:t;let h=u?d.clientY+f.y:d.clientX+f.x;if(Iu(n.svg)){const v=[h,0];u&&v.reverse(),h=Rs(n.eventRect.node(),...v)[u?"y":"x"]}else h-=u?l.top:l.left;c=Ia(o,h,0,o.length-1,u)}return c},getDataLabelLength(t,e,n){var r,a,s;const o=this,l=1.3,c=[t,e].map(u=>o.dataLabelFormat()(u));if(o.config.render_mode==="canvas"&&!o.$el.svg){const u=(a=(r=o.$el.chart)==null?void 0:r.node)==null?void 0:a.call(r),f=u==null?void 0:u.ownerDocument,d=f==null?void 0:f.createElementNS("http://www.w3.org/2000/svg","svg");if(u&&d){const h=c.map(b=>{const x=f.createElementNS("http://www.w3.org/2000/svg","text");return x.textContent=b,d.appendChild(x),x});d.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",u.appendChild(d);const v=h.map(b=>b.getBoundingClientRect()[n]*l);return d.remove(),v}}return((s=o.getTextRect(c))==null?void 0:s.map(u=>u[n]*l))||[0,0]},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,r=[];let a;for(a=e-1;a>=0&&n===t[a].x;a--)r.push(t[a]);for(a=e;a<t.length&&n===t[a].x;a++)r.push(t[a]);return r},getXCacheKey(t){return $(t)?t:+t},getValuesByX(t){const e=this,{cache:n,state:r}=e,a=t.map(l=>{const{values:c}=l,u=c[0],f=c[c.length-1];return`${l.id}:${c.length}:${u?e.getXCacheKey(u.x):""}:${f?e.getXCacheKey(f.x):""}`}).join("|"),s=n.get(Me.valuesByX);if(s&&s.generation===r.dataGeneration&&s.targetKey===a)return s.value;const o=new Map;for(let l=0;l<t.length;l++){const c=t[l].values;for(let u=0;u<c.length;u++){const f=c[u],d=e.getXCacheKey(f.x),h=o.get(d);h?h.push(f):o.set(d,[f])}}return n.add(Me.valuesByX,{generation:r.dataGeneration,targetKey:a,value:o}),o},getClosestCandidates(t,e,n=!0){const r=this,{config:a,scale:s}=r,o=t.length,l=t[0];if(!n||o<200||!l||!a.data_xSort)return t;const c=r.isBarType(l.id),u=r.isCandlestickType(l.id),f=a.point_sensitivity;if(!(c||u)&&!D(f))return t;const d=s.zoom||s.x,h=e[+a.axis_rotated],v=d(t[0].x)<=d(t[o-1].x);let b=0,x=o-1;for(;b<x;){const B=b+x>>1,G=d(t[B].x);(v?G<h:G>h)?b=B+1:x=B}const E=[],w=new Set,N=B=>{B>=0&&B<o&&!w.has(B)&&(w.add(B),E.push(t[B]))},k=B=>{if(B<0||B>=o)return;const G=r.getXCacheKey(t[B].x);let V=B;for(;V>=0&&r.getXCacheKey(t[V].x)===G;)N(V--);for(V=B+1;V<o&&r.getXCacheKey(t[V].x)===G;)N(V++)};if(c||u)for(let B=b-2;B<=b+2;B++)k(B);else{const B=f,G=(V,Z)=>{for(let Y=V;Y>=0&&Y<o;Y+=Z){const et=t[Y];if(Math.abs(d(et.x)-h)>B)break;N(Y)}};G(b,1),G(b-1,-1)}return E},findClosestFromTargets(t,e){const n=this,r=[];for(let a=0;a<t.length;a++){const s=n.findClosest(t[a].values,e);s&&r.push(s)}return n.findClosest(r,e,!1)},findClosest(t,e,n=!0){var r;const a=this,{$el:{main:s}}=a,o=a.getClosestCandidates(t,e,n);let l,c;for(let u=0;u<o.length;u++){const f=o[u];if(!f||!L(f.value))continue;const d=a.isBarType(f.id),h=a.isCandlestickType(f.id),v=(r=a.getAxisTypeHooks(f.id))==null?void 0:r.hit;if(d||h||v){const b=v?v(a,f):d?`.${tr.chartBar}.${Oe.target}${a.getTargetSelectorSuffix(f.id)} .${tr.bar}-${f.index}`:`.${Qr.chartCandlestick}.${Oe.target}${a.getTargetSelectorSuffix(f.id)} .${Qr.candlestick}-${f.index} path`;!c&&a.isWithinBar(s.select(b).node())&&(c=f)}else{const b=a.dist(f,e),x=a.getPointSensitivity(f);b<x&&(l===void 0||b<l)&&(l=b,c=f)}}return c},dist(t,e){const n=this,{config:{axis_rotated:r},scale:a}=n,s=+r,o=+!r,l=n.circleY(t,t.index),u=(a.zoom||a.x)(t.x)-e[s],f=l-e[o];return Math.sqrt(u*u+f*f)},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,a=r.line_step_type,s=n?n.isCategorized():!1,o=q(t)?t.concat():[t];if(!(s||/step\-(after|before)/.test(a)))return t;if(o.length){const l=o[0],c=o[o.length-1],{id:u}=l;let{x:f}=l;o.unshift({x:--f,value:l.value,id:u}),s&&a==="step-after"&&o.unshift({x:f-1,value:l.value,id:u}),f=c.x,o.push({x:++f,value:c.value,id:u}),s&&a==="step-before"&&o.push({x:f+1,value:c.value,id:u})}return o},convertValuesToRange(t){const e=q(t)?t.concat():[t],n=[];return e.forEach(r=>{const{x:a,id:s}=r;n.push({x:a,id:s,value:r.value[0]}),n.push({x:a,id:s,value:r.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:r}=n,a=r[`data_${t}`];return z(e)||(Object.keys(e).forEach(s=>{a[s]=e[s]}),n.redraw({withLegend:!0})),a},getRangedData(t,e="",n="areaRange"){var r,a;const s=t==null?void 0:t.value;if(q(s)){if(n==="bar")return s.reduce((o,l)=>l-o);{const o=(a=(r=aw[n])==null?void 0:r[e])!=null?a:-1;return o>=0?s[o]:void 0}}else if(s&&e)return s[e];return s},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(r=>e.isGrouped(r.id))){const r=a=>e.getRatio("index",a,!0);t.forEach(a=>{"values"in a?a.values.forEach(r):r(a)})}},getRatio(t,e,n=!1){const r=this,{config:a,state:s}=r,o=r.api;let l=0;if(e&&o.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(r.pie.padAngle()())l=e.value/r.getTotalDataSum(!0);else{const c=a.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,u=r.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/u}else if(t==="index"){const c=r.getVisibleTotalPerIndex(r.isStackNormalizedPerGroup()?e.id:void 0);if(c===null)return l;const u=c[e.index];e.ratio=D(e.value)&&c&&u?e.value/u:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/s.current.dataMax*a.radar_size_ratio;else if(t==="bar"){const u=r.getYScaleById.bind(r)(e.id).domain().reduce((f,d)=>d-f);l=u===0?0:Math.abs(r.getRangedData(e,null,t)/u)}else t==="treemap"&&(l/=r.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((r,a,s)=>(r[Number(a.x)]=s,r),{});e.data.targets.forEach(r=>{r.values.forEach((a,s)=>{let o=n[Number(a.x)];o===void 0&&(o=s),a.index=o})})},isBubbleZType(t){return this.isBubbleType(t)&&(rt(t.value)&&("z"in t.value||"y"in t.value)||q(t.value)&&t.value.length>=2)},isBarRangeType(t){var e;const n=this,{value:r}=t;return n.isBarType(t)&&!((e=n.isSubchartSourceTypeOf)!=null&&e.call(n,t,ne.CANDLESTICK))&&q(r)&&r.length>=2&&r.every(D)},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function Jo(t,e=!1){const n=this,{api:r}=n;e&&n.api.flush(!0),t==null||t.call(r)}var sw={load(t,e){const n=this,{axis:r,data:a,org:s,scale:o}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let u=t;if(u){e.filter&&(u=u.filter(e.filter)),(e.type||e.types)&&u.forEach(d=>{var h;const v=((h=e.types)==null?void 0:h[d.id])||e.type;n.setTargetType(d.id,v)});const f=new Map(u.map(d=>[d.id,d]));a.targets.forEach(d=>{const h=f.get(d.id);if(h){if(l){const v=h.values;for(let b=0;b<v.length;b++)d.values.push(v[b])}else d.values=h.values;f.delete(d.id)}}),f.forEach(d=>a.targets.push(d))}if(n.state.isCanvasMode){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),Jo.call(n,e.done,e.resizeAfter);return}n.updateTargets(a.targets),o.zoom&&(c.x=r.isCategorized()?o.x.orgScale():(s.xScale||o.x).copy(),c.domain=n.getXDomain(a.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(o.x.domain(c.domain),o.zoom=null,n.$el.eventRect.property("__zoom",null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.zoom?(s.xDomain=c.domain,s.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),s.xDomain=n.getZoomDomainValue(s.xDomain),s.xScale=c.x.domain(s.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):s.xScale&&s.xScale.domain(s.xDomain),n.updateTypesElements(),Jo.call(n,e.done,e.resizeAfter)},loadFromArgs(t){const e=this;e.config&&(e.cache.reset(!1,[Me.filteredTargets,Me.maxDataCountTarget,Me.valuesXIndexMap,Me.maxTickSize]),e.convertData(t,n=>{const r=t.data||n;t.append&&(r.__append__=!0),r&&e.load(e.convertDataToTargets.call(e,r),t)}))},unload(t,e){var n,r,a;const s=this,{state:o,$el:l,$T:c}=s,u=!!((n=s.hasLegendDefsPoint)!=null&&n.call(s));let f=e,d=t;if(s.cache.reset(!1,[Me.filteredTargets,Me.maxDataCountTarget,Me.valuesXIndexMap,Me.maxTickSize]),f||(f=()=>{}),d=d.filter(b=>s.hasTarget(s.data.targets,b)),d.length===0){f();return}const h=new Set(d);if(o.isCanvasMode){d.forEach(b=>{o.withoutFadeIn[b]=!1}),s.data.targets=s.data.targets.filter(b=>!h.has(b.id)),s.removeHiddenTargetIds(d),s.removeHiddenLegendIds(d),s.updateTypesElements(),f();return}d.forEach(b=>{var x;const E=s.getTargetSelectorSuffix(b);o.withoutFadeIn[b]=!1,l.legend&&l.legend.selectAll(`.${Ne.legendItem}${E}`).remove(),u&&((x=l.defs)==null||x.select(`#${s.getDefsPointId(E)}`).remove())}),s.data.targets=s.data.targets.filter(b=>!h.has(b.id)),(a=(r=s.customTypeHooks)==null?void 0:r.afterUnload)==null||a.call(r,s),o.hasTreemap&&s.updateTargetsForTreemap(s.data.targets),s.updateTypesElements();const v=l.svg.selectAll(d.map(b=>s.selectorTarget(b)));c(v).style("opacity","0").remove().call(Ue,f)}},ow={value:()=>{}};function sp(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Qo(n)}function Qo(t){this._=t}function lw(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Qo.prototype=sp.prototype={constructor:Qo,on:function(t,e){var n=this._,r=lw(t+"",n),a,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((a=(t=r[s]).type)&&(a=cw(n[a],t.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(a=(t=r[s]).type)n[a]=op(n[a],t.name,e);else if(e==null)for(a in n)n[a]=op(n[a],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Qo(t)},call:function(t,e){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,s;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,a=s.length;r<a;++r)s[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],a=0,s=r.length;a<s;++a)r[a].value.apply(e,n)}};function cw(t,e){for(var n=0,r=t.length,a;n<r;++n)if((a=t[n]).name===e)return a.value}function op(t,e,n){for(var r=0,a=t.length;r<a;++r)if(t[r].name===e){t[r]=ow,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var _o=sp;const uw={passive:!1},Ls={capture:!0,passive:!1};function Du(t){t.stopImmediatePropagation()}function Oi(t){t.preventDefault(),t.stopImmediatePropagation()}function Fu(t){var e=t.document.documentElement,n=Zt(t).on("dragstart.drag",Oi,Ls);"onselectstart"in e?n.on("selectstart.drag",Oi,Ls):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Nu(t,e){var n=t.document.documentElement,r=Zt(t).on("dragstart.drag",null);e&&(r.on("click.drag",Oi,Ls),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 qo=t=>()=>t;function $u(t,{sourceEvent:e,subject:n,target:r,identifier:a,active:s,x:o,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}$u.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function fw(t){return!t.ctrlKey&&!t.button}function dw(){return this.parentNode}function hw(t,e){return e==null?{x:t.x,y:t.y}:e}function gw(){return navigator.maxTouchPoints||"ontouchstart"in this}function lp(){var t=fw,e=dw,n=hw,r=gw,a={},s=_o("start","drag","end"),o=0,l,c,u,f,d=0;function h(B){B.on("mousedown.drag",v).filter(r).on("touchstart.drag",E).on("touchmove.drag",w,uw).on("touchend.drag touchcancel.drag",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(B,G){if(!(f||!t.call(this,B,G))){var V=k(this,e.call(this,B,G),B,G,"mouse");V&&(Zt(B.view).on("mousemove.drag",b,Ls).on("mouseup.drag",x,Ls),Fu(B.view),Du(B),u=!1,l=B.clientX,c=B.clientY,V("start",B))}}function b(B){if(Oi(B),!u){var G=B.clientX-l,V=B.clientY-c;u=G*G+V*V>d}a.mouse("drag",B)}function x(B){Zt(B.view).on("mousemove.drag mouseup.drag",null),Nu(B.view,u),Oi(B),a.mouse("end",B)}function E(B,G){if(t.call(this,B,G)){var V=B.changedTouches,Z=e.call(this,B,G),Y=V.length,et,it;for(et=0;et<Y;++et)(it=k(this,Z,B,G,V[et].identifier,V[et]))&&(Du(B),it("start",B,V[et]))}}function w(B){var G=B.changedTouches,V=G.length,Z,Y;for(Z=0;Z<V;++Z)(Y=a[G[Z].identifier])&&(Oi(B),Y("drag",B,G[Z]))}function N(B){var G=B.changedTouches,V=G.length,Z,Y;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),Z=0;Z<V;++Z)(Y=a[G[Z].identifier])&&(Du(B),Y("end",B,G[Z]))}function k(B,G,V,Z,Y,et){var it=s.copy(),at=qn(et||V,G),ot,st,_;if((_=n.call(B,new $u("beforestart",{sourceEvent:V,target:h,identifier:Y,active:o,x:at[0],y:at[1],dx:0,dy:0,dispatch:it}),Z))!=null)return ot=_.x-at[0]||0,st=_.y-at[1]||0,function lt(nt,dt,bt){var At=at,Et;switch(nt){case"start":a[Y]=lt,Et=o++;break;case"end":delete a[Y],--o;case"drag":at=qn(bt||dt,G),Et=o;break}it.call(nt,B,new $u(nt,{sourceEvent:dt,subject:_,target:h,identifier:Y,active:Et,x:at[0]+ot,y:at[1]+st,dx:at[0]-At[0],dy:at[1]-At[1],dispatch:it}),Z)}}return h.filter=function(B){return arguments.length?(t=typeof B=="function"?B:qo(!!B),h):t},h.container=function(B){return arguments.length?(e=typeof B=="function"?B:qo(B),h):e},h.subject=function(B){return arguments.length?(n=typeof B=="function"?B:qo(B),h):n},h.touchable=function(B){return arguments.length?(r=typeof B=="function"?B:qo(!!B),h):r},h.on=function(){var B=s.on.apply(s,arguments);return B===s?h:B},h.clickDistance=function(B){return arguments.length?(d=(B=+B)*B,h):Math.sqrt(d)},h}var vw={setExpand(t,e,n){const r=this,{config:a,$el:{circle:s}}=r;s&&a.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes(t=!0,e,n,r){const a=this;["bar","candlestick"].filter(s=>a.$el[s]).forEach(s=>{r&&a.$el[s].classed(Oe.EXPANDED,!1),a.getShapeByIndex(s,e,n).classed(Oe.EXPANDED,t)})},setOverOut(t,e,n){const r=this,{config:a,state:{customType:s,hasRadar:o,hasTreemap:l},$el:{main:c}}=r,u=rt(e);if(u||e!==-1){const f=a[t?"data_onover":"data_onout"].bind(r.api);if(a.color_onover&&r.setOverColor(t,e,u),u){const d=r.getTargetSelectorSuffix(e.id),h=s||l?`${Oe.target+d} .${nn.shape}`:Ye.arc+d;f(e,n!=null?n:c.select(`.${h}`).node())}else if(a.tooltip_grouped)t&&(o&&r.isPointFocusOnly()?r.showCircleFocus(r.getAllValuesOnIndex(e,!0)):r.setExpand(e,null,!0)),!r.isMultipleX()&&c.selectAll(`.${nn.shape}-${e}`).each(function(d){f(d,this)});else{const d=r.cache.get(Me.setOverOut)||[],h=c.selectAll(`.${nn.shape}-${e}`).filter(function(b){return r.isWithinShape(this,b)}),v=h.filter(function(){return d.every(b=>b!==this)});if(!t||h.empty()||d.length===v.size()&&v.nodes().every((b,x)=>b!==d[x]))for(;d.length;){const b=d.pop();a.data_onout.bind(r.api)(Zt(b).datum(),b)}v.each(function(){t&&(f(Zt(this).datum(),this),d.push(this))}),r.cache.add(Me.setOverOut,d)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(Me.callOverOutForTouch);(rt(t)&&n?t.id!==n.id:t!==n)&&((n||D(n))&&e.setOverOut(!1,n),(t||D(t))&&e.setOverOut(!0,t),e.cache.add(Me.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?lp().on("drag",function(r){n.event=r,t.drag(Zn(r,this))}).on("start",function(r){n.event=r,t.dragstart(Zn(r,this))}).on("end",r=>{n.event=r,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var r,a,s,o;const l=this,{config:c,state:{eventReceiver:u,hasAxis:f,customType:d,hasRadar:h,hasTreemap:v},$el:{eventRect:b,radar:x,svg:E,treemap:w}}=l;let N=(s=(a=(d||v)&&u.rect||h&&x.axes.select(`.${yn.axis}-${e} text`)||b||((r=l.getArcElementByIdOrIndex)==null?void 0:r.call(l,e)))==null?void 0:a.node)==null?void 0:s.call(a);if(N){const k=l.isMultipleX(),B=c.axis_rotated;let{width:G,left:V,top:Z}=en(N);if(f&&!h&&!k){const at=u.coords[e];at?(G=at.w,V+=at.x,Z+=at.y):(G=0,V=0,Z=0)}let Y=V+(n?n[0]:0)+(k||B?0:G/2),et=Z+(n?n[1]:0)+(B?4:0);if(Iu(E)&&l.$el.eventRect){const at=Rs(l.$el.eventRect.node(),Y,et,!1);Y=at.x,et=at.y}const it={screenX:Y,screenY:et,clientX:Y,clientY:et,bubbles:h};(d||v)&&(N=((o=l.$el[d])!=null?o:w).node()),Ru[/^(mouse|click)/.test(t)?"mouse":"touch"](N,t,it)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{canvas:e,eventRect:n,svg:r,zoomResetBtn:a}}=t;n==null||n.on(".zoom wheel.zoom .drag",null),e==null||e.on(".zoom wheel.zoom .drag",null),r==null||r.on("wheel",null),a==null||a.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:r,legend:a,region:s,svg:o,treemap:l},brush:c,state:{customType:u}}=e,f=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[o,r,s==null?void 0:s.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),a==null?void 0:a.selectAll("g"),e.$el[u],l].forEach(d=>d==null?void 0:d.on(f,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},pw={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const mw=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var yw={generateClass(t,e){const n=this.state.generateClassCache,r=`${t}\0${e}`;let a=n.get(r);return a||(a=` ${t} ${t+this.getTargetSelectorSuffix(e)}`,n.set(r,a)),a},getClass(t,e,n){const r=/s$/.test(t),a=n!=null?n:/^(area|arc|line|treemap)s?$/.test(t),s=r?"id":"index";return o=>{const l=o.data||o;return((e?this.generateClass(Se[r?"shapes":"shape"],l[s]):"")+this.generateClass(Se[t],l[a?"id":s])).trim()}},getChartClass(t){return e=>Se[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(r){var a;const s=r.id||((a=r.data)==null?void 0:a.id)||r;return n.indexOf(s)<0&&n.push(s),e[n.indexOf(s)%e.length]}},classRegion(t,e){return`${this.generateClass(Se.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${Se.target}-${e}`),this.generateClass(Se.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?Se.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?Se.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(mw,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${Se.target+r} ${n}, ${e}.${Se.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${Se.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};const xw=(t,e,n)=>{const r=Zt(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}};function bw(t){const e=Me.colorPattern,{body:n}=Tt;let r=n[e];if(!r){const s=t.classed(Tu.colorPattern,!0).style("background-image");t.classed(Tu.colorPattern,!1),s.indexOf(";")>-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(o=>o.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=r)}return r}const Tw=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Sw={generateColor(){const t=this,{$el:e,config:n}=t,r=[],a=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient;let s=J(n.color_pattern)?n.color_pattern:[...bw(e.chart)||Tw];const o=s;if(M(n.color_tiles)){const l=n.color_tiles.bind(t.api)(),c=s.map((u,f)=>{const d=u.replace(/[#\(\)\s,]/g,""),h=`${t.state.datetimeId}-pattern-${d}-${f}`;return xw(l[f%l.length],u,h)});s=c.map(u=>`url(#${u.id})`),t.patterns=c}return function(l){var c;const u=n.data_colors,f=n.data_color,d=l.id||((c=l.data)==null?void 0:c.id)||l,h=t.isTypeOf(d,["line","spline","step"])||!n.data_types[d];let v;if(M(u[d]))v=u[d].bind(t.api)(l);else if(u[d])v=u[d];else{let b=r.indexOf(d);b<0&&(r.push(d),b=r.length-1),v=h?o[b%o.length]:s[b%s.length],u[d]=v}if(v=M(f)?f.call(t.api,v,l):v,a&&e.defs){const b=t.$el.defs.selectAll(`[id$='-gradient${t.getTargetSelectorSuffix(d)}'] stop`);let x;b.each(function(E,w){x=w===0?this.style.stopColor:this.style.stopColor===x}),x===!0&&b.attr("stop-color",v)}return v}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,r=e.color_threshold,a=r.unit==="value",s=r.max||100,o=r.values&&r.values.length?r.values:[];return J(r)?function(l){const c=a?l:l*100/s;let u=n[n.length-1];for(let f=0,d=o.length;f<d;f++)if(c<=o[f]){u=n[f];break}return u}:null},generateTextBGColorFilter(t,e={x:0,y:0,width:1,height:1}){const n=this,{$el:{defs:r},state:a}=n;if(t){let s=[];$(t)?s.push(""):rt(t)?s=Object.keys(t):M(t)&&(s=n.mapToTargetIds()),s.forEach(o=>{const l=`${a.datetimeId}-labels-bg${n.getTargetSelectorSuffix(o)}${$(t)?n.getTargetSelectorSuffix(t):""}`,c=vt(o===""?t:(t==null?void 0:t[o])||"");if(r.select(`#${l}`).empty()){const u=r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l);u.append("feFlood").attr("flood-color",c),u.append("feComposite").attr("in","SourceGraphic")}})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:r},$el:{defs:a}}=t;n.forEach(s=>{const o=`${r}-gradient${t.getTargetSelectorSuffix(s.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(s)&&"area"||t.isBarType(s)&&"bar";if((l||c)&&a.select(`#${o}`).empty()){const u=t.color(s),f={defs:null,stops:[]};if(l){const{cx:d=.3,cy:h=.3,r:v=.7,stops:b=[[.1,u,0],[.9,u,1]]}=l;f.stops=b,f.defs=a.append("radialGradient").attr("id",`${o}`).attr("cx",d).attr("cy",h).attr("r",v)}else{const d=e.axis_rotated,{x:h=d?[1,0]:[0,0],y:v=d?[0,0]:[0,1],stops:b=[[0,u,1],[1,u,0]]}=e[`${c}_linearGradient`];f.stops=b,f.defs=a.append("linearGradient").attr("id",`${o}`).attr("x1",h[0]).attr("x2",h[1]).attr("y1",v[0]).attr("y2",v[1])}f.stops.forEach(d=>{const[h,v,b]=d,x=M(v)?v.bind(t.api)(s.id):v;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",x||u).attr("stop-opacity",b)})}})},setOverColor(t,e){const n=this,{config:r,$el:{main:a}}=n,s=r.color_onover;let o=t?s:n.color;rt(o)?o=({id:l})=>l in s?s[l]:n.color(l):$(o)?o=()=>s:M(s)&&(o=o.bind(n.api)),a.selectAll(rt(e)?`.${Ye.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${nn.shape}-${e}`).style("fill",o)}},Pi=0,Ds=0,Fs=0,cp=1e3,tl,Ns,el=0,Va=0,nl=0,$s=typeof performance=="object"&&performance.now?performance:Date,up=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bu(){return Va||(up(Aw),Va=$s.now()+nl)}function Aw(){Va=0}function rl(){this._call=this._time=this._next=null}rl.prototype=fp.prototype={constructor:rl,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Bu():+n)+(e==null?0:+e),!this._next&&Ns!==this&&(Ns?Ns._next=this:tl=this,Ns=this),this._call=t,this._time=n,ku()},stop:function(){this._call&&(this._call=null,this._time=1/0,ku())}};function fp(t,e,n){var r=new rl;return r.restart(t,e,n),r}function Ew(){Bu(),++Pi;for(var t=tl,e;t;)(e=Va-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Pi}function dp(){Va=(el=$s.now())+nl,Pi=Ds=0;try{Ew()}finally{Pi=0,ww(),Va=0}}function Cw(){var t=$s.now(),e=t-el;e>cp&&(nl-=e,el=t)}function ww(){for(var t,e=tl,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:tl=n);Ns=t,ku(r)}function ku(t){if(!Pi){Ds&&(Ds=clearTimeout(Ds));var e=t-Va;e>24?(t<1/0&&(Ds=setTimeout(dp,t-$s.now()-nl)),Fs&&(Fs=clearInterval(Fs))):(Fs||(el=$s.now(),Fs=setInterval(Cw,cp)),Pi=1,up(dp))}}function hp(t,e,n){var r=new rl;return e=e==null?0:+e,r.restart(a=>{r.stop(),t(a+e)},e,n),r}function zN(t){return t*t*t}function UN(t){return--t*t*t+1}function Iw(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Rw=_o("start","end","cancel","interrupt"),Ow=[],gp=0,zu=1,Uu=2,al=3,vp=4,Wu=5,il=6;function sl(t,e,n,r,a,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Pw(t,n,{name:e,index:r,group:a,on:Rw,tween:Ow,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:gp})}function Gu(t,e){var n=Ar(t,e);if(n.state>gp)throw new Error("too late; already scheduled");return n}function zr(t,e){var n=Ar(t,e);if(n.state>al)throw new Error("too late; already running");return n}function Ar(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Pw(t,e,n){var r=t.__transition,a;r[e]=n,n.timer=fp(s,0,n.time);function s(u){n.state=zu,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var f,d,h,v;if(n.state!==zu)return c();for(f in r)if(v=r[f],v.name===n.name){if(v.state===al)return hp(o);v.state===vp?(v.state=il,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete r[f]):+f<e&&(v.state=il,v.timer.stop(),v.on.call("cancel",t,t.__data__,v.index,v.group),delete r[f])}if(hp(function(){n.state===al&&(n.state=vp,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Uu,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Uu){for(n.state=al,a=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(v=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(a[++d]=v);a.length=d+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Wu,1),d=-1,h=a.length;++d<h;)a[d].call(t,f);n.state===Wu&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=il,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function Mi(t,e){var n=t.__transition,r,a,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){s=!1;continue}a=r.state>Uu&&r.state<Wu,r.state=il,r.timer.stop(),r.on.call(a?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}s&&delete t.__transition}}function Mw(t){return this.each(function(){Mi(this,t)})}function Lw(t,e){var n,r;return function(){var a=zr(this,t),s=a.tween;if(s!==n){r=n=s;for(var o=0,l=r.length;o<l;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}a.tween=r}}function Dw(t,e,n){var r,a;if(typeof n!="function")throw new Error;return function(){var s=zr(this,t),o=s.tween;if(o!==r){a=(r=o).slice();for(var l={name:e,value:n},c=0,u=a.length;c<u;++c)if(a[c].name===e){a[c]=l;break}c===u&&a.push(l)}s.tween=a}}function Fw(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ar(this.node(),n).tween,a=0,s=r.length,o;a<s;++a)if((o=r[a]).name===t)return o.value;return null}return this.each((e==null?Lw:Dw)(n,t,e))}function Hu(t,e,n){var r=t._id;return t.each(function(){var a=zr(this,r);(a.value||(a.value={}))[e]=n.apply(this,arguments)}),function(a){return Ar(a,r).value[e]}}function pp(t,e){var n;return(typeof e=="number"?Tr:e instanceof Da?gs:(n=Da(e))?(e=n,gs):jh)(t,e)}function Nw(t){return function(){this.removeAttribute(t)}}function $w(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bw(t,e,n){var r,a=n+"",s;return function(){var o=this.getAttribute(t);return o===a?null:o===r?s:s=e(r=o,n)}}function kw(t,e,n){var r,a=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?s:s=e(r=o,n)}}function zw(t,e,n){var r,a,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=l+"",o===c?null:o===r&&c===a?s:(a=c,s=e(r=o,l)))}}function Uw(t,e,n){var r,a,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=l+"",o===c?null:o===r&&c===a?s:(a=c,s=e(r=o,l)))}}function Ww(t,e){var n=Vo(t),r=n==="transform"?Z1:pp;return this.attrTween(t,typeof e=="function"?(n.local?Uw:zw)(n,r,Hu(this,"attr."+t,e)):e==null?(n.local?$w:Nw)(n):(n.local?kw:Bw)(n,r,e))}function Gw(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Hw(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Xw(t,e){var n,r;function a(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Hw(t,s)),n}return a._value=e,a}function Vw(t,e){var n,r;function a(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&Gw(t,s)),n}return a._value=e,a}function jw(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Vo(t);return this.tween(n,(r.local?Xw:Vw)(r,e))}function Yw(t,e){return function(){Gu(this,t).delay=+e.apply(this,arguments)}}function Kw(t,e){return e=+e,function(){Gu(this,t).delay=e}}function Zw(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Yw:Kw)(e,t)):Ar(this.node(),e).delay}function Jw(t,e){return function(){zr(this,t).duration=+e.apply(this,arguments)}}function Qw(t,e){return e=+e,function(){zr(this,t).duration=e}}function _w(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Jw:Qw)(e,t)):Ar(this.node(),e).duration}function qw(t,e){if(typeof e!="function")throw new Error;return function(){zr(this,t).ease=e}}function tI(t){var e=this._id;return arguments.length?this.each(qw(e,t)):Ar(this.node(),e).ease}function eI(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;zr(this,t).ease=n}}function nI(t){if(typeof t!="function")throw new Error;return this.each(eI(this._id,t))}function rI(t){typeof t!="function"&&(t=hv(t));for(var e=this._groups,n=e.length,r=new Array(n),a=0;a<n;++a)for(var s=e[a],o=s.length,l=r[a]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new Ur(r,this._parents,this._name,this._id)}function aI(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,a=n.length,s=Math.min(r,a),o=new Array(r),l=0;l<s;++l)for(var c=e[l],u=n[l],f=c.length,d=o[l]=new Array(f),h,v=0;v<f;++v)(h=c[v]||u[v])&&(d[v]=h);for(;l<r;++l)o[l]=e[l];return new Ur(o,this._parents,this._name,this._id)}function iI(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function sI(t,e,n){var r,a,s=iI(e)?Gu:zr;return function(){var o=s(this,t),l=o.on;l!==r&&(a=(r=l).copy()).on(e,n),o.on=a}}function oI(t,e){var n=this._id;return arguments.length<2?Ar(this.node(),n).on.on(t):this.each(sI(n,t,e))}function lI(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function cI(){return this.on("end.remove",lI(this._id))}function uI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=gu(t));for(var r=this._groups,a=r.length,s=new Array(a),o=0;o<a;++o)for(var l=r[o],c=l.length,u=s[o]=new Array(c),f,d,h=0;h<c;++h)(f=l[h])&&(d=t.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,sl(u[h],e,n,h,u,Ar(f,n)));return new Ur(s,this._parents,e,n)}function fI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=dv(t));for(var r=this._groups,a=r.length,s=[],o=[],l=0;l<a;++l)for(var c=r[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var h=t.call(f,f.__data__,d,c),v,b=Ar(f,n),x=0,E=h.length;x<E;++x)(v=h[x])&&sl(v,e,n,x,h,b);s.push(h),o.push(f)}return new Ur(s,o,e,n)}var dI=Si.prototype.constructor;function hI(){return new dI(this._groups,this._parents)}function gI(t,e){var n,r,a;return function(){var s=Ti(this,t),o=(this.style.removeProperty(t),Ti(this,t));return s===o?null:s===n&&o===r?a:a=e(n=s,r=o)}}function mp(t){return function(){this.style.removeProperty(t)}}function vI(t,e,n){var r,a=n+"",s;return function(){var o=Ti(this,t);return o===a?null:o===r?s:s=e(r=o,n)}}function pI(t,e,n){var r,a,s;return function(){var o=Ti(this,t),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(t),Ti(this,t))),o===c?null:o===r&&c===a?s:(a=c,s=e(r=o,l))}}function mI(t,e){var n,r,a,s="style."+e,o="end."+s,l;return function(){var c=zr(this,t),u=c.on,f=c.value[s]==null?l||(l=mp(e)):void 0;(u!==n||a!==f)&&(r=(n=u).copy()).on(o,a=f),c.on=r}}function yI(t,e,n){var r=(t+="")=="transform"?K1:pp;return e==null?this.styleTween(t,gI(t,r)).on("end.style."+t,mp(t)):typeof e=="function"?this.styleTween(t,pI(t,r,Hu(this,"style."+t,e))).each(mI(this._id,t)):this.styleTween(t,vI(t,r,e),n).on("end.style."+t,null)}function xI(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function bI(t,e,n){var r,a;function s(){var o=e.apply(this,arguments);return o!==a&&(r=(a=o)&&xI(t,o,n)),r}return s._value=e,s}function TI(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,bI(t,e,n==null?"":n))}function SI(t){return function(){this.textContent=t}}function AI(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function EI(t){return this.tween("text",typeof t=="function"?AI(Hu(this,"text",t)):SI(t==null?"":t+""))}function CI(t){return function(e){this.textContent=t.call(this,e)}}function wI(t){var e,n;function r(){var a=t.apply(this,arguments);return a!==n&&(e=(n=a)&&CI(a)),e}return r._value=t,r}function II(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,wI(t))}function RI(){for(var t=this._name,e=this._id,n=xp(),r=this._groups,a=r.length,s=0;s<a;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)if(c=o[u]){var f=Ar(c,e);sl(c,t,n,u,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ur(r,this._parents,t,n)}function OI(){var t,e,n=this,r=n._id,a=n.size();return new Promise(function(s,o){var l={value:o},c={value:function(){--a===0&&s()}};n.each(function(){var u=zr(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(c)),u.on=e}),a===0&&s()})}var PI=0;function Ur(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function yp(t){return Si().transition(t)}function xp(){return++PI}var ta=Si.prototype;Ur.prototype=yp.prototype={constructor:Ur,select:uI,selectAll:fI,selectChild:ta.selectChild,selectChildren:ta.selectChildren,filter:rI,merge:aI,selection:hI,transition:RI,call:ta.call,nodes:ta.nodes,node:ta.node,size:ta.size,empty:ta.empty,each:ta.each,on:oI,attr:Ww,attrTween:jw,style:yI,styleTween:TI,text:EI,textTween:II,remove:cI,tween:Fw,delay:Zw,duration:_w,ease:tI,easeVarying:nI,end:OI,[Symbol.iterator]:ta[Symbol.iterator]};var MI={time:null,delay:0,duration:250,ease:Iw};function LI(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function DI(t){var e,n;t instanceof Ur?(e=t._id,t=t._name):(e=xp(),(n=MI).time=Bu(),t=t==null?null:t+"");for(var r=this._groups,a=r.length,s=0;s<a;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&sl(c,t,e,u,o,n||LI(c,e));return new Ur(r,this._parents,t,e)}Si.prototype.interrupt=Mw,Si.prototype.transition=DI;var FI=[null];function WN(t,e){var n=t.__transition,r,a;if(n){e=e==null?null:e+"";for(a in n)if((r=n[a]).state>zu&&r.name===e)return new Ur([[t]],FI,e,+a)}return null}var Xu=t=>()=>t;function NI(t,{sourceEvent:e,target:n,selection:r,mode:a,dispatch:s}){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:a,enumerable:!0,configurable:!0},_:{value:s}})}function $I(t){t.stopImmediatePropagation()}function Vu(t){t.preventDefault(),t.stopImmediatePropagation()}var bp={name:"drag"},ju={name:"space"},Li={name:"handle"},Di={name:"center"};const{abs:Tp,max:Dn,min:Fn}=Math;function Sp(t){return[+t[0],+t[1]]}function Yu(t){return[Sp(t[0]),Sp(t[1])]}var ol={name:"x",handles:["w","e"].map(Bs),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ll={name:"y",handles:["n","s"].map(Bs),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},BI={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Bs),input:function(t){return t==null?null:Yu(t)},output:function(t){return t}},ea={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"},Ap={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ep={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},kI={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},zI={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Bs(t){return{type:t}}function UI(t){return!t.ctrlKey&&!t.button}function WI(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function GI(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ku(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function HI(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Cp(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function XI(){return Zu(ol)}function VI(){return Zu(ll)}function GN(){return Zu(BI)}function Zu(t){var e=WI,n=UI,r=GI,a=!0,s=_o("start","brush","end"),o=6,l;function c(E){var w=E.property("__brush",x).selectAll(".overlay").data([Bs("overlay")]);w.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ea.overlay).merge(w).each(function(){var k=Ku(this).extent;Zt(this).attr("x",k[0][0]).attr("y",k[0][1]).attr("width",k[1][0]-k[0][0]).attr("height",k[1][1]-k[0][1])}),E.selectAll(".selection").data([Bs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ea.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var N=E.selectAll(".handle").data(t.handles,function(k){return k.type});N.exit().remove(),N.enter().append("rect").attr("class",function(k){return"handle handle--"+k.type}).attr("cursor",function(k){return ea[k.type]}),E.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",v).on("touchend.brush touchcancel.brush",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(E,w,N){E.tween?E.on("start.brush",function(k){f(this,arguments).beforestart().start(k)}).on("interrupt.brush end.brush",function(k){f(this,arguments).end(k)}).tween("brush",function(){var k=this,B=k.__brush,G=f(k,arguments),V=B.selection,Z=t.input(typeof w=="function"?w.apply(this,arguments):w,B.extent),Y=Hr(V,Z);function et(it){B.selection=it===1&&Z===null?null:Y(it),u.call(k),G.brush()}return V!==null&&Z!==null?et:et(1)}):E.each(function(){var k=this,B=arguments,G=k.__brush,V=t.input(typeof w=="function"?w.apply(k,B):w,G.extent),Z=f(k,B).beforestart();Mi(k),G.selection=V===null?null:V,u.call(k),Z.start(N).brush(N).end(N)})},c.clear=function(E,w){c.move(E,null,w)};function u(){var E=Zt(this),w=Ku(this).selection;w?(E.selectAll(".selection").style("display",null).attr("x",w[0][0]).attr("y",w[0][1]).attr("width",w[1][0]-w[0][0]).attr("height",w[1][1]-w[0][1]),E.selectAll(".handle").style("display",null).attr("x",function(N){return N.type[N.type.length-1]==="e"?w[1][0]-o/2:w[0][0]-o/2}).attr("y",function(N){return N.type[0]==="s"?w[1][1]-o/2:w[0][1]-o/2}).attr("width",function(N){return N.type==="n"||N.type==="s"?w[1][0]-w[0][0]+o:o}).attr("height",function(N){return N.type==="e"||N.type==="w"?w[1][1]-w[0][1]+o:o})):E.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(E,w,N){var k=E.__brush.emitter;return k&&(!N||!k.clean)?k:new d(E,w,N)}function d(E,w,N){this.that=E,this.args=w,this.state=E.__brush,this.active=0,this.clean=N}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(E,w){return this.starting?(this.starting=!1,this.emit("start",E,w)):this.emit("brush",E),this},brush:function(E,w){return this.emit("brush",E,w),this},end:function(E,w){return--this.active===0&&(delete this.state.emitter,this.emit("end",E,w)),this},emit:function(E,w,N){var k=Zt(this.that).datum();s.call(E,this.that,new NI(E,{sourceEvent:w,target:c,selection:t.output(this.state.selection),mode:N,dispatch:s}),k)}};function h(E){if(l&&!E.touches||!n.apply(this,arguments))return;var w=this,N=E.target.__data__.type,k=(a&&E.metaKey?N="overlay":N)==="selection"?bp:a&&E.altKey?Di:Li,B=t===ll?null:kI[N],G=t===ol?null:zI[N],V=Ku(w),Z=V.extent,Y=V.selection,et=Z[0][0],it,at,ot=Z[0][1],st,_,lt=Z[1][0],nt,dt,bt=Z[1][1],At,Et,Rt=0,Vt=0,ae,re=B&&G&&a&&E.shiftKey,ve,xe,ge=Array.from(E.touches||[E],Ae=>{const an=Ae.identifier;return Ae=qn(Ae,w),Ae.point0=Ae.slice(),Ae.identifier=an,Ae});Mi(w);var Le=f(w,arguments,!0).beforestart();if(N==="overlay"){Y&&(ae=!0);const Ae=[ge[0],ge[1]||ge[0]];V.selection=Y=[[it=t===ll?et:Fn(Ae[0][0],Ae[1][0]),st=t===ol?ot:Fn(Ae[0][1],Ae[1][1])],[nt=t===ll?lt:Dn(Ae[0][0],Ae[1][0]),At=t===ol?bt:Dn(Ae[0][1],Ae[1][1])]],ge.length>1&&We(E)}else it=Y[0][0],st=Y[0][1],nt=Y[1][0],At=Y[1][1];at=it,_=st,dt=nt,Et=At;var Yt=Zt(w).attr("pointer-events","none"),pe=Yt.selectAll(".overlay").attr("cursor",ea[N]);if(E.touches)Le.moved=Gt,Le.ended=Be;else{var be=Zt(E.view).on("mousemove.brush",Gt,!0).on("mouseup.brush",Be,!0);a&&be.on("keydown.brush",cn,!0).on("keyup.brush",hn,!0),Fu(E.view)}u.call(w),Le.start(E,k.name);function Gt(Ae){for(const an of Ae.changedTouches||[Ae])for(const Qa of ge)Qa.identifier===an.identifier&&(Qa.cur=qn(an,w));if(re&&!ve&&!xe&&ge.length===1){const an=ge[0];Tp(an.cur[0]-an[0])>Tp(an.cur[1]-an[1])?xe=!0:ve=!0}for(const an of ge)an.cur&&(an[0]=an.cur[0],an[1]=an.cur[1]);ae=!0,Vu(Ae),We(Ae)}function We(Ae){const an=ge[0],Qa=an.point0;var Cr;switch(Rt=an[0]-Qa[0],Vt=an[1]-Qa[1],k){case ju:case bp:{B&&(Rt=Dn(et-it,Fn(lt-nt,Rt)),at=it+Rt,dt=nt+Rt),G&&(Vt=Dn(ot-st,Fn(bt-At,Vt)),_=st+Vt,Et=At+Vt);break}case Li:{ge[1]?(B&&(at=Dn(et,Fn(lt,ge[0][0])),dt=Dn(et,Fn(lt,ge[1][0])),B=1),G&&(_=Dn(ot,Fn(bt,ge[0][1])),Et=Dn(ot,Fn(bt,ge[1][1])),G=1)):(B<0?(Rt=Dn(et-it,Fn(lt-it,Rt)),at=it+Rt,dt=nt):B>0&&(Rt=Dn(et-nt,Fn(lt-nt,Rt)),at=it,dt=nt+Rt),G<0?(Vt=Dn(ot-st,Fn(bt-st,Vt)),_=st+Vt,Et=At):G>0&&(Vt=Dn(ot-At,Fn(bt-At,Vt)),_=st,Et=At+Vt));break}case Di:{B&&(at=Dn(et,Fn(lt,it-Rt*B)),dt=Dn(et,Fn(lt,nt+Rt*B))),G&&(_=Dn(ot,Fn(bt,st-Vt*G)),Et=Dn(ot,Fn(bt,At+Vt*G)));break}}dt<at&&(B*=-1,Cr=it,it=nt,nt=Cr,Cr=at,at=dt,dt=Cr,N in Ap&&pe.attr("cursor",ea[N=Ap[N]])),Et<_&&(G*=-1,Cr=st,st=At,At=Cr,Cr=_,_=Et,Et=Cr,N in Ep&&pe.attr("cursor",ea[N=Ep[N]])),V.selection&&(Y=V.selection),ve&&(at=Y[0][0],dt=Y[1][0]),xe&&(_=Y[0][1],Et=Y[1][1]),(Y[0][0]!==at||Y[0][1]!==_||Y[1][0]!==dt||Y[1][1]!==Et)&&(V.selection=[[at,_],[dt,Et]],u.call(w),Le.brush(Ae,k.name))}function Be(Ae){if($I(Ae),Ae.touches){if(Ae.touches.length)return;l&&clearTimeout(l),l=setTimeout(function(){l=null},500)}else Nu(Ae.view,ae),be.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Yt.attr("pointer-events","all"),pe.attr("cursor",ea.overlay),V.selection&&(Y=V.selection),HI(Y)&&(V.selection=null,u.call(w)),Le.end(Ae,k.name)}function cn(Ae){switch(Ae.keyCode){case 16:{re=B&&G;break}case 18:{k===Li&&(B&&(nt=dt-Rt*B,it=at+Rt*B),G&&(At=Et-Vt*G,st=_+Vt*G),k=Di,We(Ae));break}case 32:{(k===Li||k===Di)&&(B<0?nt=dt-Rt:B>0&&(it=at-Rt),G<0?At=Et-Vt:G>0&&(st=_-Vt),k=ju,pe.attr("cursor",ea.selection),We(Ae));break}default:return}Vu(Ae)}function hn(Ae){switch(Ae.keyCode){case 16:{re&&(ve=xe=re=!1,We(Ae));break}case 18:{k===Di&&(B<0?nt=dt:B>0&&(it=at),G<0?At=Et:G>0&&(st=_),k=Li,We(Ae));break}case 32:{k===ju&&(Ae.altKey?(B&&(nt=dt-Rt*B,it=at+Rt*B),G&&(At=Et-Vt*G,st=_+Vt*G),k=Di):(B<0?nt=dt:B>0&&(it=at),G<0?At=Et:G>0&&(st=_),k=Li),pe.attr("cursor",ea[N]),We(Ae));break}default:return}Vu(Ae)}}function v(E){f(this,arguments).moved(E)}function b(E){f(this,arguments).ended(E)}function x(){var E=this.__brush||{selection:null};return E.extent=Yu(e.apply(this,arguments)),E.dim=t,E}return c.extent=function(E){return arguments.length?(e=typeof E=="function"?E:Xu(Yu(E)),c):e},c.filter=function(E){return arguments.length?(n=typeof E=="function"?E:Xu(!!E),c):n},c.touchable=function(E){return arguments.length?(r=typeof E=="function"?E:Xu(!!E),c):r},c.handleSize=function(E){return arguments.length?(o=+E,c):o},c.keyModifiers=function(E){return arguments.length?(a=!!E,c):a},c.on=function(){var E=s.on.apply(s,arguments);return E===s?c:E},c}function wp(t){const{event:e,$el:n}=t,r=n.subchart.main||n.main;let a;return e&&e.type==="brush"?a=e.selection:r&&(a=r.select(".bb-brush").node())&&(a=Cp(a)),a}function Ip(t){const e=wp(t);return e?e[0]===e[1]:!0}function Rp(t,e){return e.map(n=>{var r,a,s,o,l,c,u,f,d;const{values:h}=n,v=h[0],b=h[h.length-1],x=v?(a=(r=t.getXCacheKey)==null?void 0:r.call(t,v.x))!=null?a:v.x:"",E=b?(o=(s=t.getXCacheKey)==null?void 0:s.call(t,b.x))!=null?o:b.x:"",w=(c=(l=t.getTargetType)==null?void 0:l.call(t,n))!=null?c:"",N=(d=(f=(u=t.state)==null?void 0:u.subchartSourceTypes)==null?void 0:f[n.id])!=null?d:"";return`${n.id}:${w}:${N}:${h.length}:${x}:${E}`}).join("|")}function Op(t,e){var n;const r=(n=t.data)==null?void 0:n.targets;if(!r)return!1;for(let a=0;a<e.length;a++){const s=e[a],o=r.find(l=>l.id===s.id);if(!o||o.values!==s.values)return!1}return!0}function Ju(t,e){J(e)&&((t.min===void 0||e<t.min)&&(t.min=e),(t.max===void 0||e>t.max)&&(t.max=e))}function Pp(t,e){for(let n=0;n<e.length;n++)Ju(t,e[n])}function jI(t,e){var n,r,a,s,o,l;const c={min:void 0,max:void 0},u=t.state.hasAxis;for(let f=0;f<e.length;f++){const d=e[f],h=(n=t.isCandlestickType)==null?void 0:n.call(t,d),v=!h&&!!((r=t.isSubchartSourceTypeOf)!=null&&r.call(t,d,ne.CANDLESTICK)),b=(s=(a=t.getAxisTypeHooks)==null?void 0:a.call(t,d))==null?void 0:s.domainValues,{values:x}=d;for(let E=0;E<x.length;E++){const w=x[E];let N=b?b(t,w):w.value;if(!(L(N)||N===null))continue;const k=v?(o=t.getSubchartCandlestickShapeValue)==null?void 0:o.call(t,w,!0):void 0;D(k)?N=k:N!==null&&(h||v)&&(N=Array.isArray(N)?N.slice(0,4):[N.open,N.high,N.low,N.close]),Array.isArray(N)?Pp(c,N):rt(N)&&"high"in N?Pp(c,Object.values(N)):(l=t.isBubbleZType)!=null&&l.call(t,w)?Ju(c,u&&t.getBubbleZData(N,"y")):Ju(c,N)}}return[c.min,c.max]}function YI(t,e){let n;for(let r=0;r<t.length;r++){const{values:a}=t[r];for(let s=0;s<a.length;s++){const{x:o}=a[s];J(o)&&(n===void 0||(e==="min"?o<n:o>n))&&(n=o)}}return n}var KI={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:a,state:s}=e,l=Op(e,t)?`${Me.domainMinMax}_y_${Rp(e,t)}`:null,c=l&&r.get(l);if(c&&c.generation===s.dataGeneration)return c.value;const u=a.data_groups,f=e.mapToIds(t),d=ti(f);let h;if(u.length>0){const v=e.getValuesAsIdKeyed(t),b=t.some(G=>G.values.some(V=>V.value<0)),x=t.some(G=>G.values.some(V=>V.value>0)),E=new Map(f.map(G=>[G,n.getId(G)])),w={},N={};for(const G in v)w[G]=v[G].slice(),N[G]=v[G].slice();u.forEach(G=>{const V=G.filter(Z=>d.has(Z));if(V.length){const Z=V[0],Y=E.get(Z);w[Z]&&b&&(w[Z]=w[Z].map(et=>et<0?et:0)),N[Z]&&x&&(N[Z]=N[Z].map(et=>et>0?et:0)),V.filter((et,it)=>it>0).forEach(et=>{if(w[et]){const it=E.get(et);w[et].forEach((at,ot)=>{const st=+at;it===Y&&!(b&&st>0)&&(w[Z][ot]+=st)})}if(N[et]){const it=E.get(et);N[et].forEach((at,ot)=>{const st=+at;it===Y&&!(x&&st<0)&&(N[Z][ot]+=st)})}})}});const k=[],B=[];for(const G in w)k.push(Xn("min",w[G])),B.push(Xn("max",N[G]));h=[Xn("min",k),Xn("max",B)]}else h=jI(e,t);return l&&r.add(l,{generation:s.dataGeneration,value:h}),h},isHiddenTargetWithYDomain(t){const e=this;for(const n of e.state.hiddenTargetIds)if(e.axis.getId(n)===t)return!0;return!1},getYDomain(t,e,n){const r=this,{axis:a,config:s,scale:o}=r,l=`axis_${e}`;if(r.isStackNormalized()&&t.filter(_=>a.getId(_.id)===e).map(_=>_.id).some(_=>r.isGrouped(_)))return[0,100];const c=(o==null?void 0:o[e])&&o[e].type==="log",u=t.filter(ot=>a.getId(ot.id)===e),f=n?r.filterByXDomain(u,n):u;if(f.length===0)return r.isHiddenTargetWithYDomain(e)?o[e].domain():e==="y2"?o.y.domain():r.getYDomain(t,"y2",n);const d=s[`${l}_min`],h=s[`${l}_max`],v=s[`${l}_center`],b=s[`${l}_inverted`],x=r.hasDataLabel()&&s.axis_rotated,E=r.hasDataLabel()&&!s.axis_rotated,[w,N]=r.getYDomainMinMaxBoth(f);let k=w,B=N,G=[ne.BAR,ne.BUBBLE,ne.SCATTER,...vr.Line].some(ot=>{const st=ot.indexOf("area")>-1?"area":ot;return r.hasType(ot,f,!0)&&s[`${st}_zerobased`]});k=L(d)?d:L(h)?k<=h?k:h-10:k,B=L(h)?h:L(d)?d<=B?B:d+10:B,isNaN(k)&&(k=0),isNaN(B)&&(B=k),k===B&&(k<0?B=0:k=0);const V=k>=0&&B>=0,Z=k<=0&&B<=0;(L(d)&&V||L(h)&&Z)&&(G=!1),G&&(V&&(k=0),Z&&(B=0));const Y=Math.abs(B-k);let et={top:Y*.1,bottom:Y*.1};if(H(v)){const ot=Math.max(Math.abs(k),Math.abs(B));B=v+ot,k=v-ot}if(x){const ot=W(o.y.range()),st=r.getDataLabelLength(k,B,"width").map(_=>{const lt=_/ot;return isFinite(lt)?lt:0});["bottom","top"].forEach((_,lt)=>{et[_]+=Y*(st[lt]/(1-st[0]-st[1]))})}else if(E){const ot=r.getDataLabelLength(k,B,"height");["bottom","top"].forEach((st,_)=>{et[st]+=r.convertPixelToScale("y",ot[_],Y)})}et=r.getResettedPadding(et);const it=s[`${l}_padding`];J(it)&&["bottom","top"].forEach(ot=>{et[ot]=a.getPadding(it,ot,et[ot],Y)}),G&&(V&&(et.bottom=k),Z&&(et.top=-B));const at=c?[k,B].map(ot=>ot<0?0:ot):[k-et.bottom,B+et.top];return b?at.reverse():at},getXDomainMinMax(t,e){var n;const r=this,{cache:a,state:s}=r,o=r.config[`axis_x_${e}`],c=Op(r,t)?`${Me.domainMinMax}_x_${e}_${Rp(r,t)}`:null,u=c&&a.get(c);let f=(u==null?void 0:u.generation)===s.dataGeneration?u.value:void 0;f===void 0&&(f=YI(t,e),c&&a.add(c,{generation:s.dataGeneration,value:f}));let d=rt(o)?o.value:o;return d=H(d)&&((n=r.axis)!=null&&n.isTimeSeries())?bn.bind(this)(d):d,rt(o)&&o.fit&&(e==="min"&&d<f||e==="max"&&d>f)&&(d=void 0),H(d)?d:f},getXDomainPadding(t,e){var n;const r=this,{axis:a,config:s}=r,o=s.axis_x_padding,l=a.isTimeSeries()&&e,c=W(t);let u;if(a.isCategorized()||l)u=0;else if(r.hasType("bar")||(n=r.hasAxisTypePadding)!=null&&n.call(r)){const h=r.getMaxDataCount();u=h>1?c/(h-1)/2:.5}else u=r.getResettedPadding(c*.01);let{left:f=u,right:d=u}=D(o)?{left:o,right:o}:o;if(o.unit==="px"){const h=Math.abs(c+c*.2);f=a.getPadding(o,"left",u,h),d=a.getPadding(o,"right",u,h)}else{const h=c+f+d;if(l&&h){const v=c/e/h;f=f/h/v,d=d/h/v}}return{left:f,right:d}},getXDomain(t){const e=this,{axis:n,config:r,scale:{x:a}}=e,s=r.axis_x_inverted,o=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=o;if(a.type!=="log"){const u=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(o);let[h,v]=o;h-v===0&&!u&&(f?(h=new Date(h.getTime()*.5),v=new Date(v.getTime()*1.5)):(h=h===0?1:h*.5,v=v===0?-1:v*1.5)),(h||h===0)&&(l=f?new Date(h.getTime()-d.left):h-d.left),(v||v===0)&&(c=f?new Date(v.getTime()+d.right):v+d.right)}return s?[c,l]:[l,c]},updateXDomain(t,e,n,r,a){var s;const o=this,{config:l,org:c,scale:{x:u,subX:f}}=o,d=l.zoom_enabled;if(n&&(u.domain(a||wr(o.getXDomain(t),!l.axis_x_inverted)),c.xDomain=u.domain(),f.domain(u.domain()),(s=o.brush)==null||s.scale(f)),e){const h=a||!o.brush||Ip(o)?c.xDomain:wp(o).map(f.invert);u.domain(h)}return(n||e)&&d&&o.zoom.updateScaleExtent(),r&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,r=e.getZoomDomain(),[a,s]=r;return(n?t[0]>=a:t[0]<=a)&&(t[1]=+t[1]+(a-t[0]),t[0]=a),(n?t[1]<=s:t[1]>=s)&&(t[0]=+t[0]-(t[1]-s),t[1]=s),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:r,scale:a,org:s}=n;let[o,l]=e&&a[t]?a[t].domain():s.xDomain;return t==="zoom"&&(H(r.zoom_x_min)&&(o=Xn("min",[o,r.zoom_x_min])),H(r.zoom_x_max)&&(l=Xn("max",[l,r.zoom_x_max]))),[o,l]},getZoomDomainValue(t){const e=this,{config:n,axis:r}=e;if(r.isCategorized()&&Array.isArray(t)){const a=n.axis_x_inverted;return t.map((o,l)=>Number(o)+(l===0?+a:+!a))}return t},convertPixelToScale(t,e,n){const r=this,{config:a,state:s}=r,o=a.axis_rotated;let l;return t==="x"?l=o?"height":"width":l=o?"width":"height",n*(e/s[l])},withinRange(t,e=[0,0],n){const a=this.config.axis_x_inverted,[s,o]=n;if(Array.isArray(t)){const l=a?t[1]:t[0],c=a?t[0]:t[1];if(l<c)return t.every((u,f)=>(f===0?a?+u<=s:+u>=s:a?+u>=o:+u<=o)&&!t.every((d,h)=>d===e[h]))}return!1}};function Mp(t,e,n){const{config:r}=t,a=`axis_${e}_tick_format`;return(r[a]?r[a]:t.defaultValueFormat).call(t.api,n)}var ZI={yFormat(t){return Mp(this,"y",t)},y2Format(t){return Mp(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:r}=t,a=t.hasArcType(null,["gauge","polar","radar"]);return function(s,o,l){return(a?e:t.axis&&t.axis.getId(l)==="y2"?r:n).call(t,s,o)}},defaultValueFormat(t){return q(t)?t.join("~"):L(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){var e,n;const r=this,a=r.config.data_labels,s=l=>{let u=l;return q(l)?u=l.join("~"):rt(l)&&(u=Object.values(l).join("~")),u};let o=s;return M(a.format)?o=a.format:K(a.format)&&(a.format[t]?o=a.format[t]===!0?s:a.format[t]:o=()=>""),r.state.customType&&((n=(e=r.customTypeHooks)==null?void 0:e.labelFormat)==null?void 0:n.call(e,r,t))||o.bind(r.api)}};const Lp=10,JI=750;function cl(t){var e,n,r;const a=this,s=a.getDataById(t),o=a.levelColor?a.levelColor(s.values[0].value):a.color(s);return(r=(n=(e=a.customTypeHooks)==null?void 0:e.legendColor)==null?void 0:n.call(e,a,s))!=null?r:o}function QI(t,e=!0){var n;const{config:r}=this;let a=(n=r.data_names[t])!=null?n:t;return e&&M(r.legend_format)&&(a=r.legend_format(a,t!==a?t:void 0)),a}function _I(t,e){var n;if(!e||e.empty())return;const r=(n=t.$el.legend)==null?void 0:n.selectAll(`.${Ne.legendItem}`);r&&!r.empty()&&(e=r);const a=[];e.each(function(o){a.push({id:o,node:this})});const s=ei(a,o=>o.id,o=>o.node);t.cache.add(Me.legendItemMap,s)}function Dp(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function qI(t,e,n){const r=Dp(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Fp(t,e){const n=t.state.legendTouch,r=n&&Dp(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Lp||Math.abs(r.clientY-n.y)>Lp)}function tR(t,e,n){Fp(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function eR(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function nR(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<JI;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function rR(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=X(n)&&n||!1,a=!isNaN(n)&&n||null;return{passive:!r&&a===null}}var aR={initLegend(){var t;const e=this,{config:n,$el:r}=e;if(e.legendItemTextBox={},e.state.legendHasRendered=!1,e.state.isCanvasMode){n.legend_show?(t=e.updateHtmlLegend)==null||t.call(e):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets));return}n.legend_show?(n.legend_contents_bindto||(r.legend=e.$el.svg.append("g").classed(Ne.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets))},updateLegend(t,e,n){var r;const a=this,{config:s,state:o,scale:l,$el:c}=a,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=Ce(u,"withTransition",!0),u.withTransitionForTransform=Ce(u,"withTransitionForTransform",!0),s.legend_contents_bindto&&s.legend_contents_template?a.updateLegendTemplate():o.hasTreemap||a.updateLegendElement(t||a.mapToIds(a.data.targets),u),(r=c.legend)==null||r.selectAll(`.${Ne.legendItem}`).classed(Ne.legendItemHidden,function(f){const d=!a.isTargetToShow(f);return d&&(this.style.opacity=null),d}),a.updateScales(!1,!l.zoom),a.updateSvgSize(),a.transformAll(u.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,r=Zt(e.legend_contents_bindto),a=e.legend_contents_template;if(!r.empty()){const s=t.mapToIds(t.data.targets),o=[];let l="";s.forEach(u=>{const f=M(a)?vt(a.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Ir(a,{COLOR:t.color(u),TITLE:u});f&&(o.push(u),l+=f)});const c=r.html(vt(l)).selectAll(function(){return this.children}).data(o);t.setLegendItem(c),n.legend=r}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:r,isLegendLeft:a,isLegendRight:s,isLegendInset:o,current:l}}=e,{width:c,height:u}=t,f={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-u-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:a?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:s?0:o?f.top:l.height-u,right:NaN,bottom:0,left:s?l.width-c:o?f.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:r}=e;r(n,t).attr("transform",e.getTranslate("legend"))},updateLegendItemColor(t,e){const n=this,{legend:r}=n.$el;if(r){const a=n.getLegendItemById(t);a&&Zt(a).select("line").style("stroke",e)}},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:r,legendItemWidth:a,legendStep:s}=t.state;return t.config.legend_show?n||r?a*(s+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:r,legendItemHeight:a,legendStep:s}=e.state,l=((t=e.config.padding)==null?void 0:t.mode)==="fit"?10:20;return e.config.legend_show?r?n.height:Math.max(l,a)*(s+1):0},opacityForUnfocusedLegend(t){return t.classed(Ne.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:r},$T:a}=n,s=n.mapToTargetIds(t);r&&a(r.selectAll(`.${Ne.legendItem}`).filter(o=>s.indexOf(o)>=0).classed(Ke.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,Zt(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${Ne.legendItem}`).classed(Ke.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:r,$T:a}=e;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),a(r.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:r}}=e;n.legend_show&&tt(t)&&(n.legend_show=!1,r==null||r.style("visibility","hidden")),e.addHiddenLegendIds(t),r==null||r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:r,state:a}=n;let s;const o=Me.legendItemTextBox;return t&&(s=!a.redrawing&&r.get(o)||{},s[t]||(s[t]=n.getTextRect(e,Ne.legendItem),r.add(o,s)),s=s[t]),s},setLegendItem(t){const e=this,{$el:n,api:r,config:a,state:s}=e,o=s.inputType==="touch",l=e.hasType("gauge"),c=a.boost_useCssRule,u=a.legend_item_interaction,f=u.dblclick?"dblclick":"click",d=u||M(a.legend_item_onclick),h=o?rR(e):void 0,v=function(b,x){var E;if(!se(a.legend_item_onclick,r,x,!s.hiddenTargetIds.has(x))){const{altKey:w,type:N}=b,k=Zt(this);N==="dblclick"||w?s.hiddenTargetIds.size&&!k.classed(Ne.legendItemHidden)?r.show():(r.hide(),r.show(x)):(r.toggle(x),k.classed(Ke.legendItemFocused,!1))}o&&(e.hideTooltip(),(E=e.hideGridFocus)==null||E.call(e,!0))};t.attr("class",function(b){const x=Zt(this);return(!x.empty()&&x.attr("class")||"")+e.generateClass(Ne.legendItem,b)}).style("visibility",b=>e.isLegendToShow(b)?null:"hidden"),a.interaction_enabled&&(c&&[[`.${Ne.legendItem}`,"cursor:pointer"],[`.${Ne.legendItem} text`,"pointer-events:none"],[`.${Ne.legendItemPoint} text`,"pointer-events:none"],[`.${Ne.legendItemTile}`,"pointer-events:none"],[`.${Ne.legendItemEvent}`,"fill-opacity:0"]].forEach(b=>{const[x,E]=b;e.setCssRule(!1,x,[E])(n.legend)}),t.on(f,d?function(b,x){o&&b.type==="click"&&nR(e,x)||v.call(this,b,x)}:null),o&&f==="click"&&d&&t.on("touchstart",function(b,x){qI(e,x,b)},h).on("touchmove",b=>{Fp(e,b)},h).on("touchend",function(b,x){tR(e,x,b)&&(eR(e,x),v.call(this,b,x))},h),!o&&t.on("mouseout",u||M(a.legend_item_onout)?function(b,x){se(a.legend_item_onout,r,x,!s.hiddenTargetIds.has(x))||(Zt(this).classed(Ke.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${er.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||M(a.legend_item_onover)?function(b,x){se(a.legend_item_onover,r,x,!s.hiddenTargetIds.has(x))||(Zt(this).classed(Ke.legendItemFocused,!0),l&&e.markOverlapped(x,e,`.${er.gaugeValue}`),!s.transiting&&e.isTargetToShow(x)&&r.focus(x))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer"))),_I(e,t)},getLegendItemById(t){var e;const n=this,r=n.cache.get(Me.legendItemMap);if(r&&r instanceof Map)return r.get(t)||null;const a=(e=n.$el.legend)==null?void 0:e.selectAll(`.${Ne.legendItem}`).filter(s=>s===t);return(a==null?void 0:a.node())||null},updateLegendElement(t,e){const n=this,{config:r,state:a,$el:{legend:s},$T:o}=n,c=r.legend_item_tile_type!=="circle",u=r.legend_item_tile_r,f={width:c?r.legend_item_tile_width:u*2,height:c?r.legend_item_tile_height:u*2},d={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},h={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let v,b,x;const E=t.filter(Y=>!H(r.data_names[Y])||r.data_names[Y]!==null),w=e.withTransition,N=a.isLegendRight||a.isLegendInset,k=QI.bind(n),B=n.getUpdateLegendPositions(E,d,h,N);a.isLegendInset&&(d.step=r.legend_inset_step?r.legend_inset_step:E.length,a.legendStep=d.step),a.isLegendRight?(v=Y=>d.max.width*h.steps[Y],b=Y=>h.margins[h.steps[Y]]+h.offsets[Y]):a.isLegendInset?(v=Y=>d.max.width*h.steps[Y]+10,b=Y=>h.margins[h.steps[Y]]+h.offsets[Y]):(v=Y=>h.margins[h.steps[Y]]+h.offsets[Y],b=Y=>d.max.height*h.steps[Y]);const G={xText:(Y,et)=>v(Y,et)+4+f.width,xRect:(Y,et)=>v(Y,et),x1Tile:(Y,et)=>v(Y,et)-2,x2Tile:(Y,et)=>v(Y,et)-2+f.width,yText:(Y,et)=>b(Y,et)+9,yRect:(Y,et)=>b(Y,et)-5,yTile:(Y,et)=>b(Y,et)+4};n.generateLegendItem(E,f,B,G,N,k),x=s.select(`.${Ne.legendBackground} rect`),a.isLegendInset&&d.max.width>0&&x.size()===0&&(x=s.insert("g",`.${Ne.legendItem}`).attr("class",Ne.legendBackground).append("rect")),r.legend_tooltip&&s.selectAll("title").data(E).text(Y=>k(Y,!1));const V=s.selectAll("text").data(E).text(Y=>k(Y)).each(function(Y,et){B(this,Y,et)});o(V,w).attr("x",G.xText).attr("y",G.yText);const Z=s.selectAll(`rect.${Ne.legendItemEvent}`).data(E);o(Z,w).attr("width",Y=>h.widths[Y]).attr("height",Y=>h.heights[Y]).attr("x",G.xRect).attr("y",G.yRect),n.updateLegendItemPos(E,w,G),x&&o(x,w).attr("height",n.getLegendHeight()-12).attr("width",d.max.width*(d.step+1)+10),a.legendItemWidth=d.max.width,a.legendItemHeight=d.max.height,a.legendStep=d.step},getUpdateLegendPositions(t,e,n,r){const a=this,{config:s,state:o}=a;return function(l,c,u){const f=u===0,d=u===t.length-1,h=a.getLegendItemTextBox(c,l),v=h.width+e.tileWidth+(d&&!r?0:e.padding.right)+s.legend_padding,b=h.height+e.padding.top,x=r?b:v,E=r?a.getLegendHeight():a.getLegendWidth();let w;const N=function(B,G){G||(w=(E-e.totalLength-x)/2,w<e.posMin&&(w=(E-x)/2,e.totalLength=0,e.step++)),n.steps[B]=e.step,n.margins[e.step]=o.isLegendInset?10:w,n.offsets[B]=e.totalLength,e.totalLength+=x};if(f&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),s.legend_show&&!a.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=v,n.heights[c]=b,(!e.max.width||v>=e.max.width)&&(e.max.width=v),(!e.max.height||b>=e.max.height)&&(e.max.height=b);const k=r?e.max.height:e.max.width;if(s.legend_equally){for(const B in n.widths)n.widths[B]=e.max.width;for(const B in n.heights)n.heights[B]=e.max.height;w=(E-k*t.length)/2,w<e.posMin?(e.totalLength=0,e.step=0,t.forEach(B=>N(B))):N(c,!0)}else N(c)}},generateLegendItem(t,e,n,r,a,s){const o=this,{config:l,state:c,$el:{legend:u}}=o,f=l.legend_usePoint,d=l.legend_item_tile_r,h=l.legend_item_tile_type,v=h!=="circle",b=-200,x=u.selectAll(`.${Ne.legendItem}`).data(t).enter().append("g");if(o.setLegendItem(x),l.legend_tooltip&&x.append("title").text(E=>E),x.append("text").text(E=>s(E)).each(function(E,w){n(this,E,w)}).style("pointer-events",o.getStylePropValue("none")).attr("x",a?r.xText:b).attr("y",a?b:r.yText),x.append("rect").attr("class",Ne.legendItemEvent).style("fill-opacity",o.getStylePropValue("0")).attr("x",a?r.xRect:b).attr("y",a?b:r.yRect),f){const E=[],w=o.getValidPointPattern();x.append(N=>{E.indexOf(N)===-1&&E.push(N);let k=w[E.indexOf(N)%w.length];return k==="rectangle"&&(k="rect"),Tt.createElementNS(bi.svg,"hasValidPointType"in o&&o.hasValidPointType(k)?k:"use")}).attr("class",Ne.legendItemPoint).style("fill",cl.bind(o)).style("pointer-events",o.getStylePropValue("none")).attr("href",(N,k,B)=>{const V=B[k].nodeName.toLowerCase(),Z=o.getTargetSelectorSuffix(N);return V==="use"?`#${c.datetimeId}-point${Z}`:void 0})}else x.append(v?"line":h).attr("class",Ne.legendItemTile).style("stroke",cl.bind(o)).style("pointer-events",o.getStylePropValue("none")).call(E=>{h==="circle"?E.attr("r",d).style("fill",cl.bind(o)).attr("cx",a?r.x2Tile:b).attr("cy",a?b:r.yTile):v&&E.attr("stroke-width",e.height).attr("x1",a?r.x1Tile:b).attr("y1",a?b:r.yTile).attr("x2",a?r.x2Tile:b).attr("y2",a?b:r.yTile)})},updateLegendItemPos(t,e,n){const r=this,{config:a,$el:{legend:s},$T:o}=r,l=a.legend_usePoint,c=a.legend_item_tile_type,u=c!=="circle";if(l){const f=s.selectAll(`.${Ne.legendItemPoint}`).data(t),d=a.legend_item_tile_type!=="circle",h=d?a.legend_item_tile_width:a.legend_item_tile_r*2,v=d?a.legend_item_tile_height:a.legend_item_tile_r*2,b=h*.75,x=v*.75,E=h/8,w=v/8;o(f,e).each(function(){const N=this.nodeName.toLowerCase();let k="x",B="y",G=null,V=null,Z=null;N==="circle"?(k="cx",B="cy",G=Math.min(b,x)/2):N==="rect"&&(V=b,Z=x);const Y=Zt(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",G).attr("width",V).attr("height",Z);N==="use"?Y.attr("transform",et=>`translate(${n.x1Tile(et)} ${n.yTile(et)-v/2}) scale(${E} ${w})`):Y.attr(k,et=>n.x1Tile(et)+(h-(V||0))/2).attr(B,et=>n.yTile(et)-(Z||0)/2)})}else{const f=s.selectAll(`.${Ne.legendItemTile}`).data(t);o(f,e).style("stroke",cl.bind(r)).call(d=>{c==="circle"?d.attr("cx",h=>{const v=n.x2Tile(h);return v-(v-n.x1Tile(h))/2}).attr("cy",n.yTile):u&&d.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},iR={redraw(t={}){var e,n,r,a,s,o,l,c,u,f,d,h,v,b;const x=this,{config:E,state:w,$el:N}=x,{main:k,treemap:B}=N;w.redrawing=!0,w.redrawGeneration++,(w.dirty.data||w.dirty.visibility||t.initializing)&&w.dataGeneration++,(t.initializing||w.dirty.size||w.dirty.data||!w.rendered)&&x.cache.remove([Me.svgLeft]);const G=x.filterTargetsToShow(x.data.targets);w._targetsToShow=G;const V={data:w.dirty.data,visibility:w.dirty.visibility,size:w.dirty.size};w.dirty.data=!1,w.dirty.visibility=!1,w.dirty.size=!1;const{flow:Z,initializing:Y}=t,et=x.getWithOption(t),it=et.Transition?E.transition_duration:0,at=et.TransitionForExit?it:0,ot=et.TransitionForAxis?it:0,st=(e=x.axis)==null?void 0:e.generateTransitions(ot),_=V.data||V.visibility||Y;if(w.isCanvasMode&&(x.setContainerSize(),(n=x.updateHtmlLegend)==null||n.call(x)),x.updateSizes(Y),w.isCanvasMode){const lt=x.scale.zoom,nt=(a=(r=lt==null?void 0:lt.orgDomain)==null?void 0:r.call(lt))!=null?a:lt==null?void 0:lt.domain();lt&&(x.scale.zoom=null),x.updateScales(Y,et.UpdateXDomain),lt&&(lt.range(x.scale.x.range()),nt&<.domain(nt),x.scale.zoom=x.getCustomizedXScale((o=(s=lt.orgScale)==null?void 0:s.call(lt))!=null?o:lt),x.axis.x.scale(x.scale.zoom),x.scale.x.domain(E.zoom_rescale?nt:x.org.xDomain),x.scale.subX.domain(x.org.xDomain)),w.hasAxis&&x.axis.syncAxisDomains(G,et,Z),w.hasAxis&&((l=x.applyCanvasSubchartDomain)==null||l.call(x));const dt=_?x.getDrawShape():w._cachedDrawShape||x.getDrawShape();_&&(w._cachedDrawShape=dt),E.legend_show&&N.legend&&!(E.legend_contents_bindto&&E.legend_contents_template)&&((c=x.positionHtmlLegend)==null||c.call(x)),(u=x.resizeCanvas)==null||u.call(x),w.canvasFocusKey=null,x.renderCanvasFrame(dt,null,!0),Y&&x.updateTypesElements(),x.callPluginHook("$redraw",t,0),w.redrawing=!1,w._targetsToShow=null,w._cachedDrawShape=null,x.mapToIds(x.data.targets).forEach(bt=>{w.withoutFadeIn[bt]=!0}),se(E.onrendered,x.api);return}et.Legend&&E.legend_show?(t.withTransition=!!it,!B&&x.updateLegend(x.mapToIds(x.data.targets),t,st)):et.Dimension&&x.updateDimension(!0),E.data_empty_label_text&&k.select(`text.${vn.text}.${Oe.empty}`).attr("x",w.width/2).attr("y",w.height/2).text(E.data_empty_label_text).style("display",G.length?"none":null),(f=x.redrawTitle)==null||f.call(x),w.hasAxis?(x.axis.redrawAxis(G,et,st,Z,Y),(d=x.hasGrid)!=null&&d.call(x)&&x.updateGrid(),E.regions.length&&((h=x.updateRegion)==null||h.call(x)),["bar","candlestick","line","area",...x.getAxisTypes()].forEach(lt=>{const nt=Ze(lt);(/^(line|area)$/.test(lt)&&x.hasTypeOf(nt)||x.hasType(lt))&&_&&x[`update${nt}`](et.TransitionForExit)}),N.text&&k.selectAll(`.${_e.selectedCircles}`).filter(x.isBarType.bind(x)).selectAll("circle").remove(),E.interaction_enabled&&!Z&&et.EventRect&&(x.redrawEventRect(),(v=x.bindZoomEvent)==null||v.call(x))):(N.arcs&&x.redrawArc(it,at,et.Transform),N.radar&&x.redrawRadar(),N.polar&&x.redrawPolar(),w.customType&&x[`redraw${Ze(w.customType)}`](et.Transition),B&&x.updateTreemap(at)),!w.resizing&&!B&&(x.hasPointType()||w.hasRadar)?_&&x.updateCircle(!1,!!Z):(b=x.hasLegendDefsPoint)!=null&&b.call(x)&&x.data.targets.forEach(x.point("create",this)),x.hasDataLabel()&&!x.hasArcType(null,["radar"])&&_&&x.updateText(),Y&&x.updateTypesElements(),x.generateRedrawList(G,Z,it,et.Subchart,_),x.updateTooltipOnRedraw(),x.callPluginHook("$redraw",t,it)},generateRedrawList(t,e,n,r,a=!0){const s=this,{config:o,state:l}=s;l.hasAxis&&o.subchart_show&&s.redrawSubchart(r,n);const c=a?s.getDrawShape():l._cachedDrawShape||s.getDrawShape();a&&(l._cachedDrawShape=c);const u=e&&s.generateFlow({targets:t,flow:e,duration:e.duration,shape:c,xv:s.xv.bind(s)}),f=!u&&n&&Ps(),d=s.getRedrawList(c,e,u,f),h=()=>{u&&u(),l.redrawing=!1,l._targetsToShow=null,l._cachedDrawShape=null,se(o.onrendered,s.api)};if(f&&d.length){const v=jv();yp().duration(n).each(()=>{d.flatMap(b=>b).forEach(b=>v.add(b))}).call(v,h)}else l.transiting||h();s.mapToIds(s.data.targets).forEach(v=>{l.withoutFadeIn[v]=!0})},getRedrawList(t,e,n,r){const a=this,{config:s,state:{hasAxis:o,hasRadar:l,hasTreemap:c},$el:{grid:u}}=a,{cx:f,cy:d,xForText:h,yForText:v}=t.pos,b=[];if(o){a.redrawGrid&&(s.grid_x_lines.length||s.grid_y_lines.length)&&b.push(a.redrawGrid(r)),a.redrawRegion&&s.regions.length&&b.push(a.redrawRegion(r));for(const x in t.type){const E=Ze(x),w=t.type[x];(/^(area|line)$/.test(x)&&a.hasTypeOf(E)||a.hasType(x))&&b.push(a[`redraw${E}`](w,r))}!e&&u.main&&a.updateGridFocus&&b.push(a.updateGridFocus())}return(!a.hasArcType()||l)&&J(s.data_labels)&&s.data_labels!==!1&&b.push(a.redrawText(h,v,e,r)),(a.hasPointType()||l)&&!a.isPointFocusOnly()&&a.redrawCircle&&b.push(a.redrawCircle(f,d,r,n)),c&&b.push(a.redrawTreemap(r)),b},updateAndRedraw(t={}){const e=this,{config:n,state:r}=e;let a;t.withTransition=Ce(t,"withTransition",!0),t.withTransform=Ce(t,"withTransform",!1),t.withLegend=Ce(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=Ce(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(r.hasAxis&&(a=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,a)),e.redraw(t)}},sR={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentRectValue("width")},getCurrentHeight(){var t,e,n,r;const a=this,{config:s,state:o,$el:l}=a;let c=s.size_height||((e=(t=a.customTypeHooks)==null?void 0:t.currentHeight)==null?void 0:e.call(t,a));if(!c){const u=o.isCanvasMode?(n=l.chart)==null?void 0:n.node():null,f=u==null?void 0:u.style.minHeight;f&&(u.style.minHeight=""),c=a.getParentHeight(),f&&(u.style.minHeight=f);const d=u&&parseFloat((r=a.canvasEngine)==null?void 0:r.canvas.style.height)||0,h=o.current.height-d;h>0&&Math.round(c)===Math.round(d)&&(c+=h)}return c>0?c:320/(a.hasType("gauge")&&!s.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${Ze(t)}`;let n=this.$el.chart.node(),r=0;for(;r<30&&n&&n.tagName!=="BODY";){try{r=en(n,!0)[t]}catch(s){e in n&&(r=n[e])}n=n.parentNode}const a=Tt.body[e];return r>a&&(r=a),r},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){var e,n,r;const a=this,{cache:s,config:o,state:{hasAxis:l},$el:c}=a;if(t){const et=s.get(Me.svgLeft);if(et!==null)return et}const u=o.axis_rotated,f=u||!u&&!o.axis_y_inner,d=u?yn.axisX:yn.axisY,h=c.main.select(`.${d}`).node(),v=l&&o[`axis_${u?"x":"y"}_label`],x=l&&($(v)||$(v.text)||/^inner-/.test(v==null?void 0:v.position))?c.main.select(`.${d}-label`):null,E=x&&!x.empty()?x.node():null,w=!t,N={label:E?en(E,w):null,leftAxis:h&&f?en(h,w):null,chart:en(c.chart.node(),w)},k=(n=(e=N.label)==null?void 0:e.left)!=null?n:0,B=(r=N.leftAxis)!=null?r:{right:0},G=N.chart.left+k,V=a.hasArcType(),Z=B.right-G-(V?0:a.getCurrentPaddingByDirection("left",t)),Y=Z>0?Z:0;return s.add(Me.svgLeft,Y),Y},previewResize(){var t,e,n;const r=this,{state:a,$el:s}=r,{current:o}=a,l=r.getCurrentWidth(),c=r.getCurrentHeight();if(!(!l||!c||!o.width||!o.height||l===o.width&&c===o.height)){if(a.isCanvasMode){const u=(t=r.canvasEngine)==null?void 0:t.canvas;if(!u)return;s.chart.style("min-height",`${c}px`),u.style.width=`${l}px`,u.style.height=`${Math.max(0,c-((n=(e=r.getCanvasBottomLegendHeight)==null?void 0:e.call(r))!=null?n:0))}px`}else if(s.svg)s.svg.attr("viewBox",`0 0 ${o.width} ${o.height}`).attr("preserveAspectRatio","none").attr("width",l).attr("height",c);else return;a.resizePreview=!0}},clearResizePreview(){const t=this,{config:e,state:n,$el:r}=t;n.resizePreview&&(n.resizePreview=!1,!n.isCanvasMode&&r.svg&&e.resize_auto!=="viewBox"&&r.svg.attr("viewBox",null).attr("preserveAspectRatio",null))},updateDimension(t){var e,n;const r=this,{config:a,state:{hasAxis:s,isCanvasMode:o},$el:l}=r;if(s&&!t&&r.axis.x&&a.axis_rotated&&((e=r.axis.subX)==null||e.create(l.axis.subX)),r.updateScales(t),o){(n=r.resizeCanvas)==null||n.call(r);return}r.updateSvgSize(),r.transformAll(!1)},updateSvgSize(){var t;const e=this,{config:n,state:{clip:r,current:a,hasAxis:s,width:o,height:l},$el:{svg:c}}=e;if(!c){(t=e.resizeCanvas)==null||t.call(e);return}if(e.clearResizePreview(),n.resize_auto==="viewBox"?c.attr("viewBox",`0 0 ${a.width} ${a.height}`):c.attr("width",a.width).attr("height",a.height),s){const u=c.select(`.${Bv.brush} .overlay`),f={width:0,height:0};u.size()&&(f.width=+u.attr("width"),f.height=+u.attr("height")),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select("rect").attr("width",o).attr("height",l),c.select(`#${r.idXAxis}`).select("rect").call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select("rect").call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select("rect").attr("width",o).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var r;const a=this,{config:s,$el:o,state:{hasAxis:l,isCanvasMode:c}}=a,u=s.axis_rotated,f=((r=s.padding)==null?void 0:r.mode)==="fit",d=D(s[`padding_${t}`])?s[`padding_${t}`]:void 0,h=l?{top:u?"y2":null,bottom:u?"y":"x",left:u?"x":"y",right:u?null:"y2"}[t]:null,v=/^(left|right)$/.test(t),b=h&&s[`axis_${h}_inner`],x=h&&s[`axis_${h}_show`],E=h?s[`axis_${h}_axes`].length:0;let w=h?v?a.getAxisWidthByAxisId(h,e):a.getHorizontalAxisHeight(h):0;const N=20;let k=0;!f&&v&&(w=U(w));let B=l&&v&&(b||z(d)&&!x)?0:f?(x?w:0)+(d!=null?d:0):z(d)?w:d;return v&&l?(h&&(f||b)&&s[`axis_${h}_label`].text&&(B+=a.axis.getAxisLabelPosition(h).isOuter?N:0),t==="right"?(B+=u?!f&&z(d)?10:2:!x||b?f?2:1:0,B+=n?a.axis.getXAxisTickTextY2Overflow(N):0):t==="left"&&u&&z(d)&&(B=s.axis_x_show?f?w:Math.max(w,40):1)):t==="top"?((o.title&&o.title.node()||c&&s.title_text)&&(B+=a.getTitlePadding()),k=u&&!b?E:0):t==="bottom"&&l&&u&&!x&&(B+=1),B+w*E-k},getCurrentPadding(t=!1){const e=this,[n,r,a,s]=["top","bottom","left","right"].map(o=>e.getCurrentPaddingByDirection(o,null,t));return{top:n,bottom:r,left:a,right:s}},getResettedPadding(t){const e=this,{config:n}=e,r=D(t);let a=r?0:{};return n.padding===!1?!r&&Object.keys(t).forEach(s=>{a[s]=!tt(n.data_labels)&&n.data_labels!==!1&&s==="top"?t[s]:0}):a=t,a},updateSizes(t){var e,n,r,a,s,o;const l=this,{config:c,state:u,$el:{legend:f}}=l,d=c.axis_rotated,h=l.hasArcType()||u.customType||u.hasTreemap,v=((e=c.padding)==null?void 0:e.mode)==="fit";!t&&l.setContainerSize();const b=f?l.getLegendWidth():0,x=f?l.getLegendHeight():0,E={width:b,height:x};!h&&c.axis_x_show&&c.axis_x_tick_autorotate&&l.updateXAxisTickClip();const w={right:c.legend_show&&u.isLegendRight?b+(v?0:20):0,bottom:!c.legend_show||u.isLegendRight||u.isLegendInset?0:x},N=d||h?0:l.getHorizontalAxisHeight("x"),k=c.subchart_axis_x_show&&c.subchart_axis_x_tick_text_show?N:30,B=c.subchart_show&&!h?c.subchart_size_height+k:0,G=l.hasType("gauge")&&c.arc_needle_show&&!c.gauge_fullCircle&&!c.gauge_label_show?10:0,V=l.getCurrentPadding(!0);if(u.margin=!h&&d?{top:V.top,right:h?0:V.right+w.right,bottom:w.bottom+V.bottom,left:B+(h?0:V.left)}:{top:(v?0:4)+V.top,right:h?0:V.right+w.right,bottom:G+B+w.bottom+V.bottom,left:h?0:V.left},u.margin=l.getResettedPadding(u.margin),u.margin2=d?{top:u.margin.top,right:NaN,bottom:20+w.bottom,left:l.state.rotatedPadding.left}:{top:u.current.height-B-w.bottom,right:NaN,bottom:k+w.bottom,left:u.margin.left},u.margin3={top:0,right:NaN,bottom:0,left:0},(n=l.updateSizeForLegend)==null||n.call(l,E),u.width=u.current.width-u.margin.left-u.margin.right,u.height=u.current.height-u.margin.top-u.margin.bottom,u.width<0&&(u.width=0),u.height<0&&(u.height=0),u.width2=d?u.margin.left-u.rotatedPadding.left-u.rotatedPadding.right:u.width,u.height2=d?u.height:u.current.height-u.margin2.top-u.margin2.bottom,u.width2<0&&(u.width2=0),u.height2<0&&(u.height2=0),l.hasArcType()){const Z=l.hasType("gauge"),Y=c.legend_show&&u.isLegendRight,et=(r=u.hasRadar&&l.cache.get(Me.radarTextWidth))!=null?r:0;u.arcWidth=u.width-(Y?E.width+10:0)-et,u.arcHeight=u.height-(Y&&!Z?0:10),(a=c.arc_rangeText_values)!=null&&a.length&&(Z?(u.arcWidth-=25,u.arcHeight-=10,u.margin.left+=10):(u.arcHeight-=20,u.margin.top+=10)),Z&&!c.gauge_fullCircle&&(u.arcHeight+=u.height-l.getPaddingBottomForGauge()),(s=l.updateRadius)==null||s.call(l)}u.isLegendRight&&h&&!((o=l.customTypeHooks)!=null&&o.ownLegendLayout)&&(u.margin3.left=u.arcWidth/2+u.radiusExpanded*1.1)}},oR={setCssRule(t,e,n,r){const a=this,{config:s,state:{cssRule:o,style:l}}=a;return s.boost_useCssRule?c=>{c.each(u=>{const f=r&&(r==null?void 0:r.call(a,u)),d=`${t?`.${nn.shapes+a.getTargetSelectorSuffix(u.id)}`:""}${e}`;e in o&&l.sheet.deleteRule(o[d]),a.state.cssRule[d]=PC(l,d,n.filter(Boolean).map(h=>$(f)&&h.indexOf(":")===-1?`${h}: ${f}`:h||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:M(t)?t.bind(this):t}};function lR(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function cR(t,e,n,r,a){var s;const o=this,{value:l}=t,c=o.isCandlestickType(t),u=D(l)&&l<0||c&&!((s=o.getCandlestickData(t))!=null&&s._isUp);let{x:f,y:d}=e;const h=4,v=h*2;return r?n==="start"?(f+=u?0:v,d+=h):n==="middle"?(f+=v,d-=v):n==="end"&&(u&&(f-=v),d+=h):(n==="start"?(f+=h,u&&(d+=v*2)):n==="middle"?d-=v:n==="end"&&(f-=h,u&&(d+=v*2)),a&&(d+=u?-17:c?13:7)),{x:f,y:d}}function Fi(t,e){var n;const r=this.config.data_labels_position,{id:a,index:s,value:o}=t;return(n=M(r)?r.bind(this.api)(e,o,a,s,this.$el.text):(a in r?r[a]:r)[e])!=null?n:0}function uR(t,e,n){var r,a;const s=this,{config:o,$T:l}=s,c=o.axis_rotated,{border:{padding:u="3 5",radius:f=10,stroke:d="#000",strokeWidth:h=1,fill:v="none"}}=o.data_labels,b=Ra(u),x=o.data_labels.border!==!0,E=ba(t);let w=Zt(t.previousElementSibling);(w.empty()||((r=w.node())==null?void 0:r.tagName)!=="rect"||!((a=w.attr("class"))!=null&&a.includes(n)))&&(w=Zt(t.parentNode).insert("rect",()=>t).attr("class",`${vn.textBorderRect} ${n}`).attr("width",E.width+(x?b.left+b.right:0)).attr("height",E.height+(x?b.top+b.bottom:0)),x&&w.style("fill",v).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(w).attr("x",e.x-(x?b.left:0)-(c?0:E.width/2)).attr("y",e.y-(x?b.top:0)-E.height/4*3.2)}function Qu(t=0,e){const n=this,{config:r}=n,a=r[`${e}_label_threshold`]||0;return t>=a}function Np(){const t=this,{$el:{text:e},config:n}=t;(t.state.arcWidth?t.getArcLabelConfig("image"):n.data_labels.image)&&e.filter(function(){const a=this.previousElementSibling;return a?a.tagName!=="image"||!a.classList.contains(vn.textLabelImage):!0}).each(function(a){var s,o,l,c;const u=fR.call(t,a);if(!u)return;const{url:f,width:d,height:h,pos:v}=u;if(f){const b=Zt(this.parentNode);b==null||b.insert("image",`${(o=(s=this.getAttribute("class"))==null?void 0:s.replace(/(?:^(.)|\s)/g,".$1"))!=null?o:"text"}`).style("opacity","0").attr("href",x=>Ir(f,{ID:"id"in x?x.id:x.data.id})).attr("class",vn.textLabelImage).style("pointer-events","none").attr("width",d).attr("height",h).attr("transform",v?`translate(${(l=v.x)!=null?l:0} ${(c=v.y)!=null?c:0})`:null)}})}function fR(t){var e;const n=this,{config:r,state:a}=n,s=a.arcWidth?n.getArcLabelConfig("image"):r.data_labels.image;if(M(s))return(e=s.call(n.api,t.value,t.id,t.index))!=null?e:{url:"",width:0,height:0,pos:{x:0,y:0}};if(s){const{url:o="",width:l=0,height:c=0,pos:u}=s;return{url:o,width:l,height:c,pos:u}}return null}function $p(t,e,n){var r;const a=this,{config:s,state:{arcWidth:o,hasTreemap:l}}=a,c=s.axis_rotated,u=Zt(t.previousElementSibling),f=d=>{var h;const v=d.style.opacity!=="0"&&d.style.fillOpacity!=="0";return(o?d.textContent:v)&&((h=this.previousElementSibling)==null?void 0:h.tagName)!=="image"};if(!u.empty()&&((r=u.node())==null?void 0:r.tagName)==="image"){const d=n||en(t),h=+u.attr("width")/2,v=+u.attr("height")/2;let b=e.x-h,x=e.y-v-d.height/2;c?e.x+=h:(l&&(b=-h,x=-(v*2+d.height)),a.hasType("pie")||a.hasType("polar")||(e.y+=v)),a.$T(u).style("opacity",f(t)?null:"0").attr("x",b).attr("y",x)}}function dR(t){return ei(t,e=>e,e=>ba(e,!0))}var hR={opacityForText(t){const e=this;return e.isBarType(t)&&!Qu.call(e,Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel()?null:"0"},initText(){const{$el:t,state:e}=this;t.main.select(`.${Oe.chart}`).append("g").attr("class",vn.chartTexts).style("pointer-events",e.customType||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),a=e.classFocus.bind(e);e.$el.main.select(`.${vn.chartTexts}`).selectAll(`.${vn.chartText}`).data(e.filterNullish(t)).attr("class",l=>`${n(l)}${a(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${vn.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",r)},updateText(){const t=this,{$el:e,$T:n,config:r,axis:a}=t,s=t.getClass("text","index"),o=r.data_labels.centered,l=e.main.selectAll(`.${vn.texts}`).selectAll(`.${vn.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",s).attr("text-anchor",c=>{var u,f;let h=r[`axis_${a==null?void 0:a.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const v=t.getCandlestickData(c);h=!(v!=null&&v._isUp)}else{if(t.isTreemapType(c))return o?"middle":"start";if(t.state.customType){const v=(f=(u=t.getCustomTypeHooks(c))==null?void 0:u.textAnchor)==null?void 0:f.call(u,t,c);if(v)return v}}return r.axis_rotated?h?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,u,f){const d=Zt(this);let{value:h}=c;if(t.isBubbleZType(c))h=t.getBubbleZData(h,"z");else if(t.isCandlestickType(c)){const v=t.getCandlestickData(c);v&&(h=v.close)}h=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(d):t.dataLabelFormat(c.id)(h,c.id,c.index,f),D(h)?this.textContent=h:Ri(d,h,void 0,!0)}),Np.call(t)},updateTextColor(t){var e;const n=this,{config:r}=n,a=r.data_labels_colors,s=n.isArcType(t)&&!n.isRadarType(t)||(e=n.getCustomTypeHooks(t))!=null&&e.themeTextColor||n.isTreemapType(t)?null:n.color(t);let o;if($(a))o=a;else if(rt(a)){const{id:l}=t.data||t;o=a[l]}else M(a)&&(o=a.bind(n.api)(s,t));if(n.isCandlestickType(t)&&!M(a)){const l=n.getCandlestickData(t);if(!(l!=null&&l._isUp)){const c=r.candlestick_color_down;o=rt(c)?c[t.id]:c}}return o||s},updateTextBGColor(t,e){const n=this,{$el:{defs:r}}=n;let a="";if(e){const s=$(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),o=r.select(["filter[id*='labels-bg","']"].join(s));if(o.size()&&(a=`url(#${o.attr("id")})`),M(e)){n.generateTextBGColorFilter(e);const l=n.color(t),c=e.bind(n.api)(l,t);c?o.select("feFlood").attr("flood-color",c):a=""}}return a||null},redrawText(t,e,n,r){const a=this,{$T:s,axis:o,config:l,state:{hasTreemap:c}}=a,u=Vn(!0),f=l.axis_rotated,d=l.data_labels.rotate,h=lR(d),v=d?`rotate(${d})`:"",b=a.$el.text.style("fill",a.getStylePropValue(a.updateTextColor)).attr("filter",w=>a.updateTextBGColor.bind(a)(w,l.data_labels_backgroundColors)).style("fill-opacity",n?0:a.opacityForText.bind(a)),x=new Map,E=[];return b.each(function(w){const N=this;x.set(N,{rect:en(N)}),l.data_labels.centered&&(a.isBarType(w)||a.isTreemapType(w))&&E.push(N)}),E.length>0&&dR(E).forEach((w,N)=>{const k=x.get(N);k&&(k.bbox=w)}),b.each(function(w,N){var k;const B=x.get(this),G=s(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute("x")||this.getAttribute("transform"))),u),V=l[`axis_${o==null?void 0:o.getId(w.id)}_inverted`];let Z={x:t.call(this,w,N,B),y:e.call(this,w,N,B)};d&&(Z=cR.bind(a)(w,Z,h,f,V),G.attr("text-anchor",h)),$p.call(a,this,Z,B==null?void 0:B.rect),this.childElementCount||d?G.attr("transform",`translate(${Z.x} ${Z.y}) ${v}`):(G.attr("x",Z.x).attr("y",Z.y),c&&((k=this.parentNode)==null||k.removeAttribute("transform"))),l.data_labels.border&&uR.call(a,G.node(),Z,`${vn.textBorderRect}-${N}`)}),!0},getTextRect(t,e){var n,r;const a=this;let s,o,l;Array.isArray(t)?s=`${Me.textRect}-${t.join("_")}`:(o=(r=(n=t.node)==null?void 0:n.call(t))!=null?r:t,/text/i.test(o.tagName)||(o=o.querySelector("text")),l=o.textContent,s=`${Me.textRect}-${l.replace(/\W/g,"_")}`);const c=a.cache.get(s)||[];return c.length===0&&((a.$el.svg||a.$el.chart.select("svg")).selectAll(`.${Oe.dummy}`).data(l?[l]:t).enter().append("text").style("visibility","hidden").style("font",o?Zt(o).style("font"):null).classed(e||Oe.dummy,!0).text(u=>u).each(function(u,f){c[f]=en(this)}).remove(),a.cache.add(s,c)),c.length>1?c:c[0]},generateXYForText(t,e){const n=this,{state:{customType:r,hasRadar:a,hasTreemap:s}}=n,o=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return r&&o.push(r),a&&o.push("radar"),s&&o.push("treemap"),o.forEach(u=>{l[u]=n[`generateGet${Ze(u)}Points`](t[u],!1)}),function(u,f,d){const h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||r&&n.isTypeOf(u,r)&&r||n.isCandlestickType(u)&&"candlestick"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return c.call(n,l[h](u,f),u,this,d)}},getCenteredTextPos(t,e,n,r,a){const s=this,{config:o}=s,l=o.axis_rotated,c=s.isBarType(t),u=s.isTreemapType(t);if(o.data_labels.centered&&(c||u)){const f=(a==null?void 0:a.bbox)||ba(n);if(c){const d=s.getRangedData(t,null,"bar")>=0;if(l){const h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return d?-h-3:h+2}else{const h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return d?h:-h-2}}else if(u){const d=f.y-(n.childElementCount?0:+(n.getAttribute("y")||0));return r==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2-d-f.height/2}}return 0},getXForText(t,e,n,r){var a;const s=this,{config:o}=s,l=o.axis_rotated,c=s.isTreemapType(e);let u=t?t[0][0]:0;const f=s.getCustomTypeHooks(e);if(f)return f.textX(s,t,e,n,r);if(s.isCandlestickType(e))l?u=(a=s.getCandlestickData(e))!=null&&a._isUp?t[2][2]+4:t[2][1]-4:u+=(t[1][0]-u)/2;else if(c)u+=o.data_labels.centered?0:5;else if(l){const d=o[`axis_${s.axis.getId(e.id)}_inverted`],h=s.isBarType(e)?4:6,v=e.value;u=t[2][1],u+=h*((d?v>0:v<0)?-1:1)}else u=s.hasType("bar")?(t[2][0]+t[0][0])/2:u;return(l||c)&&(u+=s.getCenteredTextPos(e,t,n,"x",r)),u+Fi.call(this,e,"x")},getYForText(t,e,n,r){const a=this,{axis:s,config:o,state:l}=a,c=o.axis_rotated,u=o[`axis_${s==null?void 0:s.getId(e.id)}_inverted`],f=a.isBarType(e),d=a.isTreemapType(e),h=o.point_r,v=(r==null?void 0:r.rect)||en(n);let{value:b}=e,x=3,E;const w=a.getCustomTypeHooks(e);if(w)return w.textY(a,t,e,n,v,r);if(a.isCandlestickType(e))b=a.getCandlestickData(e),c?(E=t[0][0],E+=(t[1][0]-E)/2+x):(E=b&&b._isUp?t[2][2]-x:t[2][1]+x*4,u&&(E+=15*(b._isUp?1:-1)));else if(d)E=t[0][1]+(o.data_labels.centered?0:v.height+5);else if(c)E=(t[0][0]+t[2][0]+v.height*.6)/2;else if(E=t[2][1],D(h)&&h>5&&(a.isLineType(e)||a.isScatterType(e))&&(x+=o.point_r/2.3),b<0||b===0&&!l.hasPositiveValue&&l.hasNegativeValue)E+=u?f?-3:-5:v.height+(f?-x:x);else{let N=-x*2;f?N=-x:a.isBubbleType(e)&&(N=x),u&&(N=f?10:15),E+=N}return(!c||d)&&(E+=a.getCenteredTextPos(e,t,n,"y",r)),E+Fi.call(this,e,"y")},markOverlapped(t,e,n){const r=e.$el.arcs.selectAll(n),a=r.filter(f=>f.data.id!==t),s=r.filter(f=>f.data.id===t),o=wu(s.node()),l=(f,d)=>Math.sqrt(f*f+d*d);if(!s.node())return;const c=parseInt(s.style("font-size"),10),u=[];a.each(function(){const f=wu(this),d=l(o.e,o.f)>l(f.e,f.f)?s:Zt(this),h=Math.ceil(Math.abs(o.e-f.e))<Math.ceil(d.node().getComputedTextLength()),v=Math.ceil(Math.abs(o.f-f.f))<c;u.push({node:this,overlaps:h&&v})}),u.forEach(({node:f,overlaps:d})=>{Zt(f).classed(vn.TextOverlapping,d)})},undoMarkOverlapped(t,e){t.$el.arcs.selectAll(e).each(function(){Ev([this,this.previousSibling]).classed(vn.TextOverlapping,!1)})}};function Bp(t="left",e){const n=D(e);return t.includes("center")?n?e/2:"middle":t.includes("right")?n?e:"end":n?0:"start"}function gR(t){var e,n,r,a,s,o,l,c;const{config:u,$el:f}=t,d=((r=(n=(e=t.canvasTheme)==null?void 0:e.style)==null?void 0:n.title)==null?void 0:r.font)||((o=(s=(a=t.canvasTheme)==null?void 0:a.style)==null?void 0:s.label)==null?void 0:o.font)||"14px sans-serif",h=(c=(l=f.chart)==null?void 0:l.node)==null?void 0:c.call(l),v=h==null?void 0:h.ownerDocument;if(h&&v&&u.title_text){const b=v.createElementNS("http://www.w3.org/2000/svg","svg"),x=v.createElementNS("http://www.w3.org/2000/svg","text");b.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",x.setAttribute("class",vn.title),x.style.font=d,x.textContent=String(u.title_text),b.appendChild(x),h.appendChild(b);const E=en(x).height;if(b.remove(),E)return E}return u.title_text?parseFloat(d)||14:0}var vR={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const r=n.title.append("text").style("text-anchor",Bp(e.title_position)).attr("class",vn.title);Ri(r,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:r}}=t;if(r){const a=Bp(e.title_position,n.width),s=(e.title_padding.top||0)+t.getTextRect(t.$el.title,vn.title).height;r.attr("transform",`translate(${a}, ${s})`)}},getCanvasTitleHeight(){return gR(this)},getTitlePadding(){const t=this,{$el:{title:e},config:n,state:r}=t,a=n.title_padding.top||0,s=n.title_padding.bottom||0;if(r.isCanvasMode&&n.title_text)return a+t.getCanvasTitleHeight()+s;if(!(e!=null&&e.node()))return a+s;const o=e.node(),l=Os(o,"y");if(l){const c=ba(o);return l+c.y+c.height+s}return a+t.getTextRect(e,vn.title).height+s}};const ks=15,pR=/(\r?\n|\t)/g,mR=/{{(.*)}}/;function _u(t){return`<div style="display:inline-grid;grid-template-columns:auto auto;gap:0 .3em;text-align:left">${t.map(([e,n])=>`<b style="text-align:right">${e}:</b><span>${n}</span>`).join("")}</div>`}var yR={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=Zt(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",Ko.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:r,state:{hasAxis:a,hasRadar:s}}=e;if(n.tooltip_init_show){const o=!(a||s);(t=e.axis)!=null&&t.isTimeSeries()&&$(n.tooltip_init_x)&&(n.tooltip_init_x=bn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[o?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!tt(l)){const{top:c=0,left:u=50}=l;r.tooltip.style("top",$(c)?c:`${c}px`).style("left",$(u)?u:`${u}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:r}=e;return vt(M(r.tooltip_contents)?r.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t))},getTooltipContent(t,e,n,r){var a,s;const o=this,{api:l,config:c,state:u,$el:f}=o,d=c.tooltip_format_title,h=c.tooltip_format_name,v=c.tooltip_format_value,b=M(d)?d.bind(l):e,x=M(h)?h.bind(l):(nt=>nt),E=M(v)?v.bind(l):null,w=(nt,dt,bt,At)=>{let Et=E;return Et||(u.hasTreemap||o.isStackNormalized()&&(!o.isStackNormalizedPerGroup()||o.isGrouped(bt))?Et=(Rt,Vt)=>`${(Vt*100).toFixed(2)}%`:Et=n),Et(nt,dt,bt,At)},N=c.tooltip_order,k=nt=>o.axis&&o.isBubbleZType(nt)?o.getBubbleZData(nt.value,"z"):o.getBaseValue(nt),B=o.levelColor?nt=>o.levelColor(nt.value):nt=>r(nt),G=nt=>{var dt,bt,At;return(At=(bt=(dt=o.customTypeHooks)==null?void 0:dt.tooltipColor)==null?void 0:bt.call(dt,o,nt))!=null?At:B(nt)},V=c.tooltip_contents,Z=V.template,Y=o.mapToTargetIds();if(N===null&&c.data_groups.length){const nt=o.orderTargets(o.data.targets).map(dt=>dt.id).reverse();t.sort((dt,bt)=>{let At=dt?dt.value:null,Et=bt?bt.value:null;return At>0&&Et>0&&(At=dt.id?nt.indexOf(dt.id):null,Et=bt.id?nt.indexOf(bt.id):null),At-Et})}else if(/^(asc|desc)$/.test(N)){const nt=N==="asc";t.sort((dt,bt)=>{const At=dt?k(dt):null,Et=bt?k(bt):null;return nt?At-Et:Et-At})}else M(N)&&t.sort(N.bind(l));const et=o.getTooltipContentTemplate(Z),it=t.length;let at,ot,st,_,lt;for(lt=0;lt<it;lt++){ot=t[lt];const nt=ot&&k(ot);if(!(!ot||!(nt||nt===0))){if(z(at)){const dt=(u.hasAxis||u.hasRadar)&&b(ot.x);at=Ir(et[0],{CLASS_TOOLTIP:Ko.tooltip,TITLE:L(dt)?Z?dt:`<tr><th colspan="2">${dt}</th></tr>`:""})}if(!ot.ratio&&f.arcs&&(st=["arc",o.$el.arcs.select(`path.${Ye.arc}-${ot.id}`).data()[0]],ot.ratio=o.getRatio(...st)),st=[ot.ratio,ot.id,ot.index],o.isAreaRangeType(ot)){const[dt,bt]=["high","low"].map(Et=>w(o.getRangedData(ot,Et),...st)),At=w(k(ot),...st);_=_u([["Mid",At],["High",dt],["Low",bt]])}else if(o.isCandlestickType(ot)){const[dt,bt,At,Et,Rt]=["open","high","low","close","volume"].map(Vt=>o.getRangedData(ot,Vt,"candlestick")?w(o.getRangedData(ot,Vt,"candlestick"),...st):void 0);_=_u([["Open",dt],["High",bt],["Low",At],["Close",Et],...Rt?[["Volume",Rt]]:[]])}else if((a=o.getAxisTypeHooks(ot))!=null&&a.tooltipRows)_=_u(o.getAxisTypeHooks(ot).tooltipRows(o,ot,w,st));else if(o.isBarRangeType(ot)){const{value:dt,id:bt,index:At}=ot;_=`${w(dt,void 0,bt,At)}`}else _=w(k(ot),...st);if(_!==void 0){if(ot.name===null)continue;const dt=x((s=ot.name)!=null?s:ot.id,...st),bt=G(ot),At={CLASS_TOOLTIP_NAME:Ko.tooltipName+o.getTargetSelectorSuffix(ot.id),COLOR:Z||!o.patterns?bt:`<svg><rect style="fill:${bt}" width="10" height="10"></rect></svg>`,NAME:dt,VALUE:_};if(Z&&rt(V.text)){const Et=Y.indexOf(ot.id);Object.keys(V.text).forEach(Rt=>{At[Rt]=V.text[Rt][Et]})}at+=Ir(et[1],At)}}}return`${at}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
|
|
46
45
|
{=TITLE}
|
|
47
46
|
{{<tr class="{=CLASS_TOOLTIP_NAME}">
|
|
48
47
|
<td class="name">${this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>'}{=NAME}</td>
|
|
49
48
|
<td class="value">{=VALUE}</td>
|
|
50
49
|
</tr>}}
|
|
51
|
-
</tbody></table>`).replace(LA,"").split(DA)},setTooltipPosition(t,e){var n,r;const i=this,{config:s,scale:o,state:l,$el:{eventRect:c,tooltip:u,svg:f}}=i,{bindto:d}=s.tooltip_contents,h=s.axis_rotated,m=u==null?void 0:u.datum();if(!d&&m){const S=t!=null?t:m.data,[E,C]=Jn(l.event,e!=null?e:c==null?void 0:c.node()),w={x:E,y:C};if(l.hasAxis&&o.x&&m&&"x"in m){const W=(H=0,Q,q="y")=>{var st;const it=o[Q?(st=i.axis)==null?void 0:st.getId(Q):q];return it?it(H)+(h?l.margin.left:l.margin.top):0};w.xAxis=o.x(m.x)+(s.tooltip_position?h?l.margin.top:l.margin.left:0),S.length===1?w.yAxis=W(S[0].value,S[0].id):w.yAxis=W}const{width:$=0,height:z=0}=m,B=(r=(n=s.tooltip_position)==null?void 0:n.bind(i.api)(S,$,z,c==null?void 0:c.node(),w))!=null?r:f&&Rc(f)?i.getTooltipPositionViewBox.bind(i)($,z,w):i.getTooltipPosition.bind(i)($,z,w);["top","left"].forEach(W=>{const H=B[W];u.style(W,`${H}px`),W==="left"&&!m.xPosInPercent&&(m.xPosInPercent=H/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var r,i;const s=this,{$el:{eventRect:o,svg:l},config:c,state:u}=s,f=c.axis_rotated,d=s.hasArcType()||u.hasFunnel||u.hasTreemap,h=(i=(r=d?l:o)==null?void 0:r.node())!=null?i:u.event.target;let{x:m,y:S}=n;u.hasAxis&&(m=f?m:n.xAxis,S=f?n.xAxis:S);const E=So(h,m,S,!1),C=ln(h),w=So(h,20,0,!1).x;let $=E.y,z=E.x+t/2+w;return d&&(u.hasFunnel||u.hasTreemap||u.hasRadar?(z-=t/2+w,$+=e):($+=C.height/2,z+=C.width/2-(t-w))),z+t>C.width&&(z=C.width-t-w),$+e>C.height&&($-=e*2),{top:$,left:z}},getTooltipPosition(t,e,n){var r,i,s;const o=this,{config:l,scale:c,state:u}=o,{width:f,height:d,current:h,hasFunnel:m,hasRadar:S,hasTreemap:E,isLegendRight:C,inputType:w}=u,$=o.hasType("gauge")&&!l.gauge_fullCircle,z=l.axis_rotated,B=o.hasArcType(),W=u.isCanvasMode?0:o.getSvgLeft(!0);let H=W+h.width-o.getCurrentPaddingByDirection("right");const Q=20;let{x:q,y:st}=n;if(S)q+=q>=f/2?15:-(t+15),st+=15;else if(B){if(w!=="touch"){let ct=(i=(r=o.getTitlePadding)==null?void 0:r.call(o))!=null?i:0;ct&&$&&((s=l.arc_rangeText_values)!=null&&s.length)&&(ct+=10),q+=(f-(C?o.getLegendWidth():0))/2,st+=($?d:d/2+e)+ct}}else if(m||E)st+=e;else{const ot={top:o.getCurrentPaddingByDirection("top",!0),left:o.getCurrentPaddingByDirection("left",!0)};z?(q+=W+ot.left+Q,st=ot.top+n.xAxis+Q,H-=W):(q=W+ot.left+Q+(c.zoom?q:n.xAxis),st+=ot.top-5)}if(q+t+15>H&&(q-=t+(m||E||B?0:z?Q*2:38)),st+e>h.height){const ot=E?e+10:30;st-=$?e*1.5:e+ot}const it={top:st,left:q};return it.top<0&&(it.top=0),it.left<0&&(it.left=0),it},showTooltip(t,e){const n=this,{config:r,$el:{tooltip:i}}=n;if(!i||!r.tooltip_show)return;let s=null,o=0,l=`${n.data.targets.length}:`,c;for(let d=0;d<t.length;d++){const h=t[d];d>0&&(l+=","),l+=`${h==null?void 0:h.index}|${h==null?void 0:h.id}|${h==null?void 0:h.value}`,!c&&h&&(c=h),h&&Ge(n.getBaseValue(h))?(o++,s==null||s.push(h)):s||(s=t.slice(0,d))}if(o===0||!c)return;const u=i.datum();let f=s;if(!u||u.current!==l){const{index:d,x:h}=c;f||(f=t.slice()),Ne(r.tooltip_onshow,n.api,t),i.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null),i.datum({index:d,x:h,current:l,data:t,width:i.property("offsetWidth"),height:i.property("offsetHeight")}),Ne(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,d)}n.setTooltipPosition(f||t,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:r}}=t;e.add(()=>{if(r.style("display")==="block"){const{current:i}=n,{width:s,xPosInPercent:o}=r.datum();let l=i.width/100*o;const c=i.width-(l+s);c<0&&(l+=c),r.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:r,config:i,$el:{tooltip:s}}=n;if(s&&s.style("display")!=="none"&&(!i.tooltip_doNotHide||t)){const o=(e=s.datum().data)!=null?e:[];Ne(i.tooltip_onhide,r,o),s.style("display","none").datum(null),Ne(i.tooltip_onhidden,r,o)}},_handleLinkedCharts(t,e){const n=this,{charts:r,config:i,state:{event:s}}=n;if(s!=null&&s.isTrusted&&i.tooltip_linked&&r.length>1){const o=i.tooltip_linked_name;r.filter(l=>l!==n.api).forEach(l=>{var c,u;const{config:f,$el:d,state:h}=l.internal,m=f.tooltip_linked,S=f.tooltip_linked_name,E=Ye.body.contains(d.chart.node());if(m&&o===S&&E){const C=d.tooltip.data()[0],w=e!==(C==null?void 0:C.index);try{t&&w&&h.isCanvasMode?(u=(c=l.internal).showCanvasLinkedTooltip)==null||u.call(c,e):l.tooltip[t&&w?"show":"hide"]({index:e})}catch($){}}})}},updateTooltipOnRedraw(t,e){var n;const r=this,{config:i,$el:{eventRect:s,svg:o,tooltip:l},state:{event:c,hasAxis:u,hasRadar:f,hasTreemap:d}}=r;if(!r.state.isCanvasMode&&(l==null?void 0:l.style("display"))==="block"&&c){const h=t!=null?t:(n=f?o:s)==null?void 0:n.node();if(u||f)if(r.isMultipleX())r.selectRectForMultipleXs(h,!1);else{const m=e!=null?e:r.getDataIndexFromEvent(c);e===-1?r.api.tooltip.hide():(r.selectRectForSingle(h,m),r.setExpand(m,null,!0))}else{const{clientX:m,clientY:S}=c;setTimeout(()=>{let E=[m,S].every(Number.isFinite)&&Ye.elementFromPoint(m,S);const C=E&&Yt(E).datum();if(C){const w=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(E=o.node()),w&&r.showTooltip([w],E)}else r.api.tooltip.hide()},i.transition_duration)}}}},NA={getTranslate(t,e=0){var n;const r=this,{config:i,state:s}=r,o=i.axis_rotated;let l=0,c,u;if(e&&/^(x|y2?)$/.test(t)&&(l=r.getAxisSize(t)*e),t==="main")c=qa(s.margin.left),u=qa(s.margin.top);else if(t==="context")c=qa(s.margin2.left),u=qa(s.margin2.top);else if(t==="legend")c=s.margin3.left,u=s.margin3.top;else if(t==="x")c=o?-l:0,u=o?0:s.height+l;else if(t==="y")c=o?0:-l,u=o?s.height+l:0;else if(t==="y2")c=o?0:s.width+l,u=o?-l-1:0;else if(t==="subX")c=0,u=o?0:s.height2;else if(t==="subY")c=0,u=o?s.height2:0;else if(t==="subY2")c=o?0:s.width2,u=o?-1:0;else if(t==="arc")c=s.arcWidth/2,u=s.arcHeight/2,(n=i.arc_rangeText_values)!=null&&n.length&&(u+=5+(r.hasType("gauge")&&i.title_text?10:0));else if(t==="polar")c=s.arcWidth/2,u=s.arcHeight/2;else if(t==="radar"){const[f,d]=r.getRadarSize();c=s.width/2-f,u=s.height/2-d}return`translate(${c}, ${u})`},transformMain(t,e){const n=this,{$el:{main:r},$T:i}=n,s=e!=null&&e.axisX?e.axisX:i(r.select(`.${Rn.axisX}`),t),o=e!=null&&e.axisY?e.axisY:i(r.select(`.${Rn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:i(r.select(`.${Rn.axisY2}`),t);i(r,t).attr("transform",n.getTranslate("main")),s.attr("transform",n.getTranslate("x")),o.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),r.select(`.${Ze.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:r,state:{hasAxis:i,hasFunnel:s,hasTreemap:o,isCanvasMode:l},$el:c}=n;l||(!s&&!o&&n.transformMain(t,e),i&&r.subchart_show&&n.transformContext(t,e),c.legend&&n.transformLegend(t))}};const $A=new Set(["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"]);var BA={isValidChartType(t){return!!(t&&Object.values(qt).indexOf(t)>-1)},getSubchartTargetType(t){const e=this,{config:n}=e,r=je(t)?t:t==null?void 0:t.id,i=n.subchart_types||{},s=n.subchart_type,o=n.data_types||{},l=r&&i[r];return l&&e.isValidChartType(l)?l:s&&e.isValidChartType(s)?s:r&&o[r]||n.data_type||qt.LINE},getTargetType(t){var e;const{config:n}=this,r=je(t)?t:t==null?void 0:t.id;return r&&((e=n.data_types)==null?void 0:e[r])||n.data_type||qt.LINE},getSubchartSourceTargetType(t){const{state:e}=this,n=je(t)?t:t==null?void 0:t.id,r=e.subchartSourceTypes;return n&&(r==null?void 0:r[n])||this.getTargetType(t)},isSubchartSourceTypeOf(t,e){const n=this.getSubchartSourceTargetType(t);return qe(e)?e.indexOf(n)>=0:n===e},withSubchartTypeContext(t){const e=this,{config:n,data:r,state:i}=e,s=n.data_type,o=n.data_types,l=i.current.types,c=i.subchartSourceTypes,u={},f={},d=n.subchart_type;e.mapToIds(r.targets).forEach(h=>{f[h]=e.getTargetType(h),u[h]=e.getSubchartTargetType(h)}),n.data_type=d&&e.isValidChartType(d)?d:s,n.data_types=u,i.current.types=[],i.subchartSourceTypes=f;try{return t()}finally{n.data_type=s,n.data_types=o,i.current.types=l,i.subchartSourceTypes=c}},setTargetType(t,e){const n=this,{config:r,state:{withoutFadeIn:i}}=n;n.mapToTargetIds(t).forEach(s=>{i[s]=e===r.data_types[s],r.data_types[s]=e}),t||(r.data_type=e)},updateTypesElements(){const t=this,{state:{current:e}}=t;Object.keys(qt).forEach(n=>{const r=qt[n],i=t.hasType(r,null,!0),s=e.types.indexOf(r);s===-1&&i?e.types.push(r):s>-1&&!i&&e.types.splice(s,1)}),t.setChartElements()},hasType(t,e,n=!1){var r;const i=this,{config:s,state:{current:o}}=i,l=s.data_types,c=e||i.data.targets;return!n&&((r=o.types)==null?void 0:r.indexOf(t))>-1?!0:c!=null&&c.length?c.some(u=>{const f=l[u.id];return f===t||!f&&t==="line"}):Object.keys(l).length?Object.values(l).some(u=>u===t):s.data_type===t},hasTypeOf(t,e,n=[]){return t in en?!en[t].filter(r=>n.indexOf(r)===-1).every(r=>!this.hasType(r,e)):!1},isTypeOf(t,e){const n=je(t)?t:t.id,r=this.config&&this.getTargetType(n);return qe(e)?e.indexOf(r)>=0:r===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=je(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,en.Line)},isStepType(t){return this.isTypeOf(t,en.Step)},isSplineType(t){return this.isTypeOf(t,en.Spline)},isAreaType(t){return this.isTypeOf(t,en.Area)},isAreaRangeType(t){return this.isTypeOf(t,en.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isFunnelType(t){return this.isTypeOf(t,"funnel")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;return(t==null?void 0:t.tagName)==="circle"||e.point_type==="circle"&&(!n||qe(n)&&n.length===0)},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isFunnelType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(e=>ae(e.value)||!!e.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return $A.has(t)}};function Uo(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 ko(t){this._context=t}ko.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:Uo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function zA(t){return new ko(t)}function va(){}function Ov(t){this._context=t}Ov.prototype={areaStart:va,areaEnd:va,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);break}}},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:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function UA(t){return new Ov(t)}function Pv(t){this._context=t}Pv.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||this._line!==0&&this._point===3)&&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:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function kA(t){return new Pv(t)}function Mv(t,e){this._basis=new ko(t),this._beta=e}Mv.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=t[0],i=e[0],s=t[n]-r,o=e[n]-i,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+c*s),this._beta*e[l]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var GA=(function t(e){function n(r){return e===1?new ko(r):new Mv(r,e)}return n.beta=function(r){return t(+r)},n})(.85);function Go(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 _c(t,e){this._context=t,this._k=(1-e)/6}_c.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:Go(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Go(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var XA=(function t(e){function n(r){return new _c(r,e)}return n.tension=function(r){return t(+r)},n})(0);function qc(t,e){this._context=t,this._k=(1-e)/6}qc.prototype={areaStart:va,areaEnd:va,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);break}}},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:Go(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var WA=(function t(e){function n(r){return new qc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function tu(t,e){this._context=t,this._k=(1-e)/6}tu.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||this._line!==0&&this._point===3)&&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:Go(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var VA=(function t(e){function n(r){return new tu(r,e)}return n.tension=function(r){return t(+r)},n})(0);const Lv=Math.abs,Un=Math.atan2,Ua=Math.cos,jA=Math.max,eu=Math.min,Nr=Math.sin,gi=Math.sqrt,kn=1e-12,gs=Math.PI,Xo=gs/2,Wo=2*gs;function HA(t){return t>1?0:t<-1?gs:Math.acos(t)}function Dv(t){return t>=1?Xo:t<=-1?-Xo:Math.asin(t)}function nu(t,e,n){var r=t._x1,i=t._y1,s=t._x2,o=t._y2;if(t._l01_a>kn){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>kn){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*u+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,s,o,t._x2,t._y2)}function Fv(t,e){this._context=t,this._alpha=e}Fv.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);break}(this._line||this._line!==0&&this._point===1)&&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:nu(this,t,e);break}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 YA=(function t(e){function n(r){return e?new Fv(r,e):new _c(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Nv(t,e){this._context=t,this._alpha=e}Nv.prototype={areaStart:va,areaEnd:va,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);break}}},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:nu(this,t,e);break}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 KA=(function t(e){function n(r){return e?new Nv(r,e):new qc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function $v(t,e){this._context=t,this._alpha=e}$v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&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:nu(this,t,e);break}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 ZA=(function t(e){function n(r){return e?new $v(r,e):new tu(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Bv(t){return t<0?-1:1}function zv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,s=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),l=(s*i+o*r)/(r+i);return(Bv(s)+Bv(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function Uv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ru(t,e,n){var r=t._x0,i=t._y0,s=t._x1,o=t._y1,l=(s-r)/3;t._context.bezierCurveTo(r+l,i+l*e,s-l,o-l*n,s,o)}function Vo(t){this._context=t}Vo.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:ru(this,this._t0,Uv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(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,ru(this,Uv(this,n=zv(this,t,e)),n);break;default:ru(this,this._t0,n=zv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function kv(t){this._context=new Gv(t)}(kv.prototype=Object.create(Vo.prototype)).point=function(t,e){Vo.prototype.point.call(this,e,t)};function Gv(t){this._context=t}Gv.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,s){this._context.bezierCurveTo(e,t,r,n,s,i)}};function JA(t){return new Vo(t)}function QA(t){return new kv(t)}function Xv(t){this._context=t}Xv.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]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Wv(t),i=Wv(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],t[o],e[o]);(this._line||this._line!==0&&n===1)&&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)}};function Wv(t){var e,n=t.length-1,r,i=new Array(n),s=new Array(n),o=new Array(n);for(i[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,s[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/s[e-1],s[e]-=r,o[e]-=r*o[e-1];for(i[n-1]=o[n-1]/s[n-1],e=n-2;e>=0;--e)i[e]=(o[e]-i[e+1])/s[e];for(s[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)s[e]=2*t[e+1]-i[e+1];return[i,s]}function _A(t){return new Xv(t)}function Vv(t){this._context=t}Vv.prototype={areaStart:va,areaEnd:va,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))}};function qA(t){return new Vv(t)}function jo(t,e){this._context=t,this._t=e}jo.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&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)}break}}this._x=t,this._y=e}};function tE(t){return new jo(t,.5)}function eE(t){return new jo(t,0)}function nE(t){return new jo(t,1)}const rE={basis:zA,"basis-closed":UA,"basis-open":kA,bundle:GA,cardinal:XA,"cardinal-closed":WA,"cardinal-open":VA,"catmull-rom":YA,"catmull-rom-closed":KA,"catmull-rom-open":ZA,"monotone-x":JA,"monotone-y":QA,natural:_A,"linear-closed":qA,linear:ho,step:tE,"step-after":nE,"step-before":eE};function au(t,e){var n,r;return t.isLineType(e)||((n=t.isScatterType)==null?void 0:n.call(t,e))||((r=t.isBubbleType)==null?void 0:r.call(t,e))}function jv(t){return e=>au(t,e)}function iu(t,e,n){var r,i,s;const o=n?Ho(t,e,n):void 0;return ae(o)?o:(r=t.isCandlestickType)!=null&&r.call(t,e)?(s=(i=t.getCandlestickData)==null?void 0:i.call(t,e))==null?void 0:s.close:t.getBaseValue(e)}function Ho(t,e,n){var r,i,s;if(!n||(r=t.isCandlestickType)!=null&&r.call(t,e)||!((i=t.isSubchartSourceTypeOf)!=null&&i.call(t,e,qt.CANDLESTICK)))return;const o=(s=t.getCandlestickData)==null?void 0:s.call(t,e);if(o)return t.isBarType(e)?ae(o.open)&&ae(o.close)?o._isUp?o.close:o.open:void 0:ae(o.close)?o.close:void 0}function Hv(t,e,n){const r=Ho(t,e,n);return ae(r)&&t.isBarType(e)}function aE(t,e,n){var r;if(!Hv(t,e,n))return null;const i=(r=t.getCandlestickData)==null?void 0:r.call(t,e);if(i!=null&&i._isUp)return t.color(e);const s=t.config.candlestick_color_down;return(s&&typeof s=="object"?s[e.id]:s)||t.color(e)}function iE(t){var e,n;const r=this;let i;if(au(r,t)){const s=jv(r);i=r.generateGetLinePoints(r.getShapeIndices(s),!1,s)}else r.isBarType(t)?i=r.generateGetBarPoints(r.getShapeIndices(r.isBarType)):(e=r.isCandlestickType)!=null&&e.call(r,t)&&(i=(n=r.generateGetCandlestickPoints)==null?void 0:n.call(r,r.getShapeIndices(r.isCandlestickType)));return i}function Yv(t,e,n){return this.config[e]?this.getGradienColortUrl(t.id):n(t)}function Kv(t){const{$el:e}=this,{elKey:n,className:r,cssRules:i,position:s}=t,o=e.main.select(`.${Re.chart}`);e[n]=s==="first"?o.insert("g",":first-child"):o.append("g"),e[n].attr("class",r),i!=null&&i.length&&e[n].call(this.setCssRule(!1,`.${r}`,i))}function su(t,e){const n=this,{$el:r}=n,{type:i,elKey:s,containerClass:o,itemClass:l,initFn:c,withFocus:u=!0,withStyles:f=!0}=e;r[s]||c.call(n);const d=n.getChartClass(i),h=u?n.classFocus.bind(n):()=>"",S=r.main.select(`.${o}`).selectAll(`.${l}`).data(n.filterNullish(t)).attr("class",E=>d(E)+h(E)).enter().append("g").attr("class",d);return f&&S.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),S}var sE={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:r}=t.state,i={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area"].forEach(s=>{const o=Ln(s);if(t.hasType(s)||t.hasTypeOf(o)||s==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${o}Type`]),c=t[`generateDraw${o}`];i.indices[s]=l,i.type[s]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||r){let s,o,l,c;r||(s=n?t.radarCircleX:e?t.circleY:t.circleX,o=n?t.radarCircleY:e?t.circleX:t.circleY),r&&t.state.isCanvasMode?l=c=function(){}:(l=t.generateXYForText(i.indices,!0),c=t.generateXYForText(i.indices,!1)),i.pos={xForText:l,yForText:c,cx:(s||function(){}).bind(t),cy:(o||function(){}).bind(t)}}return i},getShapeIndices(t){const e=this,{config:n}=e,r=n.data_xs,i=vn(r),s={};let o=i?{}:0;return i&&zl(Object.keys(r).map(l=>r[l])).forEach(l=>{o[l]=0,s[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const u=l.id in r?r[l.id]:"",f=u?s[u]:s;for(let d=0,h;h=n.data_groups[d];d++)if(!(h.indexOf(l.id)<0))for(let m=0,S;S=h[m];m++){if(S in f){f[l.id]=f[S];break}l.id!==S&&u&&(f[S]=(c=f[l.id])!=null?c:o[u])}mn(f[l.id])&&(f[l.id]=u?o[u]++:o++,f.__max__=(u?o[u]:o)-1)}),s},getIndices(t,e,n){const r=this,{data_xs:i,bar_indices_removeNull:s}=r.config,{id:o,index:l}=e;if(r.isBarType(o)&&s){const c={};return r.getAllValuesOnIndex(l,!0).forEach((u,f)=>{c[u.id]=f,c.__max__=f}),c}return vn(i)?t[i[o]]:t},getIndicesMax(t){if(!vn(this.config.data_xs))return t.__max__;let e=0;for(const n in t)e+=t[n].__max__||0;return e},getShapeX(t,e,n){const r=this,{config:i,scale:s}=r,o=n?s.subX:s.zoom||s.x,l=i.bar_overlap,c=i.bar_padding,u=(h,m)=>h+m,f=Kn(t)&&(t._$total.length?t._$total.reduce(u)/2:0),d=[];if(f&&Kn(t)&&t._$total.length){let h=0;for(const m of t._$total)h+=m,d.push(h)}return h=>{var m;const S=r.getIndices(e,h,"getShapeX"),E=h.id in S?S[h.id]:0,C=(S.__max__||0)+1;let w=0;if(vn(h.x)){const $=o(h.x,!0);if(f){const z=t[h.id]||t._$width;w=l?$-z/2:$-z+((m=d[E])!=null?m:t._$total.slice(0,E+1).reduce(u))-f}else w=$-(ae(t)?t:t._$width)*(C/2-(l?1:E))}return t&&w&&C>1&&c&&(E&&(w+=c*E),C>2?w-=(C-1)*c/2:C===2&&(w-=c/2)),w}},getShapeY(t){const e=this,n=e.isStackNormalized();return r=>{let{value:i}=r;const s=t?Ho(e,r,t):void 0;return ae(r)?i=r:ae(s)?i=s:e.isAreaRangeType(r)?i=e.getBaseValue(r,"mid"):n?i=e.getRatio("index",r,!0):e.isBubbleZType(r)?i=e.getBubbleZData(r.value,"y"):e.isBarRangeType(r)&&(i=i[1]),e.getYScaleById(r.id,t)(i)}},getShapeYMin(t,e=!1){const n=this,r=n.axis.getId(t),i=n.getYScaleById(t,e),[s]=i.domain(),o=n.config[`axis_${r}_inverted`];return!n.isGrouped(t)&&!o&&s>0?s:0},getShapeOffsetData(t,e){const n=this,r=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),i=n.state.dataGeneration,s=r.map(h=>h.id).join("_"),o=`${Oe.shapeOffset}_${e?"sub":"main"}_${s}`,l=n.cache.get(o);if((l==null?void 0:l.generation)===i)return l;const c=n.isStackNormalized(),u=r.map(h=>{let m=h.values;const S={};n.isStepType(h)&&(m=n.convertValuesToStep(m));const E=m.reduce((C,w)=>{const $=Number(w.x),z=iu(n,w,e);return C[$]=w,S[$]=c?n.getRatio("index",w,!0):z,C},{});return{id:h.id,rowValues:m,rowValueMapByXValue:E,values:S}}),f=r.reduce((h,{id:m},S)=>(h[m]=S,h),{}),d={generation:i,indexMapByTargetId:f,shapeOffsetTargets:u};return n.cache.add(o,d),d},getShapeOffset(t,e,n){const r=this,{shapeOffsetTargets:i,indexMapByTargetId:s}=r.getShapeOffsetData(t,n),o=r.config.data_groupsZeroAs;let l=null;if(!r.config.bar_indices_removeNull){l=new Map;for(const c of i){const u=r.getIndices(e,{id:c.id,index:0});l.set(c.id,i.filter(f=>f.id!==c.id&&u[f.id]===u[c.id]))}}return(c,u)=>{var f;const{id:d,value:h,x:m}=c,S=iu(r,c,n),E=r.getIndices(e,c),C=r.getYScaleById(d,n);if(r.isBarRangeType(c))return C(h[0]);const w=Number(m),$=C(o==="zero"?0:r.getShapeYMin(d,n));let z=$;const B=(f=l==null?void 0:l.get(d))!=null?f:i.filter(W=>W.id!==d&&E[W.id]===E[d]);for(const W of B){const{id:H,rowValueMapByXValue:Q,rowValues:q,values:st}=W;if(s[H]<s[d]){const it=st[w];let ot=q[u];(!ot||Number(ot.x)!==w)&&(ot=Q[w]);const ct=ot&&iu(r,ot,n);ae(ct)&&ae(S)&&ct*S>=0&&ae(it)&&(S!==0||o==="positive"&&it>0||o==="negative"&&it<0)&&(z+=C(it)-$)}}return z}},generateGetLinePoints(t,e,n){const r=this,{config:i}=r,s=r.getShapeX(0,t,e),o=r.getShapeY(e),l=r.getShapeOffset(n||r.isLineType,t,e),c=r.getYScaleById.bind(r),u=new Map;return(f,d)=>{let h=u.get(f.id);h===void 0&&(h=c.call(r,f.id,e)(r.getShapeYMin(f.id,e)),u.set(f.id,h));const m=l(f,d)||h,S=s(f);let E=o(f);i.axis_rotated&&(f.value>0&&E<h||f.value<0&&h<E)&&(E=h);const C=[S,E-(h-m)];return[C,C,C,C]}},generateGetAreaPoints(t,e){const n=this,{config:r}=n,i=n.getShapeX(0,t,e),s=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n),c=new Map;return function(u,f){let d=c.get(u.id);d===void 0&&(d=l.call(n,u.id,e)(n.getShapeYMin(u.id,e)),c.set(u.id,d));const h=o(u,f)||d,m=i(u),S=u.value;let E=s(u);return r.axis_rotated&&(S>0&&E<d||S<0&&d<E)&&(E=d),[[m,h],[m,E-(d-h)],[m,E-(d-h)],[m,h]]}},generateGetBarPoints(t,e){const n=this,{config:r}=n,i=e?n.axis.subX:n.axis.x,s=n.getIndicesMax(t)+1,o=n.getBarW("bar",i,s),l=n.getShapeX(o,t,!!e),c=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n),d=new Map;return(h,m)=>{const{id:S}=h;let E=d.get(S);E||(E={y0:f.call(n,S,e)(n.getShapeYMin(S,e)),isInverted:r[`axis_${n.axis.getId(S)}_inverted`]},d.set(S,E));const{y0:C,isInverted:w}=E,$=u(h,m)||C,z=ae(o)?o:o[h.id]||o._$width,B=h.value,W=l(h);let H=c(h);r.axis_rotated&&!w&&(B>0&&H<C||B<0&&C<H)&&(H=C),n.isBarRangeType(h)||(H-=C-$);const Q=W+z;return[[W,$],[W,H],[Q,H],[Q,$]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=iE.bind(n)(t)),i?i(t,e)[0][1]:n.getYScaleById(r)(n.getBaseValue(t))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=jv(e),r=e.generateGetLinePoints(e.getShapeIndices(n),t,n),i=e.getShapeY(t);return(s,o)=>{const l=s.id;return e.isGrouped(l)&&au(e,s)?r(s,o)[0][1]:i(s)}},getSubchartCandlestickShapeValue(t,e){return Ho(this,t,e)},isSubchartCandlestickBarValue(t,e){return Hv(this,t,e)},getSubchartCandlestickBarColor(t,e){return aE(this,t,e)},pointR(t){const e=this,{config:n}=e,r=n.point_r;let i=r;return e.isBubbleType(t)?i=e.getBubbleR(t):ie(r)&&(i=r.bind(e.api)(t)),t.r=i,i},pointExpandedR(t){const e=this,{config:n}=e,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return ie(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)ie(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},getBarW(t,e,n){var r,i,s,o,l;const c=this,{config:u,org:f,scale:d,state:h}=c,m=c.getMaxDataCount(),S=t==="bar"&&((r=u.data_groups)==null?void 0:r.length),E=`${t}_width`,{k:C}=(s=(i=c.getZoomTransform)==null?void 0:i.call(c))!=null?s:{k:1},w=[(o=u.axis_x_min)!=null?o:f.xDomain[0],(l=u.axis_x_max)!=null?l:f.xDomain[1]].map(W=>c.axis.isTimeSeries()?Wn.call(c,W):Number(W));let $=e.tickInterval(m);if(d.zoom&&!c.axis.isCategorized()&&C>1){const W=w.every((H,Q)=>H===f.xDomain[Q]);$=f.xDomain.map((H,Q)=>{const q=W?H:H-Math.abs(w[Q]);return d.zoom(q)}).reduce((H,Q)=>Math.abs(H)+Q)/m}const z=W=>{const H=W?u[E][W]:u[E],Q=W?H.ratio:u[`${E}_ratio`],q=W?H.max:u[`${E}_max`],st=ae(H)?H:ie(H)?H.call(c,h.width,n,m):n?$*Q/n:0;return q&&st>q?q:st};let B=z();return!S&&Kn(u[E])&&(B={_$width:B,_$total:[]},c.getTargetsToShow().forEach(W=>{u[E][W.id]&&(B[W.id]=z(W.id),B._$total.push(B[W.id]||B._$width))})),B},getShapeByIndex(t,e,n){const r=this,{$el:i}=r,s=Ge(e)?`-${e}`:"";let o=i[t];return o&&!o.empty()?o=o.filter(l=>n?l.id===n:!0).filter(l=>Ge(e)?l.index===e:!0):o=(n?i.main.selectAll(`.${Re[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${Re[t]}${s}`),o},isWithinShape(t,e){var n;const r=this,i=Yt(t);let s;return r.isTargetToShow(e.id)?(n=r.hasValidPointType)!=null&&n.call(r,t.nodeName)?s=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(r.getBaseValue(e))):r.isWithinCircle(t,r.isBubbleType(e)?r.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(s=i.classed(Re.bar)?r.isWithinBar(t):!0):s=!1,s},getInterpolate(t){const n=this.getInterpolateType(t);return rE[n]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?r=>{const i=e.getInterpolate(t)(r);return i.orgPoint=i.point,i.pointRotated=function(s,o){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+o*this._t;this._context.lineTo(this._x,l),this._context.lineTo(s,l),this._x=s,this._y=o},i.point=function(s,o){this._point===0?this.orgPoint(s,o):this.pointRotated(s,o)},i}:e.getInterpolate(t)},getInterpolateType(t){const e=this,{config:n}=e,r=n.spline_interpolation_type,i=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=Jn(this.state.event,t),n=Rh(t),[r,i,s]=n,o=Math.min(r.x,i.x),l=Math.min(r.y,i.y),c=this.config.bar_sensitivity,u=Math.abs(s.x-i.x),f=Math.abs(r.y-i.y),d=o-c,h=o+u+c,m=l+f+c,S=l-c;return d<e[0]&&e[0]<h&&S<e[1]&&e[1]<m}},oE=Object.defineProperty,lE=(t,e,n)=>e in t?oE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>lE(t,typeof e!="symbol"?e+"":e,n);function Zv(){var t,e,n;return(n=(e=(t=se.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function cE(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function uE(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?cE(t):null;i&&((n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] render.mode='canvas' is ignored for ${i}; falling back to SVG.`),r.render_mode="svg")}class Sr{constructor(e){Gn(this,"api"),Gn(this,"config"),Gn(this,"cache"),Gn(this,"$el"),Gn(this,"state"),Gn(this,"charts"),Gn(this,"data",{xs:{},targets:[]}),Gn(this,"axis"),Gn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Gn(this,"org",{xScale:null,xDomain:null}),Gn(this,"color"),Gn(this,"patterns"),Gn(this,"levelColor"),Gn(this,"point"),Gn(this,"brush"),Gn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new $a,n.cache=new B1;const r=new D1;n.$el=r.getStore("element"),n.state=r.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,r){const{config:i,state:s}=this,o=i.transition_duration,l=i.subchart_show;let c=e;return c&&("tagName"in c&&(c=Yt(c)),c=(n!==!1&&o||n)&&(!s.zooming||s.dragging)&&!s.resizing&&s.rendered&&!l?c.transition(r).duration(o):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),Ne(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),Ne(e.config.onafterinit,e.api)}init(){const e=this,{config:n,state:r,$el:i}=e,{boost_useCssRule:s,bindto:o}=n;z1(e),uE(e);const l=e.hasArcType();if(r.hasRadar=!r.hasAxis&&e.hasType("radar"),r.hasFunnel=!r.hasAxis&&e.hasType("funnel"),r.hasTreemap=!r.hasAxis&&e.hasType("treemap"),r.hasAxis=!l&&!r.hasFunnel&&!r.hasTreemap,r.datetimeId=`bb-${+new Date*Ir()}`,s){const u=Ye.createElement("style");u.type="text/css",Ye.head.appendChild(u),r.style={rootSelector:`.${r.datetimeId}`,sheet:u.sheet},i.style=u}const c={element:o,classname:"bb"};He(o)&&(c.element=o.element||"#chart",c.classname=o.classname||c.classname),i.chart=ie(c.element.node)?o.element:Yt(c.element||[]),i.chart.empty()&&(i.chart=Yt(Ye.body.appendChild(Ye.createElement("div")))),i.chart.html("").classed(c.classname,!0).classed(r.datetimeId,s).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:r,state:i,$el:{chart:s}}=n,o=()=>j1(s,{display:"none",visibility:"hidden"}),l=r.render.lazy===!1?!1:r.render.lazy||o(),c=se.MutationObserver;l&&c&&r.render.observe!==!1&&!e&&new c((u,f)=>{o()||(f.disconnect(),!i.rendered&&n.initToRender(!0))}).observe(s.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(r,u=>{n.initWithData(u),n.afterInit()})}initParams(){var e,n;const r=this,{config:i,format:s,state:o}=r;if(i.render_mode==="canvas"&&((e=r.prepareCanvasConfig)==null||e.call(r)),r.color=r.generateColor(),r.levelColor=r.generateLevelColor(),i.padding===!1&&(i.axis_x_show=!1,i.axis_y_show=!1,i.axis_y2_show=!1,i.subchart_show=!1),i.render_mode!=="canvas"&&(r.hasPointType()||(n=r.hasLegendDefsPoint)!=null&&n.call(r))&&(r.point=r.generatePoint()),o.hasAxis){r.initClip(),s.extraLineClasses=r.generateExtraLineClass(),s.dataTime=i.data_xLocaltime?Ff:Nf,s.axisTime=i.axis_x_localtime?Dl:Fl;const f=i.zoom_enabled&&i.zoom_type==="drag";s.defaultAxisTime=d=>{const{x:h,zoom:m}=r.scale,S=f?m:m&&h.orgDomain().toString()!==m.domain().toString(),E=d.getMilliseconds()&&".%L"||d.getSeconds()&&".:%S"||d.getMinutes()&&"%I:%M"||d.getHours()&&"%I %p"||d.getDate()!==1&&"%b %d"||S&&d.getDate()===1&&"%b'%y"||d.getMonth()&&"%-m/%-d"||"%Y";return s.axisTime(E)(d)}}const{legend_position:l,legend_inset_anchor:c,axis_rotated:u}=i;o.isLegendRight=l==="right",o.isLegendInset=l==="inset",o.isLegendTop=c==="top-left"||c==="top-right",o.isLegendLeft=c==="top-left"||c==="bottom-left",o.rotatedPadding.top=r.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=u&&!i.axis_x_show?0:30,o.inputType=H1(i.interaction_inputType_mouse,i.interaction_inputType_touch)}initWithData(e){var n,r,i,s,o,l;const c=this,{config:u,scale:f,state:d,$el:h,org:m}=c,{hasAxis:S,hasFunnel:E,hasTreemap:C}=d,w=u.interaction_enabled,$=c.hasType("polar"),z=u.data_labels_backgroundColors;if(S&&(c.axis=c.getAxisInstance(),u.zoom_enabled&&c.initZoom()),c.data.xs={},c.data.targets=c.convertDataToTargets(e),u.data_filter&&(c.data.targets=c.data.targets.filter(u.data_filter.bind(c.api))),u.data_hide&&c.addHiddenTargetIds(u.data_hide===!0?c.mapToIds(c.data.targets):u.data_hide),u.legend_hide&&c.addHiddenLegendIds(u.legend_hide===!0?c.mapToIds(c.data.targets):u.legend_hide),c.updateSizes(),c.updateScales(!0),S){const{x:H,y:Q,y2:q,subX:st,subY:it,subY2:ot}=f;H&&(H.domain(ti(c.getXDomain(c.data.targets),!u.axis_x_inverted)),st.domain(H.domain()),m.xDomain=H.domain()),Q&&(Q.domain(c.getYDomain(c.data.targets,"y")),it.domain(Q.domain())),q&&(q.domain(c.getYDomain(c.data.targets,"y2")),ot&&ot.domain(q.domain()))}if(u.render_mode==="canvas"){if(!c.initCanvas)throw Error("[billboard.js] Please import and call canvas() to use render.mode='canvas'.");if(c.bindResize(),c.initCanvas(),u.tooltip_show&&c.initTooltip(),c.callPluginHook("$init"),Ne(u.oninit,c.api),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),w&&d.inputType){const H=d.inputType==="touch",{onclick:Q,onover:q,onout:st}=u,it=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,ot=Ra(it)&&it||!1,ct=!isNaN(it)&&it||null,gt=H?{passive:!ot&&ct===null}:void 0;h.svg.on("click",(Q==null?void 0:Q.bind(c.api))||null).on(H?"touchstart":"mouseenter",(q==null?void 0:q.bind(c.api))||null,gt).on(H?"touchend":"mouseleave",(st==null?void 0:st.bind(c.api))||null)}u.svg_classname&&h.svg.attr("class",u.svg_classname);const B=ie(u.color_tiles)&&c.patterns;(S||B||$||C||z||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),S&&["id","idXAxis","idYAxis","idGrid"].forEach(H=>{c.appendClip(h.defs,d.clip[H])}),c.generateTextBGColorFilter(z),B&&c.patterns.forEach(H=>h.defs.append(()=>H.node))),c.updateSvgSize(),c.bindResize();const W=h.svg.append("g").classed(ze.main,!0).attr("transform",E||C?null:c.getTranslate("main"));if(h.main=W,u.subchart_show&&c.initSubchart(),u.tooltip_show&&c.initTooltip(),u.title_text&&c.initTitle(),!C&&u.legend_show&&c.initLegend(),u.data_empty_label_text&&W.append("text").attr("class",`${En.text} ${ze.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),S&&(u.regions.length&&((i=c.initRegion)==null||i.call(c)),!u.clipPath&&c.axis.init()),W.append("g").classed(ze.chart,!0).attr("clip-path",S?d.clip.path:null),c.callPluginHook("$init"),c.initChartElements(),S&&(w&&((s=c.initEventRect)==null||s.call(c)),(o=c.initGrid)==null||o.call(c),u.clipPath&&((l=c.axis)==null||l.init())),c.updateTargets(c.data.targets),c.updateDimension(),Ne(u.oninit,c.api),c.setBackground(),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}u.tooltip_show&&c.initShowTooltip(),d.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:r,hasTreemap:i}=e.state,s=[];if(n){const o=["bar","bubble","candlestick","line"];e.config.bar_front&&o.push(o.shift());for(const l of o){const c=Ln(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&s.push(c)}}else if(i)s.push("Treemap");else if(e.hasType("funnel"))s.push("Funnel");else{const o=e.hasType("polar"),l=e.hasType("gauge");r||s.push("Arc","Pie"),l?s.push("Gauge"):r?s.push("Radar"):o&&s.push("Polar")}for(const o of s)e[`init${o}`]();vn(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:r,defs:i,main:s,tooltip:o,legend:l,title:c,canvas:u,eventOverlay:f,grid:d,needle:h,arcs:m,circle:S,bar:E,candlestick:C,line:w,area:$,text:z}}=e;e.api.$={chart:n,svg:r,canvas:u,eventOverlay:f,defs:i,main:s,tooltip:o,legend:l,title:c,grid:d,arc:m,circles:S,bar:{bars:E},candlestick:C,line:{lines:w,areas:$},needle:h,text:{texts:z}}}setBackground(){const e=this,{config:{background:n},state:r,$el:{svg:i}}=e;if(vn(n)){const s=i.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?s.attr("href",n.imgUrl):n.color&&s.style("fill",n.color).attr("clip-path",r.clip.path),s.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n,r;const i=this,{hasAxis:s,hasFunnel:o,hasRadar:l,hasTreemap:c}=i.state,u=d=>i[`updateTargetsFor${d}`](e.filter(i[`is${d}Type`].bind(i)));if(i.updateTargetsForText(e),s){const d=["bar","candlestick","line"];for(const h of d){const m=Ln(h);(h==="line"&&i.hasTypeOf(m)||i.hasType(h))&&u(m)}(n=i.updateTargetsForSubchart)==null||n.call(i,e)}else if(i.hasArcType(e)){let d="Arc";l?d="Radar":i.hasType("polar")&&(d="Polar"),u(d)}else o?u("Funnel"):c&&u("Treemap");const f=i.hasType("bubble")||i.hasType("scatter");f&&((r=i.updateTargetForCircle)==null||r.call(i)),i.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:r},$T:i}=n;let s=`.${ze.target}`;e&&(s+=`, .${$n.chartCircles} > .${$n.circles}`),i(r.selectAll(s).filter(o=>n.isTargetToShow(o.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};for(const[r,i]of Object.entries(n)){const s=je(i)?n[i]:i;n[r]=ia(e,`with${r}`,s)}return n}initialOpacity(e){const n=this,{withoutFadeIn:r}=n.state;return n.getBaseValue(e)!==null&&r[e.id]?null:"0"}bindResize(){var e,n;const r=this,{$el:i,config:s,state:o}=r,{resize_auto:l,resize_live:c}=s,u=/^(true|parent)$/.test(l),f=[],d=()=>{var S;const E=o.current.width,C=o.current.height;return r.setContainerSize(),!o.resizePreview&&E===o.current.width&&C===o.current.height?!1:(o.resizing=!0,o.dirty.size=!0,s.legend_show&&(r.updateSizes(),o.isCanvasMode?(S=r.updateHtmlLegend)==null||S.call(r):r.updateLegend()),r.api.flush(!1),!0)},h=()=>{if(o.resizeLiveScale===null&&(o.resizeLiveScale=o.resizeRedrawTime>dt),o.resizeLiveScale){r.previewResize();return}const S=Zv();d()&&(o.resizeRedrawTime=Zv()-S,o.resizeLiveScale=o.resizeRedrawTime>dt)},m=Z1(s.resize_timer,u&&c?h:void 0);f.push(()=>Ne(s.onresize,r.api)),u&&f.push(d),f.push(()=>{Ne(s.onresized,r.api),o.resizing=!1,o.resizeLiveScale=null}),f.forEach(S=>m.add(S)),r.resizeFunction=m,l==="parent"&&se.ResizeObserver?(r.resizeFunction.resizeObserver=new se.ResizeObserver(r.resizeFunction.bind(r))).observe(i.chart.node().parentNode):(l==="parent"&&((n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.")),se.addEventListener("resize",r.resizeFunction))}callPluginHook(e,...n){this.config.plugins.forEach(r=>{e==="$beforeInit"&&(r.$$=this,this.api.plugins.push(r)),r[e](...n)})}}xn(Sr.prototype,[pb,xb,yb,Ob,Mb,Nb,uA,wb,fA,TA,bA,jy,sE,SA,AA,OA,MA,FA,NA,BA]);const ou=[yr,er,Vn,kl],Jv=10,fE=750,Qv=6,dE=2,hE=1e5,vE={"&":"&","<":"<",">":">",'"':""","'":"'"},Yo=new WeakMap;function _v(t){var e,n;(n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] ${t}`)}function Ko(t,e){var n;const{config:r}=t,i=(n=r.data_names[e])!=null?n:e;return ie(r.legend_format)?r.legend_format(i,e!==i?e:void 0):i}function gE(t){return`${t}`.replace(/[&<>"']/g,e=>vE[e])}function pE(t,e){var n,r;const{config:i}=t,s=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],o=((r=t.getValidPointPattern)==null?void 0:r.call(t))||(Array.isArray(i.point_pattern)&&i.point_pattern.length?i.point_pattern:[i.point_type]),l=Math.max(0,s.indexOf(e));return o[l%o.length]||"circle"}function mE(t,e){const n=gE(t.color(e)),r=pE(t,e),i='viewBox="0 0 8 8" aria-hidden="true" focusable="false" style="display:block;width:100%;height:100%;overflow:visible;pointer-events:none"',s=`fill="${n}" stroke="${n}"`;return/^rect(angle)?$/i.test(r)?`<svg ${i}><rect x="1" y="1" width="6" height="6" ${s}></rect></svg>`:!r||/^circle$/i.test(r)?`<svg ${i}><circle cx="4" cy="4" r="3" ${s}></circle></svg>`:`<svg ${i}><g ${s}>${pr(r)}</g></svg>`}function xE(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(Oe.legendItemMap,n)}function qv(t,e){const{config:n}=t;e.attr("class",function(r){const s=`${Yt(this).attr("class")||""} ${t.generateClass($e.legendItem,r)}`;return Array.from(new Set(s.trim().split(/\s+/).filter(Boolean))).join(" ")}).style("visibility",r=>t.isLegendToShow(r)?null:"hidden").classed($e.legendItemHidden,r=>!t.isTargetToShow(r)).classed(cr.legendItemInteractive,!!n.interaction_enabled),xE(t,e)}function yE(t,e){var n;const{legend:r}=t.$el,i=((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e];r==null||r.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,s=>i.indexOf(s)>=0).style("opacity",function(s){return i.indexOf(s)>=0?null:t.opacityForUnfocusedLegend.call(t,Yt(this))})}function TE(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,!1).style("opacity",null)}function bE(t,e){var n,r,i;const{state:s}=t,l=(((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e]).filter(t.isTargetToShow,t),c=new Set(l),u=(((r=t.mapToTargetIds)==null?void 0:r.call(t))||[]).filter(f=>!c.has(f)&&t.isTargetToShow(f));s.focusedTargetIds=c,s.defocusedTargetIds=new Set(u),(i=t.renderCanvasFrame)==null||i.call(t,void 0,null,!1)}function tg(t){var e,n,r;const{state:i}=t,s=!!((e=i.focusedTargetIds)!=null&&e.size)||!!((n=i.defocusedTargetIds)!=null&&n.size);i.focusedTargetIds=new Set,i.defocusedTargetIds=new Set,s&&((r=t.renderCanvasFrame)==null||r.call(t,void 0,null,!1))}function eg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function SE(t,e,n){const r=eg(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function ng(t,e){const n=t.state.canvasLegendTouch,r=n&&eg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Jv||Math.abs(r.clientY-n.y)>Jv)}function AE(t,e,n){ng(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function EE(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function CE(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<fE;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function rg(t,e){const{api:n,config:r,state:i}=t;if(e.on("click dblclick mouseover mouseout touchstart touchmove touchend",null),!r.interaction_enabled)return;const s=r.legend_item_interaction,o=typeof s=="object"&&(s!=null&&s.dblclick)?"dblclick":"click",l=i.inputType==="touch",c=s||ie(r.legend_item_onclick),u=l?ug(r):void 0,f=function(d,h){var m;if(!Ne(r.legend_item_onclick,n,h,!i.hiddenTargetIds.has(h))){const S=Yt(this);d.type==="dblclick"||d.altKey?i.hiddenTargetIds.size&&!S.classed($e.legendItemHidden)?n.show():(n.hide(),n.show(h)):(n.toggle(h),S.classed(nn.legendItemFocused,!1)),tg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(o,c?function(d,h){l&&d.type==="click"&&CE(t,h)||f.call(this,d,h)}:null),l&&o==="click"&&c&&e.on("touchstart",function(d,h){SE(t,h,d)},u).on("touchmove",d=>{ng(t,d)},u).on("touchend",function(d,h){AE(t,h,d)&&(EE(t,h),f.call(this,d,h))},u),!l&&e.on("mouseover",s||ie(r.legend_item_onover)?function(d,h){Ne(r.legend_item_onover,n,h,!i.hiddenTargetIds.has(h))||!i.transiting&&t.isTargetToShow(h)&&(yE(t,h),bE(t,h))}:null).on("mouseout",s||ie(r.legend_item_onout)?function(d,h){Ne(r.legend_item_onout,n,h,!i.hiddenTargetIds.has(h))||(TE(t),tg(t))}:null)}function IE(t,e){var n,r;const i=(r=(n=t.$el.chart)==null?void 0:n.node)==null?void 0:r.call(n),s=i==null?void 0:i.ownerDocument;if(!i||!s)return null;const o=s.createElementNS("http://www.w3.org/2000/svg","svg"),l=s.createElementNS("http://www.w3.org/2000/svg","g"),c=s.createElementNS("http://www.w3.org/2000/svg","text");o.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",l.setAttribute("class",$e.legendItem),c.textContent=e,l.appendChild(c),o.appendChild(l),i.appendChild(o);const u=ln(c);return o.remove(),u}function ag(t){return/^(indexed|category|log|timeseries)$/.test(t)}function Zo(t){return/^(indexed|log|timeseries)$/.test(t)}function RE(t){var e,n;const r=t;return((e=r.changedTouches)==null?void 0:e[0])||((n=r.touches)==null?void 0:n[0])||("clientX"in t?t:null)}function wE(t,e,n=!1){var r,i;const s=ps(t,e);return s?n?(i=(r=t.hitDetector).findNearestShape)==null?void 0:i.call(r,s[0],s[1]):t.hitDetector.findNearest(s[0],s[1]):null}function OE(t,e){var n;const{config:r,state:i}=t,{height:s,margin:o,width:l,xAxisHeight:c}=i,[u,f]=e,d=o.left,h=o.left+l,m=o.top,S=o.top+s,E=r.axis_x_show?Math.max(c||0,24):0;return(n=t.isMultipleX)!=null&&n.call(t)||i.hasTreemap?!1:r.axis_rotated?f>=m&&f<=S&&u>=d-E&&u<=h:u>=d&&u<=h&&f>=m&&f<=S+E}function PE(t,e){const{state:{height:n,margin:r,width:i}}=t,[s,o]=e;return s>=r.left&&s<=r.left+i&&o>=r.top&&o<=r.top+n}function ME(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(OE(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function ig(t,e){var n;const{config:r,state:i}=t,s=t.filterTargetsToShow(t.data.targets),o=cg(t,e),l=r.tooltip_grouped&&!i.hasTreemap&&!o?(n=t.filterByX)==null?void 0:n.call(t,s,e.x):null;return(i.hasTreemap?[e]:o?[e]:r.tooltip_grouped?l!=null&&l.length?l:s.map(c=>c.values[e.index]).filter(Boolean):[e]).map(c=>{var u;return((u=t.addName)==null?void 0:u.call(t,c))||c})}function LE(t,e,n){var r,i;return(r=t.isMultipleX)!=null&&r.call(t)&&!cg(t,e)?[((i=t.addName)==null?void 0:i.call(t,e))||e]:n}function ps(t,e){const n=RE(e);if(!n)return null;const r=t.$el.canvas.node(),i=ln(r,!0);return[n.clientX-i.left,n.clientY-i.top]}function lu(t,e){var n,r;if(!Array.isArray(e)||e.length<2)return null;const i=e.slice(0,2);return(r=(n=t.axis)==null?void 0:n.isTimeSeries)!=null&&r.call(n)?i.map(s=>Wn.call(t,s)):i}function ms(t){const{config:e,state:n}=t;return!e.subchart_show||!n.hasAxis||n.width2<=0||n.height2<=0?null:{x:n.margin2.left,y:n.margin2.top,w:n.width2,h:n.height2}}function sg(t,e){const n=ms(t);return!!n&&e[0]>=n.x&&e[0]<=n.x+n.w&&e[1]>=n.y&&e[1]<=n.y+n.h}function DE(t,e){const{config:n,state:r}=t,i=ms(t);if(n.subchart_brush_enabled!==!1||!i||!sg(t,e))return null;const s=Td(t,n.axis_rotated?e[1]-i.y:e[0]-i.x);return s===null?null:n.axis_rotated?[r.margin.left+r.width/2,r.margin.top+s]:[r.margin.left+s,r.margin.top+r.height/2]}function Jo(t){var e,n;const r=ms(t),i=r?t.config.axis_rotated?r.h:r.w:0,s=(n=(e=t.axis)==null?void 0:e.getExtent)==null?void 0:n.call(e),o=Array.isArray(s)?s.slice(0,2):[];if(o.length===2&&o.every(Number.isFinite)){const l=Math.max(0,Math.min(i,o[0])),c=Math.max(0,Math.min(i,o[1]));return[Math.min(l,c),Math.max(l,c)]}return[0,i]}function cu(t,e,n=!1){const r=ps(t,e),i=r&&ms(t);if(!r||!i||!sg(t,r))return null;const s=t.config.axis_rotated?r[1]-i.y:r[0]-i.x,[o,l]=Jo(t);return!n&&(s<o||s>l)?null:Math.max(o,Math.min(l,s))}function FE(t,e,n){const r=Math.min(e,n),i=Math.max(e,n);return[t.scale.subX.invert(r),t.scale.subX.invert(i)]}function og(t){const{scale:e,state:n}=t,r=n.domain;if(!(r!=null&&r.length)||!e.subX)return null;const i=ms(t),s=e.subX(r[0]),o=e.subX(r[1]);if(!i||!Number.isFinite(s)||!Number.isFinite(o))return null;const[l,c]=Jo(t);return[Math.max(l,Math.min(c,Math.min(s,o))),Math.max(l,Math.min(c,Math.max(s,o)))]}function lg(t,e){const n=og(t);if(!n)return"select";const[r,i]=n;return Math.abs(e-r)<=Qv?"resize-start":Math.abs(e-i)<=Qv?"resize-end":e>r&&e<i?"move":"select"}function uu(t,e,n){const[r,i]=Jo(t);return[Math.max(r,Math.min(i,e)),Math.max(r,Math.min(i,n))]}function NE(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function ga(t){return t?`${t.id}:${t.index}`:null}function $E(t,e){const n=t.state.canvasSelectionDragIncluded,r=Yo.get(t)||new Map,i=new Map,s=new Set,o=[];return e.filter(l=>fu(t,l)).forEach(l=>{const c=ga(l);c&&(s.add(c),!i.has(c)&&i.set(c,l))}),i.forEach((l,c)=>{!n.has(c)&&o.push(l)}),r.forEach((l,c)=>{!s.has(c)&&o.push(l)}),Yo.set(t,i),{included:s,rows:o}}function BE(t){return t?Array.isArray(t)?t:[t]:null}function fu(t,e){return e&&An(t,e)&&ei(t,e,ou)&&ou.some(n=>n(t,e))&&t.config.data_selection_isselectable.bind(t.api)(e)}function du(t,e){t.filterTargetsToShow(t.data.targets).filter(n=>ei(t,n,ou)).forEach(n=>{n.values.forEach(r=>{fu(t,r)&&e(r)})})}function cg(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(la(t,e)||ca(t,e))}function zE(t){return t.interaction_inputType_touch!==!1}function ug(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}function UE(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;let s;return o=>{var l,c;const u=((l=o.changedTouches)==null?void 0:l[0])||((c=o.touches)==null?void 0:c[0]);if(!u)return;const f=u[`client${t.axis_rotated?"Y":"X"}`];o.type==="touchstart"?r?o.preventDefault():i!==null&&(s=f):o.type==="touchmove"&&(r||s===!0||i!==null&&Math.abs(s-f)>=i)&&(s=!0,o.preventDefault())}}function pi(t,e){return e.pointerType!=="mouse"&&t.state.inputType!=="touch"}function kE(t,e){const{state:n}=t,r=ga(e),i=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return i&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!i}function GE(t,e){t.state.canvasLastInputClickKey=ga(e),t.state.canvasLastInputClickTime=Date.now()}function XE(){var t,e,n;return(n=(e=(t=se.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function fg(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function WE(t,e,n,r=!1){return t.slice(0,2).map((i,s)=>{const o=r?Math.exp(Math.log(+i)+(Math.log(+e[s])-Math.log(+i))*n):+i+(+e[s]-+i)*n;return i instanceof Date||e[s]instanceof Date?new Date(o):o})}function VE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function jE(t){const{scale:e}=t,n=t.filterTargetsToShow(t.data.targets);["y","y2"].forEach(r=>{var i;(i=e[r])==null||i.domain(t.getYDomain(n,r))}),t.withSubchartTypeContext(()=>{var r,i;(r=e.subY)==null||r.domain(t.getYDomain(n,"y")),(i=e.subY2)==null||i.domain(t.getYDomain(n,"y2"))})}const HE={prepareCanvasConfig(){var t,e;const{config:n,state:r}=this;this.warnUnsupportedCanvasOptions(),(t=r.orgConfig)!=null&&t.transition&&Object.prototype.hasOwnProperty.call(r.orgConfig.transition,"duration")&&r.orgConfig.transition.duration&&_v("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,ag(n.axis_x_type)||(n.axis_x_type="indexed"),Zo(n.axis_y_type)||(n.axis_y_type="indexed"),Zo(n.axis_y2_type)||(n.axis_y2_type="indexed"),(e=this.hasType)!=null&&e.call(this,"bubble")&&(n.point_show=!0,n.point_type="circle")},applyCanvasSubchartDomain(){const t=this,{axis:e,config:n,scale:r,state:i}=t;if(!n.subchart_show||!i.hasAxis||!r.subX)return;!i.rendered&&!i.domain&&n.subchart_init_range&&(i.domain=lu(t,n.subchart_init_range));const s=lu(t,i.domain);!s||!t.withinRange(s,t.getZoomDomain("subX",!0),t.getZoomDomain("subX"))||(i.domain=s,r.x.domain(s),e.x.scale(r.x))},setCanvasSubchartDomain(t,e=!0,n=!1){const r=this,{config:i,scale:s,state:o}=r,l=lu(r,t);if(!(!i.subchart_show||!l||!r.withinRange(l,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))))return o.domain=l,s.zoom=null,e&&r.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n&&i.subchart_onbrush.bind(r.api)(o.domain),o.domain},clearCanvasSubchartDomain(t=!0,e=!1){var n;const r=this,{axis:i,config:s,org:o,scale:l,state:c}=r;s.subchart_show&&(c.domain=void 0,l.zoom=null,(n=o.xDomain)!=null&&n.length&&(l.x.domain(o.xDomain),i.x.scale(l.x)),t&&r.redraw({withTransition:!1,withUpdateXDomain:!0,withUpdateOrgXDomain:!1,withY:s.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e&&s.subchart_onbrush.bind(r.api)(l.x.orgDomain()))},flushCanvasFlow(){var t,e;const{state:n}=this;n.canvasFlowFinish&&(n.canvasFlowFrame!==null&&((e=(t=se).cancelAnimationFrame)==null||e.call(t,n.canvasFlowFrame)),n.canvasFlowFrame=null,n.canvasFlowFinish())},animateCanvasFlow(t){var e,n,r,i,s,o,l,c,u,f,d;const h=this,{axis:m,data:S,org:E,scale:C,state:w}=h,{done:$=()=>{},duration:z,length:B,orgDataCount:W}=t,H=(e=se.requestAnimationFrame)==null?void 0:e.bind(se),Q=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!H||!z||!B||!W||VE(h)>hE)return!1;const q=C.x.domain().slice(0,2),st=(i=(r=E.xDomain)==null?void 0:r.slice)==null?void 0:i.call(r),it=(c=(o=(s=C.subX)==null?void 0:s.domain)==null?void 0:(l=o.call(s)).slice)==null?void 0:c.call(l);if(!fg(q,Q))return!1;const ot=S.targets.map(St=>St.values.splice(0,B));h.updateXDomain(h.filterTargetsToShow(S.targets),!0,!0);const ct=C.x.domain().slice(0,2),gt=(f=(u=E.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(S.targets.forEach((St,Mt)=>{St.values.unshift(...ot[Mt])}),!fg(ct,Q))return st&&(E.xDomain=st),C.x.domain(q),it&&C.subX.domain(it),m.x.scale(C.x),!1;jE(h);let tt=!1;const ft=XE(),lt=()=>{var St,Mt;tt||(tt=!0,S.targets.forEach(Ot=>{Ot.values.splice(0,B)}),gt&&(E.xDomain=gt),C.x.domain(ct),(Mt=(St=C.subX)==null?void 0:St.domain)==null||Mt.call(St,gt!=null?gt:ct),m.x.scale(C.x),w.dirty.data=!0,w._eventRectFingerprint=null,w.canvasShape=null,w._cachedDrawShape=null,h.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),h.updateTypesElements(),w.canvasFlowFrame=null,w.canvasFlowFinish=null,w.flowing=!1,$.call(h.api))},bt=St=>{const Mt=Math.min(1,Math.max(0,(St-ft)/z)),Ot=WE(q,ct,Mt,Q);C.x.domain(Ot),m.x.scale(C.x),w.canvasShape=null,w._cachedDrawShape=null,w._canvasVisibleRangeCache=null,w._canvasXTickValuesCache=null,h.renderCanvasFrame(void 0,null,!1),Mt<1?w.canvasFlowFrame=H(bt):lt()};return st&&(E.xDomain=st),C.x.domain(q),it&&C.subX.domain(it),m.x.scale(C.x),w.flowing=!0,w.cancelClick=!0,(d=h.hideTooltip)==null||d.call(h),w.canvasFlowFinish=lt,w.canvasFlowFrame=H(bt),!0},initCanvas(){var t;const e=this,{config:n,state:r,$el:i}=e,s=i.chart.node();r.isCanvasMode=!0,r.canvasInlineStyle.minHeight=s.style.minHeight,se.getComputedStyle(s).position==="static"&&i.chart.style("position","relative"),i.chart.style("min-height",`${r.current.height}px`),e.canvasEngine=new z0,e.canvasEngine.init(s,r.current.width,e.getCanvasSurfaceHeight()),i.canvas=Yt(e.canvasEngine.canvas),e.canvasTheme=new f1,e.canvasTheme.load(s,n.canvas_theme),e.canvasAxisRenderer=new N0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new QT(e.canvasEngine,e.canvasTheme),e.hitDetector=new p1,e.bindCanvasEvents(),n.zoom_enabled&&((t=e.bindZoomEvent)==null||t.call(e))},warnUnsupportedCanvasOptions(){var t,e,n,r;const{config:i}=this;[[!ag(i.axis_x_type),"axis.x.type other than indexed/category/log/timeseries"],[!Zo(i.axis_y_type),"axis.y.type other than indexed/log/timeseries"],[!Zo(i.axis_y2_type),"axis.y2.type other than indexed/log/timeseries"],[i.boost_useCssRule,"boost.useCssRule"],[(t=this.hasArcType)==null?void 0:t.call(this),"arc charts"],[(e=this.hasType)==null?void 0:e.call(this,"radar"),"radar chart"],[(n=this.hasType)==null?void 0:n.call(this,"polar"),"polar chart"],[(r=this.hasType)==null?void 0:r.call(this,"funnel"),"funnel chart"]].forEach(([o,l])=>{o&&_v(`canvas mode: ${l} is not yet supported.`)})},bindCanvasEvents(){const t=this,{config:e,state:n,$el:r}=t,i=r.canvas.node(),s=UE(e),o=ug(e);i.addEventListener("mousemove",t.onCanvasMouseMove.bind(t)),i.addEventListener("mouseenter",l=>{var c;n.event=l,(c=e.onover)==null||c.bind(t.api)(l)}),i.addEventListener("mouseout",t.onCanvasMouseOut.bind(t)),i.addEventListener("mouseleave",l=>{var c;n.event=l,(c=e.onout)==null||c.bind(t.api)(l)}),i.addEventListener("mousedown",l=>{var c;(c=t.onCanvasSubchartBrushStart)!=null&&c.call(t,l)||t.onCanvasSelectionDragStart(l)}),i.addEventListener("click",t.onCanvasClick.bind(t)),i.addEventListener("pointerdown",t.onCanvasPointerDown.bind(t)),i.addEventListener("pointerenter",t.onCanvasPointerEnter.bind(t)),i.addEventListener("pointermove",t.onCanvasPointerMove.bind(t)),i.addEventListener("pointerup",t.onCanvasPointerUp.bind(t)),i.addEventListener("pointerleave",t.onCanvasPointerOut.bind(t)),i.addEventListener("pointercancel",t.onCanvasPointerCancel.bind(t)),zE(e)&&(i.addEventListener("touchstart",l=>{s(l),t.onCanvasTouchStart(l)},o),i.addEventListener("touchmove",l=>{s(l),t.onCanvasTouchMove(l)},o),i.addEventListener("touchend",t.onCanvasTouchEnd.bind(t),o),i.addEventListener("touchcancel",t.onCanvasTouchCancel.bind(t),o))},updateHtmlLegend(){var t,e;const n=this,{config:r,state:i,$el:s}=n,o=s.chart.node();if(!r.legend_show||i.hasTreemap){i.hasTreemap?((t=s.legend)==null||t.remove(),s.legend=null):(e=s.legend)==null||e.style("visibility","hidden"),i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0;return}const l=n.mapToIds(n.data.targets).filter(d=>r.data_names[d]!==null);if(r.legend_contents_bindto&&r.legend_contents_template){n.updateHtmlLegendTemplate(l)?(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0,i.legendHasRendered=!0):(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0);return}s.legend||(s.legend=Yt(o).append("div").classed($e.legend,!0).classed(cr.legend,!0)),s.legend.style("visibility",null);const c=s.legend.selectAll(`button.${$e.legendItem}`).data(l,d=>d);c.exit().remove();const u=c.enter().append("button").attr("type","button").attr("data-id",d=>d);u.append("span").classed($e.legendItemTile,!0),u.append("span").classed(cr.legendItemTitle,!0);const f=u.merge(c).attr("class",d=>n.generateClass($e.legendItem,d).trim());qv(n,f),f.select(`.${$e.legendItemTile}`).classed(cr.legendItemTileCircle,!r.legend_usePoint&&r.legend_item_tile_type==="circle").style("background-color",d=>r.legend_usePoint?null:n.color(d)).html(d=>r.legend_usePoint?mE(n,d):""),f.select(`.${cr.legendItemTitle}`).text(d=>Ko(n,d)),r.legend_tooltip&&f.attr("title",d=>Ko(n,d)),rg(n,f),n.updateHtmlLegendSize(l),n.positionHtmlLegend(),i.legendHasRendered=!0},updateHtmlLegendTemplate(t){const e=this,{api:n,config:r,$el:i}=e,s=Yt(r.legend_contents_bindto),o=r.legend_contents_template,l=[];let c="";if(s.empty())return!1;t.forEach(f=>{const d=ie(o)?pr(o.call(n,f,e.color(f),n.data(f)[0].values)):Pa(o,{COLOR:e.color(f),TITLE:f});d&&(l.push(f),c+=d)});const u=s.html(pr(c)).classed($e.legend,!0).classed(cr.legend,!1).style("visibility",null).selectAll(function(){return this.children}).data(l);return qv(e,u),rg(e,u),i.legend=s,!0},updateHtmlLegendSize(t){const e=this,{config:n,state:r,$el:i}=e,s=[],o={};let l=0,c=0,u=0;const f=n.legend_contents_bindto&&n.legend_contents_template;if(f)i.legend.selectAll(`.${$e.legendItem}`).each(function(d){const h=ln(this,!0),m=`${Ko(e,d)}`,S=Math.max(32,m.length*7+24),E=20,C=Math.ceil(h.width||S),w=Math.ceil(h.height||E);s.push(C),l=Math.max(l,C),c=Math.max(c,w)});else if(t.length){const d=r.isLegendRight||r.isLegendInset,h=n.legend_item_tile_type!=="circle",m={width:h?n.legend_item_tile_width:n.legend_item_tile_r*2,height:h?n.legend_item_tile_height:n.legend_item_tile_r*2},S={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:m.width+5,totalLength:0},E={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((Q,q)=>{const st=`${Ko(e,Q)}`,it=IE(e,st),ot=Math.max(32,st.length*7),ct=12,gt=q===t.length-1,tt=n.legend_show&&!e.isLegendToShow(Q),ft=tt?0:((it==null?void 0:it.width)||ot)+S.tileWidth+(gt&&!d?0:S.padding.right)+n.legend_padding,lt=tt?0:((it==null?void 0:it.height)||ct)+S.padding.top;return S.max.width=Math.max(S.max.width,ft),S.max.height=Math.max(S.max.height,lt),{id:Q,hidden:tt,width:ft,height:lt}}),w=d?e.getLegendHeight():e.getLegendWidth(),$=(Q,q,st=!1)=>{let it;st||(it=(w-S.totalLength-q)/2,it<S.posMin&&(it=(w-q)/2,S.totalLength=0,S.step++)),E.steps[Q]=S.step,E.margins[S.step]=r.isLegendInset?10:it,E.offsets[Q]=S.totalLength,S.totalLength+=q};r.isLegendInset&&(S.step=n.legend_inset_step?n.legend_inset_step:t.length,r.legendStep=S.step),C.forEach(({id:Q,hidden:q,width:st,height:it})=>{const ot=n.legend_equally&&!q?S.max.width:st,ct=n.legend_equally&&!q?S.max.height:it,gt=d?ct:ot;if(E.widths[Q]=ot,E.heights[Q]=ct,s.push(ot),l=Math.max(l,ot),c=Math.max(c,ct),q){E.steps[Q]=0,E.offsets[Q]=0;return}$(Q,gt)});const z=r.isLegendRight?Q=>S.max.width*E.steps[Q]:r.isLegendInset?Q=>S.max.width*E.steps[Q]+10:Q=>E.margins[E.steps[Q]]+E.offsets[Q],B=r.isLegendRight||r.isLegendInset?Q=>E.margins[E.steps[Q]]+E.offsets[Q]:Q=>S.max.height*E.steps[Q],W=4+m.width,H=9;C.forEach(({id:Q,hidden:q})=>{const st=q?0:z(Q),it=q?0:B(Q);o[Q]={item:{x:st,y:it-5,width:E.widths[Q],height:E.heights[Q]},title:{x:W,y:0,height:E.heights[Q]},tile:{x:-2,y:H-m.height/2,width:m.width,height:m.height}}}),u=S.step}if(!t.length){r.legendItemWidth=0,r.legendItemHeight=0,r.legendStep=0;return}if(f){const d=Math.max(1,r.current.width),h=10;let m=1,S=0;s.forEach(E=>{S&&S+h+E>d?(m++,S=E):S+=(S?h:0)+E}),r.legendStep=Math.max(0,m-1)}else r.legendStep=u;r.legendItemWidth=l,r.legendItemHeight=Math.max(12,c),f||i.legend.selectAll(`button.${$e.legendItem}`).each(function(d){const h=o[d],m=Yt(this);h&&(m.style("left",`${h.item.x}px`).style("top",`${h.item.y}px`).style("width",`${h.item.width}px`).style("height",`${h.item.height}px`),m.select(`.${cr.legendItemTitle}`).style("left",`${h.title.x}px`).style("top",`${h.title.y}px`).style("height",`${h.title.height}px`).style("line-height",`${h.title.height}px`),m.select(`.${$e.legendItemTile}`).style("left",`${h.tile.x}px`).style("top",`${h.tile.y}px`).style("width",`${h.tile.width}px`).style("height",`${h.tile.height}px`))})},getCanvasBottomLegendHeight(){var t;const e=this,{config:n,state:r,$el:i}=e;if(!n.legend_show||r.isLegendRight||r.isLegendInset||r.hasTreemap||!i.legend||!r.legendItemHeight)return 0;const s=ln(i.legend.node(),!0).height,o=r.legendItemHeight*(r.legendStep+1);return Math.ceil(Math.max(((t=e.getLegendHeight)==null?void 0:t.call(e))||0,s||o))},getCanvasSurfaceHeight(){const t=this;return Math.max(0,t.state.current.height-t.getCanvasBottomLegendHeight())},positionHtmlLegend(){var t;const e=this,{config:n,state:r,$el:i}=e,s=i.legend;if(s.classed(cr.legendBottom,!r.isLegendRight&&!r.isLegendInset).classed(cr.legendRight,r.isLegendRight).classed(cr.legendInset,r.isLegendInset).style("top",null).style("right",null).style("bottom",null).style("left",null).style("width",null).style("height",null).style("min-height",null),r.isLegendRight)s.style("top",`${r.margin3.top}px`).style("right","0").style("bottom",`${r.margin3.bottom}px`).style("width",`${Math.max(0,e.getLegendWidth())}px`);else if(r.isLegendInset){if(r.isLegendInset){const o=r.isLegendTop,l=r.isLegendLeft;s.style(o?"top":"bottom",`${n.legend_inset_y}px`).style(l?"left":"right",`${n.legend_inset_x}px`).style("width",`${Math.max(0,r.legendItemWidth*(r.legendStep+1)+20)}px`)}}else{const o=((t=e.getLegendHeight)==null?void 0:t.call(e))||0;s.style("top",`${Math.max(0,r.current.height-o)}px`).style("right","0").style("bottom","auto").style("left","0")}},getCanvasSelectedData(t){const e=this,n=e.state.canvasSelection,r=[];return!e.config.data_selection_enabled||!(n!=null&&n.size)||du(e,i=>{(!t||i.id===t)&&n.has(ga(i))&&r.push(i)}),r},setCanvasSelection(t=!1,e,n,r){var i;const s=this,{config:o,state:l}=s,c=l.canvasSelection,u=o.data_selection_grouped;let f=BE(e),d=!1;const h=t&&!o.data_selection_multiple;let m=!h;if(o.data_selection_enabled){if(h&&(n=n!=null&&n.length?[n[0]]:[0],!u))if(f)f=f.slice(0,1);else{const[S]=s.filterTargetsToShow(s.data.targets);f=S?[S.id]:[]}du(s,S=>{const E=ga(S),C=u||!f||f.indexOf(S.id)>=0,w=!n||n.indexOf(S.index)>=0,$=c.has(E);if(t)if(C&&w&&(!$||h)){if(m||(s.setCanvasSelection(!1),m=!0),c.has(E))return;c.add(E),Ne(o.data_onselected,s.api,S,s.canvasEngine.canvas),d=!0}else(!h||m)&&r&&$&&(c.delete(E),Ne(o.data_onunselected,s.api,S,s.canvasEngine.canvas),d=!0);else C&&w&&$&&(c.delete(E),Ne(o.data_onunselected,s.api,S,s.canvasEngine.canvas),d=!0)}),d&&((i=s.renderCanvasFrame)==null||i.call(s,void 0,null,!1))}},toggleCanvasSelection(t){var e;const n=this,{config:r,state:i}=n,s=i.canvasSelection;let o=!1;r.data_selection_enabled&&(t.filter(l=>fu(n,l)).forEach(l=>{const c=ga(l),u=s.has(c);r.data_selection_multiple||du(n,f=>{const d=ga(f);(r.data_selection_grouped?f.id===l.id:d!==c)&&s.has(d)&&(s.delete(d),Ne(r.data_onunselected,n.api,f,n.canvasEngine.canvas),o=!0)}),u&&s.has(c)?(s.delete(c),Ne(r.data_onunselected,n.api,l,n.canvasEngine.canvas)):(s.add(c),Ne(r.data_onselected,n.api,l,n.canvasEngine.canvas)),o=!0}),o&&((e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1)))},canStartCanvasSelectionDrag(t){const e=this,{config:n}=e,r=t;return!!(n.interaction_enabled&&n.data_selection_enabled&&n.data_selection_draggable&&n.data_selection_multiple&&!n.zoom_enabled&&(r.button===void 0||r.button===0))},getCanvasSelectionDragData(t){const e=this,{config:n}=e,r=e.hitDetector.findInRect(t,n.data_selection_grouped);if(!n.data_selection_grouped)return r;const i=new Set(r.map(s=>s.index));return e.filterTargetsToShow(e.data.targets).flatMap(s=>s.values.filter(o=>i.has(o.index)))},startCanvasSelectionDrag(t){var e,n;const r=this,{state:i}=r,s=ps(r,t);return!s||!r.canStartCanvasSelectionDrag(t)?!1:(i.dragStart=s,i.canvasSelectionDragStart=s,i.canvasSelectionDragIncluded=new Set,i.canvasSelectionDragging=!0,i.canvasSelectionDragMoved=!1,Yo.set(r,new Map),r.setDragStatus(!0),(e=r.hideTooltip)==null||e.call(r),(n=t.preventDefault)==null||n.call(t),!0)},updateCanvasSelectionDrag(t){var e;const n=this,{config:r,state:i}=n,s=i.canvasSelectionDragStart,o=ps(n,t);if(!i.canvasSelectionDragging||!s||!o)return!1;const[l,c]=s,[u,f]=o,d=Math.min(l,u),h=Math.max(l,u),m=r.data_selection_grouped?i.margin.top:Math.min(c,f),S=r.data_selection_grouped?i.margin.top+i.height:Math.max(c,f),E={x:d,y:m,w:h-d,h:S-m},C=Math.abs(u-l)>4||Math.abs(f-c)>4;if(i.canvasSelectionDragMoved=i.canvasSelectionDragMoved||C,C){const{included:w,rows:$}=$E(n,n.getCanvasSelectionDragData(E));$.length&&n.toggleCanvasSelection($),i.canvasSelectionDragIncluded=w,i.cancelClick=!0}return n.renderCanvasSelectionDrag(E),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSelectionDrag(t){var e;const n=this,{state:r}=n;return r.canvasSelectionDragging?(n.updateCanvasSelectionDrag(t),r.cancelClick=r.cancelClick||r.canvasSelectionDragMoved,r.dragStart=null,r.canvasSelectionDragStart=null,r.canvasSelectionDragIncluded=new Set,r.canvasSelectionDragging=!1,r.canvasSelectionDragMoved=!1,Yo.delete(n),n.setDragStatus(!1),n.clearCanvasFocus(),(e=t.preventDefault)==null||e.call(t),!0):!1},dispatchCanvasDataOut(t){const e=this,{config:n,state:r}=e,i=r.canvasDataHover;i&&(r.canvasDataHover=null,r.canvasDataHoverKey=null,n.interaction_enabled&&Ne(n.data_onout,e.api,i,t))},dispatchCanvasDataOver(t,e){const n=this,{config:r,state:i}=n,s=ga(t);i.canvasDataHoverKey!==s&&(n.dispatchCanvasDataOut(e),i.canvasDataHover=t,i.canvasDataHoverKey=s,r.interaction_enabled&&t&&Ne(r.data_onover,n.api,t,e))},dispatchCanvasDataClick(t,e=!1){var n;const r=this,{config:i,$el:s}=r,o=s.canvas.node(),l=wE(r,t,!0);if(!l||kE(r,l))return l;if(i.interaction_enabled){const c=i.data_selection_grouped?r.filterTargetsToShow(r.data.targets).map(u=>u.values[l.index]).filter(Boolean):[l];(n=r.toggleCanvasSelection)==null||n.call(r,c),c.forEach(u=>Ne(i.data_onclick,r.api,u,o)),e&&GE(r,l)}return l},updateCanvasSubchartBrush(t){var e,n;const r=this,{config:i,state:s}=r,o=s.canvasSubchartBrushStart,l=s.canvasSubchartBrushOrigin,c=s.canvasSubchartBrushMode,u=cu(r,t,!0);if(i.subchart_brush_enabled===!1||!s.canvasSubchartBrushDragging||o===null||u===null||!c)return!1;const f=u-o;if(Math.abs(f)>dE&&(s.canvasSubchartBrushMoved=!0),!s.canvasSubchartBrushMoved)return(e=t.preventDefault)==null||e.call(t),!0;let d;if(c==="move"&&l){const[m,S]=Jo(r),E=l[1]-l[0];let C=l[0]+f,w=l[1]+f;C<m&&(w+=m-C,C=m),w>S&&(C-=w-S,w=S),d=[Math.max(m,Math.min(S-E,C)),Math.min(S,Math.max(m+E,w))]}else c==="resize-start"&&l?d=uu(r,u,l[1]):c==="resize-end"&&l?d=uu(r,l[0],u):d=uu(r,o,u);const h=FE(r,d[0],d[1]);return r.setCanvasSubchartDomain(h,!0),s.cancelClick=!0,(n=t.preventDefault)==null||n.call(t),!0},updateCanvasSubchartCursor(t){const e=this,n=e.$el.canvas.node();if(e.config.subchart_brush_enabled===!1)return n.style.cursor="",!1;const r=cu(e,t);if(r===null)return n.style.cursor="",!1;const i=lg(e,r);return n.style.cursor=NE(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;if(n.config.subchart_brush_enabled===!1)return!1;const i=cu(n,t);if(i===null)return!1;const s=lg(n,i);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=s,r.canvasSubchartBrushStart=i,r.canvasSubchartBrushOrigin=og(n),r.canvasSubchartBrushMoved=!1,r.cancelClick=!0,n.setDragStatus(!0),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSubchartBrush(t){var e,n,r;const i=this,{state:s}=i;if(!s.canvasSubchartBrushDragging)return!1;i.updateCanvasSubchartBrush(t);const o=s.canvasSubchartBrushMode==="select"&&!s.canvasSubchartBrushMoved,l=s.canvasSubchartBrushMoved||o;return o?(e=i.clearCanvasSubchartDomain)==null||e.call(i,!0,!0):l&&i.config.subchart_onbrush.bind(i.api)((n=s.domain)!=null?n:i.scale.x.orgDomain()),s.canvasSubchartBrushDragging=!1,s.canvasSubchartBrushMode=null,s.canvasSubchartBrushStart=null,s.canvasSubchartBrushOrigin=null,s.canvasSubchartBrushMoved=!1,i.setDragStatus(!1),(r=t.preventDefault)==null||r.call(t),!0},cancelCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;return r.canvasSubchartBrushDragging?(r.canvasSubchartBrushDragging=!1,r.canvasSubchartBrushMode=null,r.canvasSubchartBrushStart=null,r.canvasSubchartBrushOrigin=null,r.canvasSubchartBrushMoved=!1,n.setDragStatus(!1),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSubchartBrushStart(t){const e=this;if(!e.startCanvasSubchartBrush(t))return!1;const n=i=>{e.updateCanvasSubchartBrush(i)},r=i=>{e.endCanvasSubchartBrush(i),se.removeEventListener("mousemove",n),se.removeEventListener("mouseup",r)};return se.addEventListener("mousemove",n),se.addEventListener("mouseup",r),!0},onCanvasClick(t){var e;const n=this,{config:r,state:i}=n;if(i.event=t,i.flowing||i.cancelClick){i.cancelClick=!1;return}n.dispatchCanvasDataClick(t),(e=r.onclick)==null||e.bind(n.api)(t)},onCanvasSelectionDragStart(t){const e=this,{state:n}=e;if(!e.startCanvasSelectionDrag(t))return;const r=s=>{e.updateCanvasSelectionDrag(s)},i=s=>{e.endCanvasSelectionDrag(s),se.removeEventListener("mousemove",r),se.removeEventListener("mouseup",i),n.canvasSelectionDragMoveHandler=null,n.canvasSelectionDragEndHandler=null};n.canvasSelectionDragMoveHandler=r,n.canvasSelectionDragEndHandler=i,se.addEventListener("mousemove",r),se.addEventListener("mouseup",i)},onCanvasPointerDown(t){var e;if(!pi(this,t))return;const n=this,r=n.$el.canvas.node();if(!n.startCanvasSubchartBrush(t))return;const i=t.pointerId,s=f=>f.pointerId===i,o=f=>{s(f)&&n.updateCanvasSubchartBrush(f)},l=f=>{s(f)&&(n.endCanvasSubchartBrush(f),u())},c=f=>{s(f)&&(n.cancelCanvasSubchartBrush(f),u())};function u(){var f;se.removeEventListener("pointermove",o),se.removeEventListener("pointerup",l),se.removeEventListener("pointercancel",c);try{(f=r.releasePointerCapture)==null||f.call(r,i)}catch(d){}}try{(e=r.setPointerCapture)==null||e.call(r,i)}catch(f){}se.addEventListener("pointermove",o),se.addEventListener("pointerup",l),se.addEventListener("pointercancel",c)},onCanvasPointerEnter(t){var e;pi(this,t)&&(this.state.event=t,(e=this.config.onover)==null||e.bind(this.api)(t))},onCanvasPointerMove(t){pi(this,t)&&(this.updateCanvasSubchartBrush(t)||this.onCanvasMouseMove(t))},onCanvasPointerUp(t){var e;if(pi(this,t)){if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node())}},onCanvasPointerOut(t){var e;pi(this,t)&&(this.state.canvasSubchartBrushDragging||(this.state.event=t,this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)))},onCanvasPointerCancel(t){var e;if(pi(this,t)){if(this.state.event=t,this.cancelCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.onCanvasPointerOut(t)}},onCanvasTouchStart(t){var e;t.touches.length>1||(this.state.event=t,!this.startCanvasSubchartBrush(t)&&(this.startCanvasSelectionDrag(t)||((e=this.config.onover)==null||e.bind(this.api)(t),this.onCanvasMouseMove(t))))},onCanvasTouchMove(t){t.touches.length>1||this.updateCanvasSubchartBrush(t)||this.updateCanvasSelectionDrag(t)||this.onCanvasMouseMove(t)},onCanvasTouchEnd(t){var e,n,r;if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}if(this.endCanvasSelectionDrag(t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node()),(r=this.config.onout)==null||r.bind(this.api)(t)},onCanvasTouchCancel(t){var e;this.state.event=t,this.cancelCanvasSubchartBrush(t),this.endCanvasSelectionDrag(t),this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)},onCanvasMouseMove(t){var e,n,r,i,s;const o=this,{config:l,state:c,$el:u}=o,f=u.canvas.node();if(c.event=t,c.flowing||c.canvasSelectionDragging)return;if((e=o.updateCanvasSubchartCursor)!=null&&e.call(o,t)){o.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,o.clearCanvasFocus()),(n=o.hideTooltip)==null||n.call(o);return}const d=ps(o,t),h=d&&(DE(o,d)||d),m=h?ME(o,h):null;if(!m){if(o.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,o.clearCanvasFocus()),d&&l.axis_tooltip&&PE(o,d)){o.renderCanvasAxisTooltip(d),(r=o.hideTooltip)==null||r.call(o);return}(i=o.hideTooltip)==null||i.call(o);return}o.dispatchCanvasDataOver(m,f);const S=ig(o,m),E=LE(o,m,S),C=E.map(w=>`${w.id}:${w.index}`).join("|");(c.canvasFocusKey!==C||l.axis_tooltip)&&(c.canvasFocusKey=C,o.renderCanvasFocus(E,h)),(s=o.showTooltip)==null||s.call(o,S,f)},onCanvasMouseOut(){var t;const e=this.$el.canvas.node();e.style.cursor="",this.dispatchCanvasDataOut(e),this.state.canvasFocusKey?(this.state.canvasFocusKey=null,this.clearCanvasFocus()):this.config.axis_tooltip&&this.clearCanvasFocus(),(t=this.hideTooltip)==null||t.call(this)},showCanvasLinkedTooltip(t){var e,n,r,i;const s=this,{$el:o,state:l}=s,c=(e=o.canvas)==null?void 0:e.node(),f=s.filterTargetsToShow(s.data.targets).map(w=>w.values[t]).find(Boolean);if(!c||!f)return(n=s.hideTooltip)==null||n.call(s),!1;const d=ig(s,f),h=d.find(w=>w&&An(s,w))||d[0];if(!d.length||!h)return(r=s.hideTooltip)==null||r.call(s),!1;const{left:m,top:S}=ln(c,!0),E=Ji(s,h),C=[l.margin.left+E.x,l.margin.top+E.y];return l.event={clientX:m+C[0],clientY:S+C[1],currentTarget:c,target:c},l.canvasFocusKey=d.map(w=>`${w.id}:${w.index}`).join("|"),s.renderCanvasFocus(d,C),(i=s.showTooltip)==null||i.call(s,d,c),!0},renderCanvasZoomBrush(t,e){const n=this;n.canvasEngine.withOverlay(r=>{n.canvasRenderer.withContext(r,()=>{n.canvasRenderer.drawZoomBrush(n,t,e)})})},clearCanvasZoomBrush(){this.canvasEngine.clearOverlay()},renderCanvasSelectionDrag(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasRenderer.withContext(n,()=>{e.canvasRenderer.drawSelectionDragArea(e,t)})})},renderCanvasFrame(t,e,n=!1){const r=this,{state:i}=r,s=t||i.canvasShape||r.getDrawShape();i.canvasShape=s,i._canvasVisibleRangeCache=null,i._canvasXTickValuesCache=null,r.canvasEngine.beginFrame(i.current.width,r.getCanvasSurfaceHeight());try{r.canvasRenderer.drawBackground(r),r.canvasAxisRenderer.drawTitle(r),i.hasAxis&&r.canvasAxisRenderer.draw(r),r.canvasRenderer.draw(r,s),i.hasAxis&&r.config.grid_lines_front&&r.canvasAxisRenderer.drawGridLines(r),r.canvasRenderer.drawSubchart(r,s),i.hasAxis&&r.canvasAxisRenderer.drawSubXAxis(r),i.hasAxis&&r.canvasAxisRenderer.drawSubYAxes(r),r.canvasRenderer.drawEmptyLabel(r),n&&r.hitDetector.rebuild(r,s)}finally{r.canvasEngine.endFrame()}r.canvasEngine.clearOverlay(),i.canvasFocusMainRedraw=!1,e&&r.renderCanvasFocus(e)},renderCanvasFocus(t,e){var n,r;const i=this,{state:s}=i,o=(r=(n=i.canvasRenderer).hasExpandedShapeFocus)==null?void 0:r.call(n,i,t);if(o){const l=s.canvasShape||i.getDrawShape();i.canvasEngine.beginFrame(s.current.width,i.getCanvasSurfaceHeight());try{i.canvasRenderer.drawBackground(i),i.canvasAxisRenderer.drawTitle(i),s.hasAxis&&i.canvasAxisRenderer.draw(i),i.canvasRenderer.draw(i,l,t),s.hasAxis&&i.config.grid_lines_front&&i.canvasAxisRenderer.drawGridLines(i),i.canvasRenderer.drawSubchart(i,l),s.hasAxis&&i.canvasAxisRenderer.drawSubXAxis(i),s.hasAxis&&i.canvasAxisRenderer.drawSubYAxes(i),i.canvasRenderer.drawEmptyLabel(i)}finally{i.canvasEngine.endFrame()}}s.canvasFocusMainRedraw=!!o,i.canvasEngine.withOverlay(l=>{i.canvasRenderer.withContext(l,()=>{i.canvasRenderer.drawFocus(i,t)}),i.canvasAxisRenderer.withContext(l,()=>{i.canvasAxisRenderer.drawFocusedXAxisTick(i,t),e&&i.canvasAxisRenderer.drawAxisTooltip(i,e)})})},renderCanvasAxisTooltip(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasAxisRenderer.withContext(n,()=>{e.canvasAxisRenderer.drawAxisTooltip(e,t)})})},clearCanvasFocus(){var t;const e=this;e.state.canvasFocusMainRedraw?(e.state.canvasFocusMainRedraw=!1,e.renderCanvasFrame(void 0,null,!1)):(t=e.canvasEngine)==null||t.clearOverlay()},resizeCanvas(){var t,e;const n=this,{config:r,state:i,$el:s}=n,o=s.chart.node();n.clearResizePreview(),s.chart.style("min-height",`${i.current.height}px`),(t=n.canvasEngine)==null||t.resize(i.current.width,n.getCanvasSurfaceHeight()),(e=n.canvasTheme)==null||e.reload(o,r.canvas_theme)}};let dg=()=>(xn(Sr.prototype,HE),(dg=()=>"canvas")());var hg={category(t,e){const n=this.internal,{config:r}=n;return arguments.length>1&&(r.axis_x_categories[t]=e,n.state.dirty.data=!0,n.redraw()),r.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const r=n.axis_x_categories;return lr(r)?Object.values(e.data.xs)[0]:r}return n.axis_x_categories=t,e.state.dirty.data=!0,e.redraw(),n.axis_x_categories}};function YE(t){const e=this.config;let n,r,i;const s=()=>{const o=r.shift();if(o&&n&&Kn(n)&&o in n)return n=n[o],s();if(!o)return n};Object.keys(e).forEach(o=>{n=t,r=o.split("_"),i=s(),sn(i)&&(e[o]=i)}),this.api&&(this.state.orgConfig=t)}var KE={resize(t){const e=this.internal,{config:n,state:r}=e;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,r.dirty.size=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n;const r=this.internal,{state:i,$el:{zoomResetBtn:s}}=r;i.rendered?(i.resizing?(e=r.brush)==null||e.updateResize():(n=r.axis)==null||n.setOrient(),s==null||s.style("display","none"),r.scale.zoom&&(i.current.zoomDomain=r.scale.zoom.domain()),r.scale.zoom=null,i.resizing||(i.dirty.data=!0),t?r.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):r.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&r.brush&&(r.brush.getSelection().call(r.brush.move),r.unselectRect()),i.current.zoomDomain&&(r.api.zoom(i.current.zoomDomain),i.current.zoomDomain=null)):r.initToRender(!0)},destroy(){var t,e,n,r,i,s,o,l,c,u,f,d;const h=this.internal,{state:m,$el:{chart:S,style:E,svg:C}}=h;if(vn(h)){h.callPluginHook("$willDestroy"),(t=h.cache)==null||t.remove(["setOverOut","callOverOutForTouch"]),h.charts.splice(h.charts.indexOf(this),1),h.charts.length===0&&ib(),h.unbindAllEvents(),C==null||C.select("*").interrupt(),m.canvasFlowFrame!==null&&((n=(e=se).cancelAnimationFrame)==null||n.call(e,m.canvasFlowFrame)),m.canvasFlowFrame=null,m.canvasFlowFinish=null,m.pendingRaf!==null&&((i=(r=se).cancelAnimationFrame)==null||i.call(r,m.pendingRaf)),m.pendingRaf=null,(s=h.canvasRenderer)==null||s.destroy(),(o=h.canvasEngine)==null||o.destroy(),(l=h.resizeFunction)==null||l.clear(),(u=(c=h.resizeFunction)==null?void 0:c.clearLive)==null||u.call(c),(d=(f=h.resizeFunction)==null?void 0:f.resizeObserver)==null||d.disconnect(),h.resizeFunction&&se.removeEventListener("resize",h.resizeFunction),S.classed("bb",!1).style("position",null),m.isCanvasMode&&S.style("min-height",m.canvasInlineStyle.minHeight||null),S.selectChildren().remove(),E&&E.parentNode.removeChild(E),Object.keys(this).forEach(w=>{w==="internal"&&Object.keys(h).forEach($=>{h[$]=null}),this[w]=null,delete this[w]});for(const w in this)this[w]=()=>{}}return null},config(t,e,n){const r=this.internal,{config:i,state:s}=r,o=t==null?void 0:t.replace(/\./g,"_");let l;return t&&o in i?sn(e)?(i[o]=e,l=e,n&&this.flush()):l=i[o]:(arguments.length===0||lr(t))&&(l=s.orgConfig),l}},ZE={color(t){return this.internal.color(t)}};const vg=function(t){const{targets:e}=this.internal.data;if(!mn(t)){const n=qe(t)?t:[t];return e.filter(r=>n.some(i=>i===r.id))}return e};xn(vg,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const r=this.data(t);qe(r)&&(n=[],r.forEach(i=>{e?i.values.forEach(s=>n.push(s.value)):n.push(i.values.map(s=>s.value))}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var JE={data:vg},QE={focus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const o=i.filter(n.isTargetToShow,n),l=new Set(o),c=n.mapToTargetIds().filter(u=>!l.has(u)&&n.isTargetToShow(u));n.revertLegend(),n.toggleFocusLegend(c,!1),n.toggleFocusLegend(o,!0),r.focusedTargetIds=l,r.defocusedTargetIds=new Set(c),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}const s=n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),s.classed(nn.focused,!0).classed(nn.defocused,!1),n.hasArcType()&&!r.hasRadar&&(n.expandArc(i),n.hasType("gauge")&&n.markOverlapped(t,n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!0),r.focusedTargetIds=new Set(i),i.forEach(o=>r.defocusedTargetIds.delete(o))},defocus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const o=i.filter(n.isTargetToShow,n);n.toggleFocusLegend(o,!1),o.forEach(l=>r.focusedTargetIds.delete(l)),r.defocusedTargetIds=new Set(o),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n))).classed(nn.focused,!1).classed(nn.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(i),n.hasType("gauge")&&n.undoMarkOverlapped(n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!1),i.forEach(o=>r.focusedTargetIds.delete(o)),r.defocusedTargetIds=new Set(i)},revert(t){var e,n,r;const i=this.internal,{config:s,state:o,$el:l}=i,c=i.mapToTargetIds(t),u=()=>{s.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Yt(this).classed(nn.legendItemFocused)}).classed(nn.legendItemFocused,!1))};if(o.isCanvasMode){const d=!!((e=o.focusedTargetIds)!=null&&e.size)||!!((n=o.defocusedTargetIds)!=null&&n.size);u(),o.focusedTargetIds=new Set,o.defocusedTargetIds=new Set,d&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(nn.focused,!1).classed(nn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),u(),o.focusedTargetIds=new Set,o.defocusedTargetIds=new Set}},_E={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},qE={load(t){const e=this.internal,{config:n}=e;e.state.dirty.data=!0,e.state._eventRectFingerprint=null,t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(s=>{n.data_classes[s]=t.classes[s]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(s=>{n.data_axes[s]=t.axes[s]}),"colors"in t&&Object.keys(t.colors).forEach(s=>{n.data_colors[s]=t.colors[s]}),"regions"in t&&(n.data_regions=t.regions||{});const r=["data","columns","rows","json","url"].some(s=>s in t),i="unload"in t&&t.unload!==!1;if("regions"in t&&!r&&!i){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),Eo.call(e,t.done,t.resizeAfter);return}if(i){const s=e.mapToTargetIds(t.unload===!0?null:t.unload);e.unload(s,()=>{!e.config||!e.cache||(e.cache.remove(s),Bf(()=>e.loadFromArgs(t)))})}else e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};lr(n)&&this.tooltip.hide(),qe(n)?n={ids:n}:je(n)&&(n={ids:[n]});const r=e.mapToTargetIds(n.ids);e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.unload(r,()=>{!e.config||!e.cache||(e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(r),Eo.call(e,n.done,n.resizeAfter))})}};function Qo(t,e,n,r=!1){var i;const s=this.internal,o=s.mapToTargetIds(e),l=new Set(o),c=[...s.state.hiddenTargetIds].filter(d=>l.has(d));if(s.state.toggling=!0,s.state.dirty.visibility=!0,s[`${t?"remove":"add"}HiddenTargetIds`](o),s.state.isCanvasMode){t&&c.length?Ne(s.config.data_onshown,this,c):!t&&c.length===0&&Ne((i=s.config)==null?void 0:i.data_onhidden,this,o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1;return}const u=s.$el.svg.selectAll(s.selectorTargets(o)),f=t?null:"0";t&&c.length&&(u.style("display",null),Ne(s.config.data_onshown,this,c)),s.$T(u).style("opacity",f,"important").call(eo,()=>{var d;!t&&c.length===0&&(u.style("display","none"),Ne((d=s.config)==null?void 0:d.data_onhidden,this,o)),u.style("opacity",f)}),n.withLegend&&s[`${t?"show":"hide"}Legend`](o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1}var tC={show(t,e={}){Qo.call(this,!0,t,e)},hide(t,e={}){Qo.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,r={show:[],hide:[]};n.mapToTargetIds(t).forEach(i=>r[n.isTargetToShow(i)?"hide":"show"].push(i)),r.show.length&&r.hide.length?(Qo.call(this,!0,r.show,e,!0),Qo.call(this,!1,r.hide,e)):(r.show.length&&this.show(r.show,e),r.hide.length&&this.hide(r.hide,e))}},eC={tooltip:{show:function(t){var e,n,r,i,s,o,l,c,u,f,d,h;const m=this.internal,{$el:S,config:E,state:{eventReceiver:C,hasFunnel:w,hasTreemap:$,inputType:z}}=m;let B,W;if(t.mouse&&(W=t.mouse),t.data){const{data:H}=t,Q=(e=m.getYScaleById(H.id))==null?void 0:e(H.value);if((w||$)&&H.id){const q=m.selectorTarget(H.id,void 0,`.${Tn.shape}`);C.rect=S.main.select(q)}else m.isMultipleX()?W=[m.xx(H),Q]:(E.tooltip_grouped||(W=[0,Q]),B=(r=H.index)!=null?r:m.hasArcType()&&H.id?(n=m.getArcElementByIdOrIndex(H.id))==null?void 0:n.datum().index:m.getIndexByX(H.x))}else sn(t.x)?B=m.getIndexByX(t.x):sn(t.index)&&(B=t.index);if(m.state.isCanvasMode){const H=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,Q=(s=t.data)!=null&&s.id&&!E.tooltip_grouped?H.filter(ct=>ct.id===t.data.id).map(ct=>ct.values[B!=null?B:t.data.index]).filter(Boolean):H.map(ct=>ct.values[B]).filter(Boolean),q=(l=(o=S.canvas)==null?void 0:o.node)==null?void 0:l.call(o),st=m.state.canvasShape||((c=m.getDrawShape)==null?void 0:c.call(m)),it=Q[0],ot=W||(it&&((u=st==null?void 0:st.pos)!=null&&u.cx)&&((f=st==null?void 0:st.pos)!=null&&f.cy)?[m.state.margin.left+st.pos.cx(it),m.state.margin.top+st.pos.cy(it)]:void 0);if(!Q.length||!q)return;m.state.canvasFocusKey=Q.map(ct=>`${ct.id}:${ct.index}`).join("|"),(d=m.renderCanvasFocus)==null||d.call(m,Q,ot),(h=m.showTooltip)==null||h.call(m,Q,q);return}(z==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(H=>{m.dispatchEvent(H,B,W)})},hide:function(){var t,e,n,r,i;const s=this.internal,{state:{inputType:o,isCanvasMode:l},$el:{tooltip:c}}=s,u=c==null?void 0:c.datum();if(l){s.state.canvasFocusKey=null,s.hideTooltip(!0),(t=s.clearCanvasFocus)==null||t.call(s);return}if((e=u==null?void 0:u.data)!=null&&e[0]){const{index:f}=u.data[0];(o==="mouse"?["mouseout"]:["touchend"]).forEach(d=>{s.dispatchEvent(d,f)})}o==="touch"&&s.callOverOutForTouch(),s.hideTooltip(!0),(n=s.hideGridFocus)==null||n.call(s),(r=s.unexpandCircles)==null||r.call(s),(i=s.expandBarTypeShapes)==null||i.call(s,!1)}}},nC=Object.defineProperty,rC=(t,e,n)=>e in t?nC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gg=(t,e,n)=>rC(t,typeof e!="symbol"?e+"":e,n);class jn{constructor(e){gg(this,"plugins",[]),gg(this,"internal");const n=new Sr(this);this.internal=n,(function r(i,s,o){Object.keys(i).forEach(l=>{const c=ie(i[l]),u=s!==o,f=vn(i[l]),d=f&&Object.keys(i[l]).length>0;c&&(!u&&d||u)?s[l]=i[l].bind(o):f&&!c?s[l]={}:s[l]=i[l],d&&r(i[l],s[l],o)})})(jn.prototype,this,this),YE.call(n,e),n.beforeInit(),n.init()}}xn(jn.prototype,[KE,ZE,JE,QE,_E,qE,tC,eC]);let pg=()=>(jn.prototype.category=hg.category,jn.prototype.categories=hg.categories,(pg=()=>({}))());const aC=t=>{var e,n;return(n=(e=se).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(r,i)=>String.fromCharCode(+`0x${i}`)))};function iC(t,e,n){const{width:r,height:i}=e||n,s=new XMLSerializer,o=t.cloneNode(!0),l=V1(Oa(Ye.styleSheets)).filter(h=>h.cssText).map(h=>h.cssText);o.setAttribute("xmlns",_t.xhtml),o.style.margin="0",o.style.padding="0",e.preserveFontStyle&&o.querySelectorAll("text").forEach(h=>{h.innerHTML=""});const c=s.serializeToString(o),u=Ye.createElement("style");u.appendChild(Ye.createTextNode(l.join(`
|
|
52
|
-
`)));const f=s.serializeToString(u),d=`<svg xmlns="${_t.svg}" width="${r}" height="${i}"
|
|
50
|
+
</tbody></table>`).replace(pR,"").split(mR)},setTooltipPosition(t,e){var n,r;const a=this,{config:s,scale:o,state:l,$el:{eventRect:c,tooltip:u,svg:f}}=a,{bindto:d}=s.tooltip_contents,h=s.axis_rotated,v=u==null?void 0:u.datum();if(!d&&v){const b=t!=null?t:v.data,[x,E]=Zn(l.event,e!=null?e:c==null?void 0:c.node()),w={x,y:E};if(l.hasAxis&&o.x&&v&&"x"in v){const G=(V=0,Z,Y="y")=>{var et;const it=o[Z?(et=a.axis)==null?void 0:et.getId(Z):Y];return it?it(V)+(h?l.margin.left:l.margin.top):0};w.xAxis=o.x(v.x)+(s.tooltip_position?h?l.margin.top:l.margin.left:0),b.length===1?w.yAxis=G(b[0].value,b[0].id):w.yAxis=G}const{width:N=0,height:k=0}=v,B=(r=(n=s.tooltip_position)==null?void 0:n.bind(a.api)(b,N,k,c==null?void 0:c.node(),w))!=null?r:f&&Iu(f)?a.getTooltipPositionViewBox.bind(a)(N,k,w):a.getTooltipPosition.bind(a)(N,k,w);["top","left"].forEach(G=>{const V=B[G];u.style(G,`${V}px`),G==="left"&&!v.xPosInPercent&&(v.xPosInPercent=V/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var r,a;const s=this,{$el:{eventRect:o,svg:l},config:c,state:u}=s,f=c.axis_rotated,d=s.hasArcType()||u.customType||u.hasTreemap,h=(a=(r=d?l:o)==null?void 0:r.node())!=null?a:u.event.target;let{x:v,y:b}=n;u.hasAxis&&(v=f?v:n.xAxis,b=f?n.xAxis:b);const x=Rs(h,v,b,!1),E=en(h),w=Rs(h,20,0,!1).x,N=Rs(h,ks,0,!1).x;let k=x.y,B=x.x+t/2+w;return d&&(u.customType||u.hasTreemap||u.hasRadar?(B-=t/2+w,k+=N):(k+=E.height/2,B+=E.width/2-(t-w))),B+t>E.width&&(B=E.width-t-w),k+e>E.height&&(k-=d&&(u.customType||u.hasTreemap||u.hasRadar)?e+N*2:e*2),{top:k,left:B}},getTooltipPosition(t,e,n){var r,a,s;const o=this,{config:l,scale:c,state:u}=o,{width:f,height:d,current:h,customType:v,hasRadar:b,hasTreemap:x,isLegendRight:E,inputType:w}=u,N=o.hasType("gauge")&&!l.gauge_fullCircle,k=l.axis_rotated,B=o.hasArcType(),G=u.isCanvasMode?0:o.getSvgLeft(!0);let V=G+h.width-o.getCurrentPaddingByDirection("right");const Z=20;let{x:Y,y:et}=n;if(b)Y+=Y>=f/2?15:-(t+15),et+=15;else if(B){if(w!=="touch"){let ot=(a=(r=o.getTitlePadding)==null?void 0:r.call(o))!=null?a:0;ot&&N&&((s=l.arc_rangeText_values)!=null&&s.length)&&(ot+=10),Y+=(f-(E?o.getLegendWidth():0))/2,et+=(N?d:d/2)+ot+ks}}else if(v||x)et+=ks;else{const at={top:o.getCurrentPaddingByDirection("top",!0),left:o.getCurrentPaddingByDirection("left",!0)};k?(Y+=G+at.left+Z,et=at.top+n.xAxis+Z,V-=G):(Y=G+at.left+Z+(c.zoom?Y:n.xAxis),et+=at.top-5)}Y+t+15>V&&(Y-=t+(v||x||B?0:k?Z*2:38)),et+e>h.height&&(et-=N?e*1.5+ks:e+ks*2);const it={top:et,left:Y};return it.top<0&&(it.top=0),it.left<0&&(it.left=0),it},showTooltip(t,e){const n=this,{config:r,$el:{tooltip:a}}=n;if(!a||!r.tooltip_show)return;let s=null,o=0,l=`${n.data.targets.length}:`,c;for(let d=0;d<t.length;d++){const h=t[d];d>0&&(l+=","),l+=`${h==null?void 0:h.index}|${h==null?void 0:h.id}|${h==null?void 0:h.value}`,!c&&h&&(c=h),h&&L(n.getBaseValue(h))?(o++,s==null||s.push(h)):s||(s=t.slice(0,d))}if(o===0||!c)return;const u=a.datum();let f=s;if(!u||u.current!==l){const{index:d,x:h}=c;f||(f=t.slice()),se(r.tooltip_onshow,n.api,t),a.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null),a.datum({index:d,x:h,current:l,data:t,width:a.property("offsetWidth"),height:a.property("offsetHeight")}),se(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,d)}n.setTooltipPosition(f||t,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:r}}=t;e.add(()=>{if(r.style("display")==="block"){const{current:a}=n,{width:s,xPosInPercent:o}=r.datum();let l=a.width/100*o;const c=a.width-(l+s);c<0&&(l+=c),r.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:r,config:a,$el:{tooltip:s}}=n;if(s&&s.style("display")!=="none"&&(!a.tooltip_doNotHide||t)){const o=(e=s.datum().data)!=null?e:[];se(a.tooltip_onhide,r,o),s.style("display","none").datum(null),se(a.tooltip_onhidden,r,o)}},_handleLinkedCharts(t,e){const n=this,{charts:r,config:a,state:{event:s}}=n;if(s!=null&&s.isTrusted&&a.tooltip_linked&&r.length>1){const o=a.tooltip_linked_name;r.filter(l=>l!==n.api).forEach(l=>{var c,u;const{config:f,$el:d,state:h}=l.internal,v=f.tooltip_linked,b=f.tooltip_linked_name,x=Tt.body.contains(d.chart.node());if(v&&o===b&&x){const E=d.tooltip.data()[0],w=e!==(E==null?void 0:E.index);try{t&&w&&h.isCanvasMode?(u=(c=l.internal).showCanvasLinkedTooltip)==null||u.call(c,e):l.tooltip[t&&w?"show":"hide"]({index:e})}catch(N){}}})}},updateTooltipOnRedraw(t,e){var n;const r=this,{config:a,$el:{eventRect:s,svg:o,tooltip:l},state:{event:c,hasAxis:u,hasRadar:f,hasTreemap:d}}=r;if(!(r.state.isCanvasMode||r.state.flowing)&&(l==null?void 0:l.style("display"))==="block"&&c){const h=t!=null?t:(n=f?o:s)==null?void 0:n.node();if(u||f)if(r.isMultipleX())r.selectRectForMultipleXs(h,!1);else{const v=e!=null?e:r.getDataIndexFromEvent(c);e===-1?r.api.tooltip.hide():(r.selectRectForSingle(h,v),r.setExpand(v,null,!0))}else{const{clientX:v,clientY:b}=c;setTimeout(()=>{let x=[v,b].every(Number.isFinite)&&Tt.elementFromPoint(v,b);const E=x&&Zt(x).datum();if(E){const w=r.hasArcType()?r.convertToArcData(r.updateAngle(E)):E==null?void 0:E.data;d&&(x=o.node()),w&&r.showTooltip([w],x)}else r.api.tooltip.hide()},a.transition_duration)}}}},xR={getTranslate(t,e=0){var n;const r=this,{config:a,state:s}=r,o=a.axis_rotated;let l=0,c,u;if(e&&/^(x|y2?)$/.test(t)&&(l=r.getAxisSize(t)*e),t==="main")c=j(s.margin.left),u=j(s.margin.top);else if(t==="context")c=j(s.margin2.left),u=j(s.margin2.top);else if(t==="legend")c=s.margin3.left,u=s.margin3.top;else if(t==="x")c=o?-l:0,u=o?0:s.height+l;else if(t==="y")c=o?0:-l,u=o?s.height+l:0;else if(t==="y2")c=o?0:s.width+l,u=o?-l-1:0;else if(t==="subX")c=0,u=o?0:s.height2;else if(t==="subY")c=0,u=o?s.height2:0;else if(t==="subY2")c=o?0:s.width2,u=o?-1:0;else if(t==="arc")c=s.arcWidth/2,u=s.arcHeight/2,(n=a.arc_rangeText_values)!=null&&n.length&&(u+=5+(r.hasType("gauge")&&a.title_text?10:0));else if(t==="polar")c=s.arcWidth/2,u=s.arcHeight/2;else if(t==="radar"){const[f,d]=r.getRadarSize();c=s.width/2-f,u=s.height/2-d}return`translate(${c}, ${u})`},transformMain(t,e){const n=this,{$el:{main:r},$T:a}=n,s=e!=null&&e.axisX?e.axisX:a(r.select(`.${yn.axisX}`),t),o=e!=null&&e.axisY?e.axisY:a(r.select(`.${yn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:a(r.select(`.${yn.axisY2}`),t);a(r,t).attr("transform",n.getTranslate("main")),s.attr("transform",n.getTranslate("x")),o.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),r.select(`.${Ye.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:r,state:{customType:a,hasAxis:s,hasTreemap:o,isCanvasMode:l},$el:c}=n;l||(!a&&!o&&n.transformMain(t,e),s&&r.subchart_show&&n.transformContext(t,e),c.legend&&n.transformLegend(t))}};const bR=new Set(["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"]);var TR={isValidChartType(t){var e;return!!(t&&(Object.values(ne).indexOf(t)>-1||t===this.state.customType||(e=this.axisTypes)!=null&&e[t]))},getAxisTypes(){return Object.keys(this.axisTypes||{})},getAxisTypeParts(){return Object.values(this.axisTypes||{})},hasAxisTypePadding(){const t=this.axisTypes;return!!t&&Object.keys(t).some(e=>t[e].padded&&this.hasType(e))},getAxisTypeHooks(t){const e=this.axisTypes;if(e){for(const n in e)if(this.isTypeOf(t,n))return e[n]}},getSubchartTargetType(t){const e=this,{config:n}=e,r=$(t)?t:t==null?void 0:t.id,a=n.subchart_types||{},s=n.subchart_type,o=n.data_types||{},l=r&&a[r];return l&&e.isValidChartType(l)?l:s&&e.isValidChartType(s)?s:r&&o[r]||n.data_type||ne.LINE},getTargetType(t){var e;const{config:n}=this,r=$(t)?t:t==null?void 0:t.id;return r&&((e=n.data_types)==null?void 0:e[r])||n.data_type||ne.LINE},getSubchartSourceTargetType(t){const{state:e}=this,n=$(t)?t:t==null?void 0:t.id,r=e.subchartSourceTypes;return n&&(r==null?void 0:r[n])||this.getTargetType(t)},isSubchartSourceTypeOf(t,e){const n=this.getSubchartSourceTargetType(t);return q(e)?e.indexOf(n)>=0:n===e},withSubchartTypeContext(t){const e=this,{config:n,data:r,state:a}=e,s=n.data_type,o=n.data_types,l=a.current.types,c=a.subchartSourceTypes,u={},f={},d=n.subchart_type;e.mapToIds(r.targets).forEach(h=>{f[h]=e.getTargetType(h),u[h]=e.getSubchartTargetType(h)}),n.data_type=d&&e.isValidChartType(d)?d:s,n.data_types=u,a.current.types=[],a.subchartSourceTypes=f;try{return t()}finally{n.data_type=s,n.data_types=o,a.current.types=l,a.subchartSourceTypes=c}},setTargetType(t,e){const n=this,{config:r,state:{withoutFadeIn:a}}=n;n.mapToTargetIds(t).forEach(s=>{a[s]=e===r.data_types[s],r.data_types[s]=e}),t||(r.data_type=e)},updateTypesElements(){const t=this,{state:{current:e,customType:n}}=t,r=Object.values(ne);n&&r.push(n),r.forEach(a=>{const s=t.hasType(a,null,!0),o=e.types.indexOf(a);o===-1&&s?e.types.push(a):o>-1&&!s&&e.types.splice(o,1)}),t.setChartElements()},hasType(t,e,n=!1){var r;const a=this,{config:s,state:{current:o}}=a,l=s.data_types,c=e||a.data.targets;return!n&&((r=o.types)==null?void 0:r.indexOf(t))>-1?!0:c!=null&&c.length?c.some(u=>{const f=l[u.id];return f===t||!f&&t==="line"}):Object.keys(l).length?Object.values(l).some(u=>u===t):s.data_type===t},hasTypeOf(t,e,n=[]){return t in vr?!vr[t].filter(r=>n.indexOf(r)===-1).every(r=>!this.hasType(r,e)):!1},isTypeOf(t,e){const n=$(t)?t:t.id,r=this.config&&this.getTargetType(n);return q(e)?e.indexOf(r)>=0:r===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=$(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,vr.Line)},isStepType(t){return this.isTypeOf(t,vr.Step)},isSplineType(t){return this.isTypeOf(t,vr.Spline)},isAreaType(t){return this.isTypeOf(t,vr.Area)},isAreaRangeType(t){return this.isTypeOf(t,vr.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},getCustomType(){const t=this.customTypes;return t&&Object.keys(t).find(e=>this.hasType(e))||null},getCustomTypeParts(){var t;const{customType:e}=this.state;return e?(t=this.customTypes)==null?void 0:t[e]:void 0},getCustomTypeHooks(t){var e,n;const{customType:r}=this.state;return r&&this.isTypeOf(t,r)&&(n=(e=this.getCustomTypeParts())==null?void 0:e.hooks)!=null?n:null},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;return(t==null?void 0:t.tagName)==="circle"||e.point_type==="circle"&&(!n||q(n)&&n.length===0)},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){var e,n;const r=this.getCustomTypeHooks(t);return r?(n=(e=r.labelData)==null?void 0:e.call(r,this,t))!=null?n:[]:this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(a=>D(a.value)||!!a.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return bR.has(t)}};const SR={basis:P0,"basis-closed":M0,"basis-open":L0,bundle:D0,cardinal:F0,"cardinal-closed":N0,"cardinal-open":$0,"catmull-rom":B0,"catmull-rom-closed":k0,"catmull-rom-open":z0,"monotone-x":W0,"monotone-y":G0,natural:H0,"linear-closed":U0,linear:Qi,step:X0,"step-after":j0,"step-before":V0};function qu(t,e){var n,r;return t.isLineType(e)||((n=t.isScatterType)==null?void 0:n.call(t,e))||((r=t.isBubbleType)==null?void 0:r.call(t,e))}function kp(t){return e=>qu(t,e)}function tf(t,e,n){var r,a,s;const o=n?ul(t,e,n):void 0;return D(o)?o:(r=t.isCandlestickType)!=null&&r.call(t,e)?(s=(a=t.getCandlestickData)==null?void 0:a.call(t,e))==null?void 0:s.close:t.getBaseValue(e)}function ul(t,e,n){var r,a,s;if(!n||(r=t.isCandlestickType)!=null&&r.call(t,e)||!((a=t.isSubchartSourceTypeOf)!=null&&a.call(t,e,ne.CANDLESTICK)))return;const o=(s=t.getCandlestickData)==null?void 0:s.call(t,e);if(o)return t.isBarType(e)?D(o.volume)?o.volume:D(o.open)&&D(o.close)?o._isUp?o.close:o.open:void 0:D(o.close)?o.close:void 0}function zp(t,e,n){const r=ul(t,e,n);return D(r)&&t.isBarType(e)}function AR(t,e,n){var r;if(!zp(t,e,n))return null;const a=(r=t.getCandlestickData)==null?void 0:r.call(t,e);if(a!=null&&a._isUp)return t.color(e);const s=t.config.candlestick_color_down;return(s&&typeof s=="object"?s[e.id]:s)||t.color(e)}function ER(t){var e,n;const r=this;let a;if(qu(r,t)){const s=kp(r);a=r.generateGetLinePoints(r.getShapeIndices(s),!1,s)}else r.isBarType(t)?a=r.generateGetBarPoints(r.getShapeIndices(r.isBarType)):(e=r.isCandlestickType)!=null&&e.call(r,t)&&(a=(n=r.generateGetCandlestickPoints)==null?void 0:n.call(r,r.getShapeIndices(r.isCandlestickType)));return a}function Up(t,e,n){return this.config[e]?this.getGradienColortUrl(t.id):n(t)}function Wp(t){const{$el:e}=this,{elKey:n,className:r,cssRules:a,position:s}=t,o=e.main.select(`.${Se.chart}`);e[n]=s==="first"?o.insert("g",":first-child"):o.append("g"),e[n].attr("class",r),a!=null&&a.length&&e[n].call(this.setCssRule(!1,`.${r}`,a))}function ef(t,e){const n=this,{$el:r}=n,{type:a,elKey:s,containerClass:o,itemClass:l,initFn:c,withFocus:u=!0,withStyles:f=!0}=e;r[s]||c.call(n);const d=n.getChartClass(a),h=u?n.classFocus.bind(n):()=>"",b=r.main.select(`.${o}`).selectAll(`.${l}`).data(n.filterNullish(t)).attr("class",x=>d(x)+h(x)).enter().append("g").attr("class",d);return f&&b.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),b}var CR={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:r}=t.state,a={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area",...t.getAxisTypes()].forEach(s=>{const o=Ze(s);if(t.hasType(s)||t.hasTypeOf(o)||s==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${o}Type`]),c=t[`generateDraw${o}`];a.indices[s]=l,a.type[s]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||r){let s,o,l,c;r||(s=n?t.radarCircleX:e?t.circleY:t.circleX,o=n?t.radarCircleY:e?t.circleX:t.circleY),r&&t.state.isCanvasMode?l=c=function(){}:(l=t.generateXYForText(a.indices,!0),c=t.generateXYForText(a.indices,!1)),a.pos={xForText:l,yForText:c,cx:(s||function(){}).bind(t),cy:(o||function(){}).bind(t)}}return a},getShapeIndices(t){const e=this,{config:n}=e,r=n.data_xs,a=J(r),s={};let o=a?{}:0;return a&&qa(Object.keys(r).map(l=>r[l])).forEach(l=>{o[l]=0,s[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const u=l.id in r?r[l.id]:"",f=u?s[u]:s;for(let d=0,h;h=n.data_groups[d];d++)if(!(h.indexOf(l.id)<0))for(let v=0,b;b=h[v];v++){if(b in f){f[l.id]=f[b];break}l.id!==b&&u&&(f[b]=(c=f[l.id])!=null?c:o[u])}z(f[l.id])&&(f[l.id]=u?o[u]++:o++,f.__max__=(u?o[u]:o)-1)}),s},getIndices(t,e,n){const r=this,{data_xs:a,bar_indices_removeNull:s}=r.config,{id:o,index:l}=e;if(r.isBarType(o)&&s){const c={};return r.getAllValuesOnIndex(l,!0).forEach((u,f)=>{c[u.id]=f,c.__max__=f}),c}return J(a)?t[a[o]]:t},getIndicesMax(t){if(!J(this.config.data_xs))return t.__max__;let e=0;for(const n in t)e+=t[n].__max__||0;return e},getShapeX(t,e,n){const r=this,{config:a,scale:s}=r,o=n?s.subX:s.zoom||s.x,l=a.bar_overlap,c=a.bar_padding,u=(h,v)=>h+v,f=K(t)&&(t._$total.length?t._$total.reduce(u)/2:0),d=[];if(f&&K(t)&&t._$total.length){let h=0;for(const v of t._$total)h+=v,d.push(h)}return h=>{var v;const b=r.getIndices(e,h,"getShapeX"),x=h.id in b?b[h.id]:0,E=(b.__max__||0)+1;let w=0;if(J(h.x)){const N=o(h.x,!0);if(f){const k=t[h.id]||t._$width;w=l?N-k/2:N-k+((v=d[x])!=null?v:t._$total.slice(0,x+1).reduce(u))-f}else w=N-(D(t)?t:t._$width)*(E/2-(l?1:x))}return t&&w&&E>1&&c&&(x&&(w+=c*x),E>2?w-=(E-1)*c/2:E===2&&(w-=c/2)),w}},getShapeY(t){const e=this,n=e.isStackNormalized();return r=>{let{value:a}=r;const s=t?ul(e,r,t):void 0;return D(r)?a=r:D(s)?a=s:e.isAreaRangeType(r)?a=e.getBaseValue(r,"mid"):n?a=e.getRatio("index",r,!0):e.isBubbleZType(r)?a=e.getBubbleZData(r.value,"y"):e.isBarRangeType(r)&&(a=a[1]),e.getYScaleById(r.id,t)(a)}},getShapeYMin(t,e=!1){const n=this,r=n.axis.getId(t),a=n.getYScaleById(t,e),[s]=a.domain(),o=n.config[`axis_${r}_inverted`];return!n.isGrouped(t)&&!o&&s>0?s:0},getShapeOffsetData(t,e){const n=this,r=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),a=n.state.dataGeneration,s=r.map(h=>h.id).join("_"),o=`${Me.shapeOffset}_${e?"sub":"main"}_${s}`,l=n.cache.get(o);if((l==null?void 0:l.generation)===a)return l;const c=n.isStackNormalized(),u=r.map(h=>{let v=h.values;const b={};n.isStepType(h)&&(v=n.convertValuesToStep(v));const x=v.reduce((E,w)=>{const N=Number(w.x),k=tf(n,w,e);return E[N]=w,b[N]=c?n.getRatio("index",w,!0):k,E},{});return{id:h.id,rowValues:v,rowValueMapByXValue:x,values:b}}),f=r.reduce((h,{id:v},b)=>(h[v]=b,h),{}),d={generation:a,indexMapByTargetId:f,shapeOffsetTargets:u};return n.cache.add(o,d),d},getShapeOffset(t,e,n){const r=this,{shapeOffsetTargets:a,indexMapByTargetId:s}=r.getShapeOffsetData(t,n),o=r.config.data_groupsZeroAs;let l=null;if(!r.config.bar_indices_removeNull){l=new Map;for(const c of a){const u=r.getIndices(e,{id:c.id,index:0});l.set(c.id,a.filter(f=>f.id!==c.id&&u[f.id]===u[c.id]))}}return(c,u)=>{var f;const{id:d,value:h,x:v}=c,b=tf(r,c,n),x=r.getIndices(e,c),E=r.getYScaleById(d,n);if(r.isBarRangeType(c))return E(h[0]);const w=Number(v),N=E(o==="zero"?0:r.getShapeYMin(d,n));let k=N;const B=(f=l==null?void 0:l.get(d))!=null?f:a.filter(G=>G.id!==d&&x[G.id]===x[d]);for(const G of B){const{id:V,rowValueMapByXValue:Z,rowValues:Y,values:et}=G;if(s[V]<s[d]){const it=et[w];let at=Y[u];(!at||Number(at.x)!==w)&&(at=Z[w]);const ot=at&&tf(r,at,n);D(ot)&&D(b)&&ot*b>=0&&D(it)&&(b!==0||o==="positive"&&it>0||o==="negative"&&it<0)&&(k+=E(it)-N)}}return k}},generateGetLinePoints(t,e,n){const r=this,{config:a}=r,s=r.getShapeX(0,t,e),o=r.getShapeY(e),l=r.getShapeOffset(n||r.isLineType,t,e),c=r.getYScaleById.bind(r),u=new Map;return(f,d)=>{let h=u.get(f.id);h===void 0&&(h=c.call(r,f.id,e)(r.getShapeYMin(f.id,e)),u.set(f.id,h));const v=l(f,d)||h,b=s(f);let x=o(f);a.axis_rotated&&(f.value>0&&x<h||f.value<0&&h<x)&&(x=h);const E=[b,x-(h-v)];return[E,E,E,E]}},generateGetAreaPoints(t,e){const n=this,{config:r}=n,a=n.getShapeX(0,t,e),s=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n),c=new Map;return function(u,f){let d=c.get(u.id);d===void 0&&(d=l.call(n,u.id,e)(n.getShapeYMin(u.id,e)),c.set(u.id,d));const h=o(u,f)||d,v=a(u),b=u.value;let x=s(u);return r.axis_rotated&&(b>0&&x<d||b<0&&d<x)&&(x=d),[[v,h],[v,x-(d-h)],[v,x-(d-h)],[v,h]]}},generateGetBarPoints(t,e){const n=this,{config:r}=n,a=e?n.axis.subX:n.axis.x,s=n.getIndicesMax(t)+1,o=n.getBarW("bar",a,s),l=n.getShapeX(o,t,!!e),c=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n),d=new Map;return(h,v)=>{const{id:b}=h;let x=d.get(b);x||(x={y0:f.call(n,b,e)(n.getShapeYMin(b,e)),isInverted:r[`axis_${n.axis.getId(b)}_inverted`]},d.set(b,x));const{y0:E,isInverted:w}=x,N=u(h,v)||E,k=D(o)?o:o[h.id]||o._$width,B=h.value,G=l(h);let V=c(h);r.axis_rotated&&!w&&(B>0&&V<E||B<0&&E<V)&&(V=E),n.isBarRangeType(h)||(V-=E-N);const Z=G+k;return[[G,N],[G,V],[Z,V],[Z,N]]}},circleY(t,e){const n=this,r=t.id;let a;return n.isGrouped(r)&&(a=ER.bind(n)(t)),a?a(t,e)[0][1]:n.getYScaleById(r)(n.getBaseValue(t))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=kp(e),r=e.generateGetLinePoints(e.getShapeIndices(n),t,n),a=e.getShapeY(t);return(s,o)=>{const l=s.id;return e.isGrouped(l)&&qu(e,s)?r(s,o)[0][1]:a(s)}},getSubchartCandlestickShapeValue(t,e){return ul(this,t,e)},isSubchartCandlestickBarValue(t,e){return zp(this,t,e)},getSubchartCandlestickBarColor(t,e){return AR(this,t,e)},pointR(t){const e=this,{config:n}=e,r=n.point_r;let a=r;return e.isBubbleType(t)?a=e.getBubbleR(t):M(r)&&(a=r.bind(e.api)(t)),t.r=a,a},pointExpandedR(t){const e=this,{config:n}=e,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return M(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)M(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},getBarW(t,e,n){var r,a,s,o;const l=this,{config:c,org:u,scale:f,state:d}=l,h=l.getMaxDataCount(),v=t==="bar"&&((r=c.data_groups)==null?void 0:r.length),b=`${t}_width`,x=[(a=c.axis_x_min)!=null?a:u.xDomain[0],(s=c.axis_x_max)!=null?s:u.xDomain[1]].map(V=>l.axis.isTimeSeries()?bn.call(l,V):Number(V));let E=e.tickInterval(h);const w=(o=f.zoom)!=null?o:f.x,N=([V,Z])=>Math.abs(+Z-+V);if(e!==l.axis.subX&&!l.axis.isCategorized()&&N(w.domain())<N(u.xDomain)){const V=x.every((Z,Y)=>Z===u.xDomain[Y]);E=u.xDomain.map((Z,Y)=>{const et=V?Z:Z-Math.abs(x[Y]);return w(et)}).reduce((Z,Y)=>Math.abs(Z)+Y)/h}const B=V=>{const Z=V?c[b][V]:c[b],Y=V?Z.ratio:c[`${b}_ratio`],et=V?Z.max:c[`${b}_max`],it=D(Z)?Z:M(Z)?Z.call(l,d.width,n,h):n?E*Y/n:0;return et&&it>et?et:it};let G=B();return!v&&K(c[b])&&(G={_$width:G,_$total:[]},l.getTargetsToShow().forEach(V=>{c[b][V.id]&&(G[V.id]=B(V.id),G._$total.push(G[V.id]||G._$width))})),G},getShapeByIndex(t,e,n){const r=this,{$el:a}=r,s=L(e)?`-${e}`:"";let o=a[t];return o&&!o.empty()?o=o.filter(l=>n?l.id===n:!0).filter(l=>L(e)?l.index===e:!0):o=(n?a.main.selectAll(`.${Se[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):a.main).selectAll(`.${Se[t]}${s}`),o},isWithinShape(t,e){var n;const r=this,a=Zt(t);let s;return r.isTargetToShow(e.id)?(n=r.hasValidPointType)!=null&&n.call(r,t.nodeName)?s=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(r.getBaseValue(e))):r.isWithinCircle(t,r.isBubbleType(e)?r.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(s=a.classed(Se.bar)?r.isWithinBar(t):!0):s=!1,s},getInterpolate(t){const n=this.getInterpolateType(t);return SR[n]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?r=>{const a=e.getInterpolate(t)(r);return a.orgPoint=a.point,a.pointRotated=function(s,o){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+o*this._t;this._context.lineTo(this._x,l),this._context.lineTo(s,l),this._x=s,this._y=o},a.point=function(s,o){this._point===0?this.orgPoint(s,o):this.pointRotated(s,o)},a}:e.getInterpolate(t)},getInterpolateType(t){const e=this,{config:n}=e,r=n.spline_interpolation_type,a=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?a:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=Zn(this.state.event,t),n=Gv(t),[r,a,s]=n,o=Math.min(r.x,a.x),l=Math.min(r.y,a.y),c=this.config.bar_sensitivity,u=Math.abs(s.x-a.x),f=Math.abs(r.y-a.y),d=o-c,h=o+u+c,v=l+f+c,b=l-c;return d<e[0]&&e[0]<h&&b<e[1]&&e[1]<v}},wR=Object.defineProperty,IR=(t,e,n)=>e in t?wR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nn=(t,e,n)=>IR(t,typeof e!="symbol"?e+"":e,n);function Gp(){var t,e,n;return(n=(e=(t=yt.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function RR(t){var e,n,r,a;if(t.hasArcType())return"arc charts";if(t.state.customType){const s=(e=t.customTypeHooks)==null?void 0:e.canvasUnsupported;if(s)return s;if(!((n=t.getCustomTypeParts())!=null&&n.canvas))return`${t.state.customType} chart without its canvas module`}return(a=(r=t.getUnsupportedCanvasPart)==null?void 0:r.call(t))!=null?a:null}function OR(t){var e,n;const{config:r}=t,a=r.render_mode==="canvas"?RR(t):null;a&&((n=(e=yt.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] render.mode='canvas' is ignored for ${a}; falling back to SVG.`),r.render_mode="svg")}class dn{constructor(e){Nn(this,"api"),Nn(this,"config"),Nn(this,"cache"),Nn(this,"$el"),Nn(this,"state"),Nn(this,"charts"),Nn(this,"data",{xs:{},targets:[]}),Nn(this,"axis"),Nn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Nn(this,"org",{xScale:null,xDomain:null}),Nn(this,"color"),Nn(this,"patterns"),Nn(this,"levelColor"),Nn(this,"point"),Nn(this,"brush"),Nn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new Br,n.cache=new CC;const r=new TC;n.$el=r.getStore("element"),n.state=r.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,r){const{config:a,state:s}=this,o=a.transition_duration,l=a.subchart_show;let c=e;return c&&("tagName"in c&&(c=Zt(c)),c=(n!==!1&&o||n)&&(!s.zooming||s.dragging)&&!s.resizing&&s.rendered&&!l?c.transition(r).duration(o):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),se(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),se(e.config.onafterinit,e.api)}get customTypeHooks(){var e;const n=this;return n.state&&((e=n.getCustomTypeParts())==null?void 0:e.hooks)}init(){const e=this,{config:n,state:r,$el:a}=e,{boost_useCssRule:s,bindto:o}=n;r.customType=e.getCustomType(),wC(e),OR(e);const l=e.hasArcType();if(r.hasRadar=!r.hasAxis&&e.hasType("radar"),r.hasTreemap=!r.hasAxis&&e.hasType("treemap"),r.hasAxis=!l&&!r.customType&&!r.hasTreemap,r.datetimeId=`bb-${+new Date*Vn()}`,s){const u=Tt.createElement("style");u.type="text/css",Tt.head.appendChild(u),r.style={rootSelector:`.${r.datetimeId}`,sheet:u.sheet},a.style=u}const c={element:o,classname:"bb"};rt(o)&&(c.element=o.element||"#chart",c.classname=o.classname||c.classname),a.chart=M(c.element.node)?o.element:Zt(c.element||[]),a.chart.empty()&&(a.chart=Zt(Tt.body.appendChild(Tt.createElement("div")))),a.chart.html("").classed(c.classname,!0).classed(r.datetimeId,s).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:r,state:a,$el:{chart:s}}=n,o=()=>LC(s,{display:"none",visibility:"hidden"}),l=r.render.lazy===!1?!1:r.render.lazy||o(),c=yt.MutationObserver;l&&c&&r.render.observe!==!1&&!e&&new c((u,f)=>{o()||(f.disconnect(),!a.rendered&&n.initToRender(!0))}).observe(s.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(r,u=>{n.initWithData(u),n.afterInit()})}initParams(){var e,n;const r=this,{config:a,format:s,state:o}=r;if(a.render_mode==="canvas"&&((e=r.prepareCanvasConfig)==null||e.call(r)),r.color=r.generateColor(),r.levelColor=r.generateLevelColor(),a.padding===!1&&(a.axis_x_show=!1,a.axis_y_show=!1,a.axis_y2_show=!1,a.subchart_show=!1),a.render_mode!=="canvas"&&(r.hasPointType()||(n=r.hasLegendDefsPoint)!=null&&n.call(r))&&(r.point=Eu(r,"generatePoint").call(r)),o.hasAxis){r.initClip(),s.extraLineClasses=r.generateExtraLineClass(),s.dataTime=a.data_xLocaltime?Ag:Xc,s.axisTime=a.axis_x_localtime?Hc:Fo;const f=a.zoom_enabled&&a.zoom_type==="drag";s.defaultAxisTime=d=>{const{x:h,zoom:v}=r.scale,b=f?v:v&&h.orgDomain().toString()!==v.domain().toString(),x=d.getMilliseconds()&&".%L"||d.getSeconds()&&".:%S"||d.getMinutes()&&"%I:%M"||d.getHours()&&"%I %p"||d.getDate()!==1&&"%b %d"||b&&d.getDate()===1&&"%b'%y"||d.getMonth()&&"%-m/%-d"||"%Y";return s.axisTime(x)(d)}}const{legend_position:l,legend_inset_anchor:c,axis_rotated:u}=a;o.isLegendRight=l==="right",o.isLegendInset=l==="inset",o.isLegendTop=c==="top-left"||c==="top-right",o.isLegendLeft=c==="top-left"||c==="bottom-left",o.rotatedPadding.top=r.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=u&&!a.axis_x_show?0:30,o.inputType=DC(a.interaction_inputType_mouse,a.interaction_inputType_touch)}initWithData(e){var n,r,a,s,o,l;const c=this,{config:u,scale:f,state:d,$el:h,org:v}=c,{customType:b,hasAxis:x,hasTreemap:E}=d,w=u.interaction_enabled,N=c.hasType("polar"),k=u.data_labels_backgroundColors;if(x&&(c.axis=c.getAxisInstance(),u.zoom_enabled&&c.initZoom()),c.data.xs={},c.data.targets=c.convertDataToTargets(e),u.data_filter&&(c.data.targets=c.data.targets.filter(u.data_filter.bind(c.api))),u.data_hide&&c.addHiddenTargetIds(u.data_hide===!0?c.mapToIds(c.data.targets):u.data_hide),u.legend_hide&&c.addHiddenLegendIds(u.legend_hide===!0?c.mapToIds(c.data.targets):u.legend_hide),c.updateSizes(),c.updateScales(!0),x){const{x:V,y:Z,y2:Y,subX:et,subY:it,subY2:at}=f;V&&(V.domain(wr(c.getXDomain(c.data.targets),!u.axis_x_inverted)),et.domain(V.domain()),v.xDomain=V.domain()),Z&&(Z.domain(c.getYDomain(c.data.targets,"y")),it.domain(Z.domain())),Y&&(Y.domain(c.getYDomain(c.data.targets,"y2")),at&&at.domain(Y.domain()))}if(u.render_mode==="canvas"){if(!c.initCanvas)throw Error("[billboard.js] Please import and call canvas() to use render.mode='canvas'.");if(c.bindResize(),c.initCanvas(),u.tooltip_show&&c.initTooltip(),c.callPluginHook("$init"),se(u.oninit,c.api),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();se(u.data_onmin,c.api,V.min),se(u.data_onmax,c.api,V.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),w&&d.inputType){const V=d.inputType==="touch",{onclick:Z,onover:Y,onout:et}=u,it=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,at=X(it)&&it||!1,ot=!isNaN(it)&&it||null,st=V?{passive:!at&&ot===null}:void 0;h.svg.on("click",(Z==null?void 0:Z.bind(c.api))||null).on(V?"touchstart":"mouseenter",(Y==null?void 0:Y.bind(c.api))||null,st).on(V?"touchend":"mouseleave",(et==null?void 0:et.bind(c.api))||null)}u.svg_classname&&h.svg.attr("class",u.svg_classname);const B=M(u.color_tiles)&&c.patterns;(x||B||N||E||k||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),x&&["id","idXAxis","idYAxis","idY2Axis","idGrid"].forEach(V=>{c.appendClip(h.defs,d.clip[V])}),c.generateTextBGColorFilter(k),B&&c.patterns.forEach(V=>h.defs.append(()=>V.node))),c.updateSvgSize(),c.bindResize();const G=h.svg.append("g").classed(Oe.main,!0).attr("transform",b||E?null:c.getTranslate("main"));if(h.main=G,u.subchart_show&&c.initSubchart(),u.tooltip_show&&c.initTooltip(),u.title_text&&c.initTitle(),!E&&u.legend_show&&c.initLegend(),u.data_empty_label_text&&G.append("text").attr("class",`${vn.text} ${Oe.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),x&&(u.regions.length&&((a=c.initRegion)==null||a.call(c)),!u.clipPath&&c.axis.init()),G.append("g").classed(Oe.chart,!0).attr("clip-path",x?d.clip.path:null),c.callPluginHook("$init"),c.initChartElements(),x&&(w&&((s=c.initEventRect)==null||s.call(c)),(o=c.initGrid)==null||o.call(c),u.clipPath&&((l=c.axis)==null||l.init())),c.updateTargets(c.data.targets),c.updateDimension(),se(u.oninit,c.api),c.setBackground(),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();se(u.data_onmin,c.api,V.min),se(u.data_onmax,c.api,V.max)}u.tooltip_show&&c.initShowTooltip(),d.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:r,hasTreemap:a}=e.state,s=[];if(n){const o=["bar","bubble","candlestick","line",...e.getAxisTypes()];e.config.bar_front&&o.push(o.shift());for(const l of o){const c=Ze(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&s.push(c)}}else if(a)s.push("Treemap");else if(e.state.customType)s.push(Ze(e.state.customType));else{const o=e.hasType("polar"),l=e.hasType("gauge");r||s.push("Arc","Pie"),l?s.push("Gauge"):r?s.push("Radar"):o&&s.push("Polar")}for(const o of s)Eu(e,`init${o}`).call(e);J(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:r,defs:a,main:s,tooltip:o,legend:l,title:c,canvas:u,eventOverlay:f,grid:d,needle:h,arcs:v,circle:b,bar:x,candlestick:E,line:w,area:N,text:k}}=e;e.api.$={chart:n,svg:r,canvas:u,eventOverlay:f,defs:a,main:s,tooltip:o,legend:l,title:c,grid:d,arc:v,circles:b,bar:{bars:x},candlestick:E,line:{lines:w,areas:N},needle:h,text:{texts:k}}}setBackground(){const e=this,{config:{background:n},state:r,$el:{svg:a}}=e;if(J(n)){const s=a.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?s.attr("href",n.imgUrl):n.color&&s.style("fill",n.color).attr("clip-path",r.clip.path),s.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n,r;const a=this,{customType:s,hasAxis:o,hasRadar:l,hasTreemap:c}=a.state,u=d=>Eu(a,`updateTargetsFor${d}`).call(a,e.filter(a[`is${d}Type`].bind(a)));if(a.updateTargetsForText(e),o){const d=["bar","candlestick","line",...a.getAxisTypes()];for(const h of d){const v=Ze(h);(h==="line"&&a.hasTypeOf(v)||a.hasType(h))&&u(v)}(n=a.updateTargetsForSubchart)==null||n.call(a,e)}else if(a.hasArcType(e)){let d="Arc";l?d="Radar":a.hasType("polar")&&(d="Polar"),u(d)}else s?u(Ze(s)):c&&u("Treemap");const f=a.hasType("bubble")||a.hasType("scatter");f&&((r=a.updateTargetForCircle)==null||r.call(a)),a.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:r},$T:a}=n;let s=`.${Oe.target}`;e&&(s+=`, .${Ln.chartCircles} > .${Ln.circles}`),a(r.selectAll(s).filter(o=>n.isTargetToShow(o.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};for(const[r,a]of Object.entries(n)){const s=$(a)?n[a]:a;n[r]=Ce(e,`with${r}`,s)}return n}initialOpacity(e){const n=this,{withoutFadeIn:r}=n.state;return n.getBaseValue(e)!==null&&r[e.id]?null:"0"}bindResize(){var e,n;const r=this,{$el:a,config:s,state:o}=r,{resize_auto:l,resize_live:c}=s,u=/^(true|parent)$/.test(l),f=[],d=()=>{var b;const x=o.current.width,E=o.current.height;return r.setContainerSize(),!o.resizePreview&&x===o.current.width&&E===o.current.height?!1:(o.resizing=!0,o.dirty.size=!0,s.legend_show&&(r.updateSizes(),o.isCanvasMode?(b=r.updateHtmlLegend)==null||b.call(r):r.updateLegend()),r.api.flush(!1),!0)},h=()=>{if(o.resizeLiveScale===null&&(o.resizeLiveScale=o.resizeRedrawTime>Od),o.resizeLiveScale){r.previewResize();return}const b=Gp();d()&&(o.resizeRedrawTime=Gp()-b,o.resizeLiveScale=o.resizeRedrawTime>Od)},v=$C(s.resize_timer,u&&c?h:void 0);f.push(()=>se(s.onresize,r.api)),u&&f.push(d),f.push(()=>{se(s.onresized,r.api),o.resizing=!1,o.resizeLiveScale=null}),f.forEach(b=>v.add(b)),r.resizeFunction=v,l==="parent"&&yt.ResizeObserver?(r.resizeFunction.resizeObserver=new yt.ResizeObserver(r.resizeFunction.bind(r))).observe(a.chart.node().parentNode):(l==="parent"&&((n=(e=yt.console)==null?void 0:e.warn)==null||n.call(e,"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.")),yt.addEventListener("resize",r.resizeFunction))}callPluginHook(e,...n){this.config.plugins.forEach(r=>{e==="$beforeInit"&&(r.$$=this,this.api.plugins.push(r)),r[e](...n)})}}Ve(dn.prototype,[rw,iw,sw,pw,yw,Sw,KI,vw,ZI,aR,iR,nA,CR,sR,oR,hR,vR,yR,xR,TR]);const Hp=10,PR=750,MR={"&":"&","<":"<",">":">",'"':""","'":"'"};function nf(t){var e,n;(n=(e=yt.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] ${t}`)}function fl(t,e){var n;const{config:r}=t,a=(n=r.data_names[e])!=null?n:e;return M(r.legend_format)?r.legend_format(a,e!==a?e:void 0):a}function LR(t){return`${t}`.replace(/[&<>"']/g,e=>MR[e])}function DR(t,e){var n,r;const{config:a}=t,s=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],o=((r=t.getValidPointPattern)==null?void 0:r.call(t))||(Array.isArray(a.point_pattern)&&a.point_pattern.length?a.point_pattern:[a.point_type]),l=Math.max(0,s.indexOf(e));return o[l%o.length]||"circle"}function FR(t,e){const n=LR(t.color(e)),r=DR(t,e),a='viewBox="0 0 8 8" aria-hidden="true" focusable="false" style="display:block;width:100%;height:100%;overflow:visible;pointer-events:none"',s=`fill="${n}" stroke="${n}"`;return/^rect(angle)?$/i.test(r)?`<svg ${a}><rect x="1" y="1" width="6" height="6" ${s}></rect></svg>`:!r||/^circle$/i.test(r)?`<svg ${a}><circle cx="4" cy="4" r="3" ${s}></circle></svg>`:`<svg ${a}><g ${s}>${vt(r)}</g></svg>`}function NR(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(Me.legendItemMap,n)}function Xp(t,e){const{config:n}=t;e.attr("class",function(r){const s=`${Zt(this).attr("class")||""} ${t.generateClass(Ne.legendItem,r)}`;return Array.from(new Set(s.trim().split(/\s+/).filter(Boolean))).join(" ")}).style("visibility",r=>t.isLegendToShow(r)?null:"hidden").classed(Ne.legendItemHidden,r=>!t.isTargetToShow(r)).classed(lr.legendItemInteractive,!!n.interaction_enabled),NR(t,e)}function $R(t,e){var n;const{legend:r}=t.$el,a=((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e];r==null||r.selectAll(`.${Ne.legendItem}`).classed(Ke.legendItemFocused,s=>a.indexOf(s)>=0).style("opacity",function(s){return a.indexOf(s)>=0?null:t.opacityForUnfocusedLegend.call(t,Zt(this))})}function BR(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${Ne.legendItem}`).classed(Ke.legendItemFocused,!1).style("opacity",null)}function kR(t,e){var n,r,a;const{state:s}=t,l=(((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e]).filter(t.isTargetToShow,t),c=new Set(l),u=(((r=t.mapToTargetIds)==null?void 0:r.call(t))||[]).filter(f=>!c.has(f)&&t.isTargetToShow(f));s.focusedTargetIds=c,s.defocusedTargetIds=new Set(u),(a=t.renderCanvasFrame)==null||a.call(t,void 0,null,!1)}function Vp(t){var e,n,r;const{state:a}=t,s=!!((e=a.focusedTargetIds)!=null&&e.size)||!!((n=a.defocusedTargetIds)!=null&&n.size);a.focusedTargetIds=new Set,a.defocusedTargetIds=new Set,s&&((r=t.renderCanvasFrame)==null||r.call(t,void 0,null,!1))}function jp(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function zR(t,e,n){const r=jp(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Yp(t,e){const n=t.state.canvasLegendTouch,r=n&&jp(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Hp||Math.abs(r.clientY-n.y)>Hp)}function UR(t,e,n){Yp(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function WR(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function GR(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<PR;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function Kp(t,e){const{api:n,config:r,state:a}=t;if(e.on("click dblclick mouseover mouseout touchstart touchmove touchend",null),!r.interaction_enabled)return;const s=r.legend_item_interaction,o=typeof s=="object"&&(s!=null&&s.dblclick)?"dblclick":"click",l=a.inputType==="touch",c=s||M(r.legend_item_onclick),u=l?_p(r):void 0,f=function(d,h){var v;if(!se(r.legend_item_onclick,n,h,!a.hiddenTargetIds.has(h))){const b=Zt(this);d.type==="dblclick"||d.altKey?a.hiddenTargetIds.size&&!b.classed(Ne.legendItemHidden)?n.show():(n.hide(),n.show(h)):(n.toggle(h),b.classed(Ke.legendItemFocused,!1)),Vp(t)}l&&((v=t.hideTooltip)==null||v.call(t))};e.on(o,c?function(d,h){l&&d.type==="click"&&GR(t,h)||f.call(this,d,h)}:null),l&&o==="click"&&c&&e.on("touchstart",function(d,h){zR(t,h,d)},u).on("touchmove",d=>{Yp(t,d)},u).on("touchend",function(d,h){UR(t,h,d)&&(WR(t,h),f.call(this,d,h))},u),!l&&e.on("mouseover",s||M(r.legend_item_onover)?function(d,h){se(r.legend_item_onover,n,h,!a.hiddenTargetIds.has(h))||!a.transiting&&t.isTargetToShow(h)&&($R(t,h),kR(t,h))}:null).on("mouseout",s||M(r.legend_item_onout)?function(d,h){se(r.legend_item_onout,n,h,!a.hiddenTargetIds.has(h))||(BR(t),Vp(t))}:null)}function HR(t,e){var n,r;const a=(r=(n=t.$el.chart)==null?void 0:n.node)==null?void 0:r.call(n),s=a==null?void 0:a.ownerDocument;if(!a||!s)return null;const o=s.createElementNS("http://www.w3.org/2000/svg","svg"),l=s.createElementNS("http://www.w3.org/2000/svg","g"),c=s.createElementNS("http://www.w3.org/2000/svg","text");o.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",l.setAttribute("class",Ne.legendItem),c.textContent=e,l.appendChild(c),o.appendChild(l),a.appendChild(o);const u=en(c),f=o.getBoundingClientRect().top-u.top;return o.remove(),{width:u.width,height:u.height,ascent:f}}function Zp(t){return/^(indexed|category|log|timeseries)$/.test(t)}function dl(t){return/^(indexed|log|timeseries)$/.test(t)}function XR(t){var e,n;const r=t;return((e=r.changedTouches)==null?void 0:e[0])||((n=r.touches)==null?void 0:n[0])||("clientX"in t?t:null)}function VR(t,e,n=!1){var r,a;const s=zs(t,e);return s?n?(a=(r=t.hitDetector).findNearestShape)==null?void 0:a.call(r,s[0],s[1]):t.hitDetector.findNearest(s[0],s[1]):null}function jR(t,e){var n;const{config:r,state:a}=t,{height:s,margin:o,width:l,xAxisHeight:c}=a,[u,f]=e,d=o.left,h=o.left+l,v=o.top,b=o.top+s,x=r.axis_x_show?Math.max(c||0,24):0;return(n=t.isMultipleX)!=null&&n.call(t)||a.customType||a.hasTreemap?!1:r.axis_rotated?f>=v&&f<=b&&u>=d-x&&u<=h:u>=d&&u<=h&&f>=v&&f<=b+x}function YR(t,e){const{state:{height:n,margin:r,width:a}}=t,[s,o]=e;return s>=r.left&&s<=r.left+a&&o>=r.top&&o<=r.top+n}function KR(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(jR(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function Jp(t,e){var n,r;const{config:a,state:s}=t,o=t.filterTargetsToShow(t.data.targets),l=Qp(t,e),c=s.customType&&((n=t.customTypeHooks)!=null&&n.namedData)?f=>f:f=>{var d;return((d=t.addName)==null?void 0:d.call(t,f))||f},u=a.tooltip_grouped&&!s.customType&&!s.hasTreemap&&!l?(r=t.filterByX)==null?void 0:r.call(t,o,e.x):null;return(s.customType||s.hasTreemap?[e]:l?[e]:a.tooltip_grouped?u!=null&&u.length?u:o.map(f=>f.values[e.index]).filter(Boolean):[e]).map(c)}function ZR(t,e,n){var r,a;return(r=t.isMultipleX)!=null&&r.call(t)&&!Qp(t,e)?[((a=t.addName)==null?void 0:a.call(t,e))||e]:n}function zs(t,e){const n=XR(e);if(!n)return null;const r=t.$el.canvas.node(),a=en(r,!0);return[n.clientX-a.left,n.clientY-a.top]}function Ta(t){return t?`${t.id}:${t.index}`:null}function Qp(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(fa(t,e)||da(t,e))}function JR(t){return t.interaction_inputType_touch!==!1}function _p(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=X(n)&&n||!1,a=!isNaN(n)&&n||null;return{passive:!r&&a===null}}function QR(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=X(n)&&n||!1,a=!isNaN(n)&&n||null;let s;return o=>{var l,c;const u=((l=o.changedTouches)==null?void 0:l[0])||((c=o.touches)==null?void 0:c[0]);if(!u)return;const f=u[`client${t.axis_rotated?"Y":"X"}`];o.type==="touchstart"?r?o.preventDefault():a!==null&&(s=f):o.type==="touchmove"&&(r||s===!0||a!==null&&Math.abs(s-f)>=a)&&(s=!0,o.preventDefault())}}function Ni(t,e){return e.pointerType!=="mouse"&&t.state.inputType!=="touch"}function _R(t,e){const{state:n}=t,r=Ta(e),a=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return a&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!a}function qR(t,e){t.state.canvasLastInputClickKey=Ta(e),t.state.canvasLastInputClickTime=Date.now()}const tO=["treemap"],eO={getUnsupportedCanvasPart(){const t=tO.find(e=>{var n;return this.hasType(e)&&!((n=this.canvasTypes)!=null&&n[e])});return t?`${t} chart without its canvas module`:null},getCanvasFeature(t){var e;return(e=this.canvasFeatures)==null?void 0:e[t]},getCanvasTypeParts(){const t=this.canvasTypes;return t?Object.keys(t).filter(e=>this.hasType(e)).map(e=>t[e]):[]},warnMissingCanvasFeatures(){var t,e;const{config:n}=this;[["grid",this.initGrid,n.grid_x_show||n.grid_y_show||((t=n.grid_x_lines)==null?void 0:t.length)||((e=n.grid_y_lines)==null?void 0:e.length)],["subchart",this.initSubchart,n.subchart_show],["selection",this.selectPoint,n.data_selection_enabled]].forEach(([a,s,o])=>{var l;s&&o&&!((l=this.canvasFeatures)!=null&&l[a])&&nf(`canvas mode: ${a} is not drawn, because it is not imported from "billboard.js/canvas".`)})},prepareCanvasConfig(){var t,e;const{config:n,state:r}=this;this.warnUnsupportedCanvasOptions(),this.warnMissingCanvasFeatures(),(t=r.orgConfig)!=null&&t.transition&&Object.prototype.hasOwnProperty.call(r.orgConfig.transition,"duration")&&r.orgConfig.transition.duration&&nf("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,Zp(n.axis_x_type)||(n.axis_x_type="indexed"),dl(n.axis_y_type)||(n.axis_y_type="indexed"),dl(n.axis_y2_type)||(n.axis_y2_type="indexed"),(e=this.hasType)!=null&&e.call(this,"bubble")&&(n.point_show=!0,n.point_type="circle")},initCanvas(){var t,e,n,r,a,s,o;const l=this,{config:c,state:u,$el:f}=l,d=f.chart.node();u.isCanvasMode=!0,u.canvasInlineStyle.minHeight=d.style.minHeight,yt.getComputedStyle(d).position==="static"&&f.chart.style("position","relative"),f.chart.style("min-height",`${u.current.height}px`),l.canvasEngine=new k2,l.canvasEngine.init(d,u.current.width,l.getCanvasSurfaceHeight()),f.canvas=Zt(l.canvasEngine.canvas),l.canvasTheme=new q2,l.canvasTheme.load(d,c.canvas_theme,(s=(n=(e=(t=l.getCustomTypeParts)==null?void 0:t.call(l))==null?void 0:e.canvas)==null?void 0:n.theme)!=null?s:(a=(r=l.getAxisTypeParts)==null?void 0:r.call(l).find(h=>{var v;return(v=h.canvas)==null?void 0:v.theme}))==null?void 0:a.canvas.theme),l.canvasAxisRenderer=new NA(l.canvasEngine,l.canvasTheme),l.canvasRenderer=new e1(l.canvasEngine,l.canvasTheme),l.hitDetector=new aC,l.bindCanvasEvents(),c.zoom_enabled&&((o=l.bindZoomEvent)==null||o.call(l))},warnUnsupportedCanvasOptions(){var t,e,n;const{config:r}=this;[[!Zp(r.axis_x_type),"axis.x.type other than indexed/category/log/timeseries"],[!dl(r.axis_y_type),"axis.y.type other than indexed/log/timeseries"],[!dl(r.axis_y2_type),"axis.y2.type other than indexed/log/timeseries"],[r.boost_useCssRule,"boost.useCssRule"],[(t=this.hasArcType)==null?void 0:t.call(this),"arc charts"],[(e=this.hasType)==null?void 0:e.call(this,"radar"),"radar chart"],[(n=this.hasType)==null?void 0:n.call(this,"polar"),"polar chart"]].forEach(([s,o])=>{s&&nf(`canvas mode: ${o} is not yet supported.`)})},bindCanvasEvents(){const t=this,{config:e,state:n,$el:r}=t,a=r.canvas.node(),s=QR(e),o=_p(e);a.addEventListener("mousemove",t.onCanvasMouseMove.bind(t)),a.addEventListener("mouseenter",l=>{var c;n.event=l,(c=e.onover)==null||c.bind(t.api)(l)}),a.addEventListener("mouseout",t.onCanvasMouseOut.bind(t)),a.addEventListener("mouseleave",l=>{var c;n.event=l,(c=e.onout)==null||c.bind(t.api)(l)}),a.addEventListener("mousedown",l=>{var c,u;(c=t.onCanvasSubchartBrushStart)!=null&&c.call(t,l)||(u=t.onCanvasSelectionDragStart)==null||u.call(t,l)}),a.addEventListener("click",t.onCanvasClick.bind(t)),a.addEventListener("pointerdown",t.onCanvasPointerDown.bind(t)),a.addEventListener("pointerenter",t.onCanvasPointerEnter.bind(t)),a.addEventListener("pointermove",t.onCanvasPointerMove.bind(t)),a.addEventListener("pointerup",t.onCanvasPointerUp.bind(t)),a.addEventListener("pointerleave",t.onCanvasPointerOut.bind(t)),a.addEventListener("pointercancel",t.onCanvasPointerCancel.bind(t)),JR(e)&&(a.addEventListener("touchstart",l=>{s(l),t.onCanvasTouchStart(l)},o),a.addEventListener("touchmove",l=>{s(l),t.onCanvasTouchMove(l)},o),a.addEventListener("touchend",t.onCanvasTouchEnd.bind(t),o),a.addEventListener("touchcancel",t.onCanvasTouchCancel.bind(t),o))},updateHtmlLegend(){var t,e;const n=this,{config:r,state:a,$el:s}=n,o=s.chart.node();if(!r.legend_show||a.hasTreemap){a.hasTreemap?((t=s.legend)==null||t.remove(),s.legend=null):(e=s.legend)==null||e.style("visibility","hidden"),a.legendItemWidth=0,a.legendItemHeight=0,a.legendStep=0;return}const l=n.mapToIds(n.data.targets).filter(d=>r.data_names[d]!==null);if(r.legend_contents_bindto&&r.legend_contents_template){n.updateHtmlLegendTemplate(l)?(a.legendItemWidth=0,a.legendItemHeight=0,a.legendStep=0,a.legendHasRendered=!0):(a.legendItemWidth=0,a.legendItemHeight=0,a.legendStep=0);return}s.legend||(s.legend=Zt(o).append("div").classed(Ne.legend,!0).classed(lr.legend,!0)),s.legend.style("visibility",null);const c=s.legend.selectAll(`button.${Ne.legendItem}`).data(l,d=>d);c.exit().remove();const u=c.enter().append("button").attr("type","button").attr("data-id",d=>d);u.append("span").classed(Ne.legendItemTile,!0),u.append("span").classed(lr.legendItemTitle,!0);const f=u.merge(c).attr("class",d=>n.generateClass(Ne.legendItem,d).trim());Xp(n,f),f.select(`.${Ne.legendItemTile}`).classed(lr.legendItemTileCircle,!r.legend_usePoint&&r.legend_item_tile_type==="circle").style("background-color",d=>r.legend_usePoint?null:n.color(d)).html(d=>r.legend_usePoint?FR(n,d):""),f.select(`.${lr.legendItemTitle}`).text(d=>fl(n,d)),r.legend_tooltip&&f.attr("title",d=>fl(n,d)),Kp(n,f),n.updateHtmlLegendSize(l),n.positionHtmlLegend(),a.legendHasRendered=!0},updateHtmlLegendTemplate(t){const e=this,{api:n,config:r,$el:a}=e,s=Zt(r.legend_contents_bindto),o=r.legend_contents_template,l=[];let c="";if(s.empty())return!1;t.forEach(f=>{const d=M(o)?vt(o.call(n,f,e.color(f),n.data(f)[0].values)):Ir(o,{COLOR:e.color(f),TITLE:f});d&&(l.push(f),c+=d)});const u=s.html(vt(c)).classed(Ne.legend,!0).classed(lr.legend,!1).style("visibility",null).selectAll(function(){return this.children}).data(l);return Xp(e,u),Kp(e,u),a.legend=s,!0},updateHtmlLegendSize(t){const e=this,{config:n,state:r,$el:a}=e,s=[],o={};let l=0,c=0,u=0;const f=n.legend_contents_bindto&&n.legend_contents_template;if(f)a.legend.selectAll(`.${Ne.legendItem}`).each(function(d){const h=en(this,!0),v=`${fl(e,d)}`,b=Math.max(32,v.length*7+24),x=20,E=Math.ceil(h.width||b),w=Math.ceil(h.height||x);s.push(E),l=Math.max(l,E),c=Math.max(c,w)});else if(t.length){const d=r.isLegendRight||r.isLegendInset,h=n.legend_item_tile_type!=="circle",v={width:h?n.legend_item_tile_width:n.legend_item_tile_r*2,height:h?n.legend_item_tile_height:n.legend_item_tile_r*2},b={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:v.width+5,totalLength:0},x={offsets:{},widths:{},heights:{},margins:[0],steps:{}},E=t.map((Y,et)=>{const it=`${fl(e,Y)}`,at=HR(e,it),ot=Math.max(32,it.length*7),st=12,_=et===t.length-1,lt=n.legend_show&&!e.isLegendToShow(Y),nt=lt?0:((at==null?void 0:at.width)||ot)+b.tileWidth+(_&&!d?0:b.padding.right)+n.legend_padding,dt=lt?0:((at==null?void 0:at.height)||st)+b.padding.top;return b.max.width=Math.max(b.max.width,nt),b.max.height=Math.max(b.max.height,dt),{id:Y,hidden:lt,width:nt,height:dt,text:at}}),w=d?e.getLegendHeight():e.getLegendWidth(),N=(Y,et,it=!1)=>{let at;it||(at=(w-b.totalLength-et)/2,at<b.posMin&&(at=(w-et)/2,b.totalLength=0,b.step++)),x.steps[Y]=b.step,x.margins[b.step]=r.isLegendInset?10:at,x.offsets[Y]=b.totalLength,b.totalLength+=et};r.isLegendInset&&(b.step=n.legend_inset_step?n.legend_inset_step:t.length,r.legendStep=b.step),E.forEach(({id:Y,hidden:et,width:it,height:at})=>{const ot=n.legend_equally&&!et?b.max.width:it,st=n.legend_equally&&!et?b.max.height:at,_=d?st:ot;if(x.widths[Y]=ot,x.heights[Y]=st,s.push(ot),l=Math.max(l,ot),c=Math.max(c,st),et){x.steps[Y]=0,x.offsets[Y]=0;return}N(Y,_)});const k=r.isLegendRight?Y=>b.max.width*x.steps[Y]:r.isLegendInset?Y=>b.max.width*x.steps[Y]+10:Y=>x.margins[x.steps[Y]]+x.offsets[Y],B=r.isLegendRight||r.isLegendInset?Y=>x.margins[x.steps[Y]]+x.offsets[Y]:Y=>b.max.height*x.steps[Y],G=4+v.width,V=9,Z=(Y,et)=>et?14-et.ascent-(x.heights[Y]-et.height)/2:0;E.forEach(({id:Y,hidden:et,text:it})=>{const at=et?0:k(Y),ot=et?0:B(Y);o[Y]={item:{x:at,y:ot-5,width:x.widths[Y],height:x.heights[Y]},title:{x:G,y:et?0:Z(Y,it),height:x.heights[Y]},tile:{x:-2,y:V-v.height/2,width:v.width,height:v.height}}}),u=b.step}if(!t.length){r.legendItemWidth=0,r.legendItemHeight=0,r.legendStep=0;return}if(f){const d=Math.max(1,r.current.width),h=10;let v=1,b=0;s.forEach(x=>{b&&b+h+x>d?(v++,b=x):b+=(b?h:0)+x}),r.legendStep=Math.max(0,v-1)}else r.legendStep=u;r.legendItemWidth=l,r.legendItemHeight=Math.max(12,c),f||a.legend.selectAll(`button.${Ne.legendItem}`).each(function(d){const h=o[d],v=Zt(this);h&&(v.style("left",`${h.item.x}px`).style("top",`${h.item.y}px`).style("width",`${h.item.width}px`).style("height",`${h.item.height}px`),v.select(`.${lr.legendItemTitle}`).style("left",`${h.title.x}px`).style("top",`${h.title.y}px`).style("height",`${h.title.height}px`).style("line-height",`${h.title.height}px`),v.select(`.${Ne.legendItemTile}`).style("left",`${h.tile.x}px`).style("top",`${h.tile.y}px`).style("width",`${h.tile.width}px`).style("height",`${h.tile.height}px`))})},getCanvasBottomLegendHeight(){var t;const e=this,{config:n,state:r,$el:a}=e;if(!n.legend_show||r.isLegendRight||r.isLegendInset||r.hasTreemap||!a.legend||!r.legendItemHeight)return 0;const s=en(a.legend.node(),!0).height,o=r.legendItemHeight*(r.legendStep+1);return Math.ceil(Math.max(((t=e.getLegendHeight)==null?void 0:t.call(e))||0,s||o))},getCanvasSurfaceHeight(){const t=this;return Math.max(0,t.state.current.height-t.getCanvasBottomLegendHeight())},positionHtmlLegend(){var t;const e=this,{config:n,state:r,$el:a}=e,s=a.legend;if(s.classed(lr.legendBottom,!r.isLegendRight&&!r.isLegendInset).classed(lr.legendRight,r.isLegendRight).classed(lr.legendInset,r.isLegendInset).style("top",null).style("right",null).style("bottom",null).style("left",null).style("width",null).style("height",null).style("min-height",null),r.isLegendRight)s.style("top",`${r.margin3.top}px`).style("right","0").style("bottom",`${r.margin3.bottom}px`).style("width",`${Math.max(0,e.getLegendWidth())}px`);else if(r.isLegendInset){if(r.isLegendInset){const o=r.isLegendTop,l=r.isLegendLeft;s.style(o?"top":"bottom",`${n.legend_inset_y}px`).style(l?"left":"right",`${n.legend_inset_x}px`).style("width",`${Math.max(0,r.legendItemWidth*(r.legendStep+1)+20)}px`)}}else{const o=((t=e.getLegendHeight)==null?void 0:t.call(e))||0;s.style("top",`${Math.max(0,r.current.height-o)}px`).style("right","0").style("bottom","auto").style("left","0")}},dispatchCanvasDataOut(t){const e=this,{config:n,state:r}=e,a=r.canvasDataHover;a&&(r.canvasDataHover=null,r.canvasDataHoverKey=null,n.interaction_enabled&&se(n.data_onout,e.api,a,t))},dispatchCanvasDataOver(t,e){const n=this,{config:r,state:a}=n,s=Ta(t);a.canvasDataHoverKey!==s&&(n.dispatchCanvasDataOut(e),a.canvasDataHover=t,a.canvasDataHoverKey=s,r.interaction_enabled&&t&&se(r.data_onover,n.api,t,e))},dispatchCanvasDataClick(t,e=!1){var n;const r=this,{config:a,$el:s}=r,o=s.canvas.node(),l=VR(r,t,!0);if(!l||_R(r,l))return l;if(a.interaction_enabled){const c=a.data_selection_grouped?r.filterTargetsToShow(r.data.targets).map(u=>u.values[l.index]).filter(Boolean):[l];(n=r.toggleCanvasSelection)==null||n.call(r,c),c.forEach(u=>se(a.data_onclick,r.api,u,o)),e&&qR(r,l)}return l},onCanvasClick(t){var e;const n=this,{config:r,state:a}=n;if(a.event=t,a.flowing||a.cancelClick){a.cancelClick=!1;return}n.dispatchCanvasDataClick(t),(e=r.onclick)==null||e.bind(n.api)(t)},onCanvasPointerDown(t){var e,n;if(!Ni(this,t))return;const r=this,a=r.$el.canvas.node();if(!((e=r.startCanvasSubchartBrush)!=null&&e.call(r,t)))return;const s=t.pointerId,o=d=>d.pointerId===s,l=d=>{var h;o(d)&&((h=r.updateCanvasSubchartBrush)==null||h.call(r,d))},c=d=>{var h;o(d)&&((h=r.endCanvasSubchartBrush)==null||h.call(r,d),f())},u=d=>{var h;o(d)&&((h=r.cancelCanvasSubchartBrush)==null||h.call(r,d),f())};function f(){var d;yt.removeEventListener("pointermove",l),yt.removeEventListener("pointerup",c),yt.removeEventListener("pointercancel",u);try{(d=a.releasePointerCapture)==null||d.call(a,s)}catch(h){}}try{(n=a.setPointerCapture)==null||n.call(a,s)}catch(d){}yt.addEventListener("pointermove",l),yt.addEventListener("pointerup",c),yt.addEventListener("pointercancel",u)},onCanvasPointerEnter(t){var e;Ni(this,t)&&(this.state.event=t,(e=this.config.onover)==null||e.bind(this.api)(t))},onCanvasPointerMove(t){var e;Ni(this,t)&&((e=this.updateCanvasSubchartBrush)!=null&&e.call(this,t)||this.onCanvasMouseMove(t))},onCanvasPointerUp(t){var e,n;if(Ni(this,t)){if(this.state.event=t,(e=this.endCanvasSubchartBrush)!=null&&e.call(this,t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node())}},onCanvasPointerOut(t){var e;Ni(this,t)&&(this.state.canvasSubchartBrushDragging||(this.state.event=t,this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)))},onCanvasPointerCancel(t){var e,n;if(Ni(this,t)){if(this.state.event=t,(e=this.cancelCanvasSubchartBrush)!=null&&e.call(this,t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.onCanvasPointerOut(t)}},onCanvasTouchStart(t){var e,n,r;t.touches.length>1||(this.state.event=t,!((e=this.startCanvasSubchartBrush)!=null&&e.call(this,t))&&((n=this.startCanvasSelectionDrag)!=null&&n.call(this,t)||((r=this.config.onover)==null||r.bind(this.api)(t),this.onCanvasMouseMove(t))))},onCanvasTouchMove(t){var e,n;t.touches.length>1||(e=this.updateCanvasSubchartBrush)!=null&&e.call(this,t)||(n=this.updateCanvasSelectionDrag)!=null&&n.call(this,t)||this.onCanvasMouseMove(t)},onCanvasTouchEnd(t){var e,n,r,a,s;if(this.state.event=t,(e=this.endCanvasSubchartBrush)!=null&&e.call(this,t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}if((r=this.endCanvasSelectionDrag)!=null&&r.call(this,t)){(a=this.config.onout)==null||a.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node()),(s=this.config.onout)==null||s.bind(this.api)(t)},onCanvasTouchCancel(t){var e,n,r;this.state.event=t,(e=this.cancelCanvasSubchartBrush)==null||e.call(this,t),(n=this.endCanvasSelectionDrag)==null||n.call(this,t),this.onCanvasMouseOut(),(r=this.config.onout)==null||r.bind(this.api)(t)},onCanvasMouseMove(t){var e,n,r,a,s,o;const l=this,{config:c,state:u,$el:f}=l,d=f.canvas.node();if(u.event=t,u.flowing||u.canvasSelectionDragging)return;if((e=l.updateCanvasSubchartCursor)!=null&&e.call(l,t)){l.dispatchCanvasDataOut(d),u.canvasFocusKey&&(u.canvasFocusKey=null,l.clearCanvasFocus()),(n=l.hideTooltip)==null||n.call(l);return}const h=zs(l,t),v=h&&(((r=l.getCanvasMainPointFromSubchart)==null?void 0:r.call(l,h))||h),b=v?KR(l,v):null;if(!b){if(l.dispatchCanvasDataOut(d),u.canvasFocusKey&&(u.canvasFocusKey=null,l.clearCanvasFocus()),h&&c.axis_tooltip&&YR(l,h)){l.renderCanvasAxisTooltip(h),(a=l.hideTooltip)==null||a.call(l);return}(s=l.hideTooltip)==null||s.call(l);return}l.dispatchCanvasDataOver(b,d);const x=Jp(l,b),E=ZR(l,b,x),w=E.map(N=>`${N.id}:${N.index}`).join("|");(u.canvasFocusKey!==w||c.axis_tooltip)&&(u.canvasFocusKey=w,l.renderCanvasFocus(E,v)),(o=l.showTooltip)==null||o.call(l,x,d)},onCanvasMouseOut(){var t;const e=this.$el.canvas.node();e.style.cursor="",this.dispatchCanvasDataOut(e),this.state.canvasFocusKey?(this.state.canvasFocusKey=null,this.clearCanvasFocus()):this.config.axis_tooltip&&this.clearCanvasFocus(),(t=this.hideTooltip)==null||t.call(this)},showCanvasLinkedTooltip(t){var e,n,r,a;const s=this,{$el:o,state:l}=s,c=(e=o.canvas)==null?void 0:e.node(),f=s.filterTargetsToShow(s.data.targets).map(w=>w.values[t]).find(Boolean);if(!c||!f)return(n=s.hideTooltip)==null||n.call(s),!1;const d=Jp(s,f),h=d.find(w=>w&&gn(s,w))||d[0];if(!d.length||!h)return(r=s.hideTooltip)==null||r.call(s),!1;const{left:v,top:b}=en(c,!0),x=T(s,h),E=[l.margin.left+x.x,l.margin.top+x.y];return l.event={clientX:v+E[0],clientY:b+E[1],currentTarget:c,target:c},l.canvasFocusKey=d.map(w=>`${w.id}:${w.index}`).join("|"),s.renderCanvasFocus(d,E),(a=s.showTooltip)==null||a.call(s,d,c),!0},renderCanvasZoomBrush(t,e){const n=this;n.canvasEngine.withOverlay(r=>{n.canvasRenderer.withContext(r,()=>{n.canvasRenderer.drawZoomBrush(n,t,e)})})},clearCanvasZoomBrush(){this.canvasEngine.clearOverlay()},renderCanvasFrame(t,e,n=!1){var r,a,s,o,l,c,u,f;const d=this,{state:h}=d,v=t||h.canvasShape||d.getDrawShape();h.canvasShape=v,h._canvasVisibleRangeCache=null,h._canvasXTickValuesCache=null,d.canvasEngine.beginFrame(h.current.width,d.getCanvasSurfaceHeight());try{d.canvasRenderer.drawBackground(d),d.canvasAxisRenderer.drawTitle(d),h.hasAxis&&d.canvasAxisRenderer.draw(d),d.canvasRenderer.draw(d,v),h.hasAxis&&d.config.grid_lines_front&&((a=(r=d.getCanvasFeature)==null?void 0:r.call(d,"grid"))==null||a.drawLines.call(d,d.canvasAxisRenderer)),(o=(s=d.getCanvasFeature)==null?void 0:s.call(d,"subchart"))==null||o.draw.call(d,d.canvasRenderer,v),h.hasAxis&&((c=(l=d.getCanvasFeature)==null?void 0:l.call(d,"subchart"))==null||c.drawXAxis.call(d,d.canvasAxisRenderer)),h.hasAxis&&((f=(u=d.getCanvasFeature)==null?void 0:u.call(d,"subchart"))==null||f.drawYAxes.call(d,d.canvasAxisRenderer)),d.canvasRenderer.drawEmptyLabel(d),n&&d.hitDetector.rebuild(d,v)}finally{d.canvasEngine.endFrame()}d.canvasEngine.clearOverlay(),h.canvasFocusMainRedraw=!1,e&&d.renderCanvasFocus(e)},renderCanvasFocus(t,e){var n,r,a,s,o,l,c,u,f,d;const h=this,{state:v}=h,b=(r=(n=h.canvasRenderer).hasExpandedShapeFocus)==null?void 0:r.call(n,h,t);if(v.canvasFocusData=t,b||v.canvasFocusMainRedraw){const x=v.canvasShape||h.getDrawShape();h.canvasEngine.beginFrame(v.current.width,h.getCanvasSurfaceHeight());try{h.canvasRenderer.drawBackground(h),h.canvasAxisRenderer.drawTitle(h),v.hasAxis&&h.canvasAxisRenderer.draw(h),h.canvasRenderer.draw(h,x,b?t:void 0),v.hasAxis&&h.config.grid_lines_front&&((s=(a=h.getCanvasFeature)==null?void 0:a.call(h,"grid"))==null||s.drawLines.call(h,h.canvasAxisRenderer)),(l=(o=h.getCanvasFeature)==null?void 0:o.call(h,"subchart"))==null||l.draw.call(h,h.canvasRenderer,x),v.hasAxis&&((u=(c=h.getCanvasFeature)==null?void 0:c.call(h,"subchart"))==null||u.drawXAxis.call(h,h.canvasAxisRenderer)),v.hasAxis&&((d=(f=h.getCanvasFeature)==null?void 0:f.call(h,"subchart"))==null||d.drawYAxes.call(h,h.canvasAxisRenderer)),h.canvasRenderer.drawEmptyLabel(h)}finally{h.canvasEngine.endFrame()}}v.canvasFocusMainRedraw=!!b,h.canvasEngine.withOverlay(x=>{h.canvasRenderer.withContext(x,()=>{h.canvasRenderer.drawFocus(h,t)}),h.canvasAxisRenderer.withContext(x,()=>{h.canvasAxisRenderer.drawFocusedXAxisTick(h,t),e&&h.canvasAxisRenderer.drawAxisTooltip(h,e)})})},renderCanvasAxisTooltip(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasAxisRenderer.withContext(n,()=>{e.canvasAxisRenderer.drawAxisTooltip(e,t)})})},clearCanvasFocus(){var t;const e=this;e.state.canvasFocusMainRedraw?(e.state.canvasFocusMainRedraw=!1,e.renderCanvasFrame(void 0,null,!1)):(t=e.canvasEngine)==null||t.clearOverlay()},resizeCanvas(){var t,e;const n=this,{config:r,state:a,$el:s}=n,o=s.chart.node();n.clearResizePreview(),s.chart.style("min-height",`${a.current.height}px`),(t=n.canvasEngine)==null||t.resize(a.current.width,n.getCanvasSurfaceHeight()),(e=n.canvasTheme)==null||e.reload(o,r.canvas_theme)}};let qp=()=>(Ve(dn.prototype,eO),(qp=()=>"canvas")());const rf=[mr,_n,zn,Ql],hl=new WeakMap;function nO(t,e){const n=t.state.canvasSelectionDragIncluded,r=hl.get(t)||new Map,a=new Map,s=new Set,o=[];return e.filter(l=>af(t,l)).forEach(l=>{const c=Ta(l);c&&(s.add(c),!a.has(c)&&a.set(c,l))}),a.forEach((l,c)=>{!n.has(c)&&o.push(l)}),r.forEach((l,c)=>{!s.has(c)&&o.push(l)}),hl.set(t,a),{included:s,rows:o}}function rO(t){return t?Array.isArray(t)?t:[t]:null}function af(t,e){return e&&gn(t,e)&&oi(t,e,rf)&&rf.some(n=>n(t,e))&&t.config.data_selection_isselectable.bind(t.api)(e)}function sf(t,e){t.filterTargetsToShow(t.data.targets).filter(n=>oi(t,n,rf)).forEach(n=>{n.values.forEach(r=>{af(t,r)&&e(r)})})}function aO(t,e,n){var r,a;const s=(r=e.getCanvasSelectedData)==null?void 0:r.call(e);if(!e.config.data_selection_enabled||!(s!=null&&s.length)||e.state.customType||e.state.hasTreemap)return;const{ctx:o,painter:l,theme:{style:c}}=t,{margin:u}=e.state,f=_n.bind(null,e),d=zn.bind(null,e),h=s.some(f)?e.generateGetBarPoints(Pn(e,n,ne.BAR,f),!1):null,v=s.some(d)?(a=e.generateGetCandlestickPoints)==null?void 0:a.call(e,Pn(e,n,ne.CANDLESTICK,d),!1):null,b=h?pt(e):null,x=b?mt(e):new Set;l.withTranslation(u.left,u.top,()=>{s.forEach(E=>{var w,N,k,B,G,V,Z;const Y=e.color(E.id);if(f(E)&&h){const et=ns(e,h,E,E.index);if(!et)return;const{points:it,rect:at}=et,ot=b?wt(e,E,it,b,x).corners:0;b?l.fillRoundRect(at,ot,{fill:"#fff",alpha:.3}):l.fillRect(at,{fill:"#fff",alpha:.3}),b?l.strokeRoundRect(at,ot,{stroke:Y,lineWidth:2}):l.strokeRect(at,{stroke:Y,lineWidth:2})}else if(d(E)&&v){if(!((w=e.getCandlestickData)==null?void 0:w.call(e,E)))return;const it=rs(e,v,E,E.index);if(!it)return;const{body:at,wickStart:ot,wickEnd:st}=it;l.strokePath(()=>{l.traceLine(ot[0],ot[1],st[0],st[1])},{stroke:Y,lineWidth:3}),l.fillRect(at,{fill:"#fff",alpha:.3}),l.strokeRect(at,{stroke:Y,lineWidth:2})}else if(mr(e,E)){const et=sc(e,{id:E.id}),{x:it,y:at}=T(e,E),ot=(k=(N=e.pointR)==null?void 0:N.call(e,E))!=null?k:2.5,st=(G=(B=e.pointSelectR)==null?void 0:B.call(e,E))!=null?G:ot*2;if(!ln(it,at))return;is(l,"circle",it,at,st,{fill:c.selectedPoint.fill,lineWidth:c.selectedPoint.lineWidth,stroke:c.selectedPoint.stroke||Y}),(V=e.isPointFocusOnly)!=null&&V.call(e)||is(l,et,it,at,ot,{fill:c.shape.pointFillColor||Y,stroke:c.shape.pointStrokeColor||Y,lineWidth:(Z=c.shape.pointLineWidth)!=null?Z:1})}}),o.globalAlpha=1})}function tm(t,e,n){const{margin:r,width:a,height:s}=e.state,o={x:r.left,y:r.top,w:a,h:s},l=Math.max(o.x,n.x),c=Math.max(o.y,n.y),u=Math.min(o.x+o.w,n.x+n.w),f=Math.min(o.y+o.h,n.y+n.h);u<=l||f<=c||t.painter.fillRect({x:l,y:c,w:u-l,h:f-c},{fill:t.theme.style.zoomBrush.fill,alpha:t.theme.style.zoomBrush.opacity})}var iO={getCanvasSelectedData(t){const e=this,n=e.state.canvasSelection,r=[];return!e.config.data_selection_enabled||!(n!=null&&n.size)||sf(e,a=>{(!t||a.id===t)&&n.has(Ta(a))&&r.push(a)}),r},setCanvasSelection(t=!1,e,n,r){var a;const s=this,{config:o,state:l}=s,c=l.canvasSelection,u=o.data_selection_grouped;let f=rO(e),d=!1;const h=t&&!o.data_selection_multiple;let v=!h;if(o.data_selection_enabled){if(h&&(n=n!=null&&n.length?[n[0]]:[0],!u))if(f)f=f.slice(0,1);else{const[b]=s.filterTargetsToShow(s.data.targets);f=b?[b.id]:[]}sf(s,b=>{const x=Ta(b),E=u||!f||f.indexOf(b.id)>=0,w=!n||n.indexOf(b.index)>=0,N=c.has(x);if(t)if(E&&w&&(!N||h)){if(v||(s.setCanvasSelection(!1),v=!0),c.has(x))return;c.add(x),se(o.data_onselected,s.api,b,s.canvasEngine.canvas),d=!0}else(!h||v)&&r&&N&&(c.delete(x),se(o.data_onunselected,s.api,b,s.canvasEngine.canvas),d=!0);else E&&w&&N&&(c.delete(x),se(o.data_onunselected,s.api,b,s.canvasEngine.canvas),d=!0)}),d&&((a=s.renderCanvasFrame)==null||a.call(s,void 0,null,!1))}},toggleCanvasSelection(t){var e;const n=this,{config:r,state:a}=n,s=a.canvasSelection;let o=!1;r.data_selection_enabled&&(t.filter(l=>af(n,l)).forEach(l=>{const c=Ta(l),u=s.has(c);r.data_selection_multiple||sf(n,f=>{const d=Ta(f);(r.data_selection_grouped?f.id===l.id:d!==c)&&s.has(d)&&(s.delete(d),se(r.data_onunselected,n.api,f,n.canvasEngine.canvas),o=!0)}),u&&s.has(c)?(s.delete(c),se(r.data_onunselected,n.api,l,n.canvasEngine.canvas)):(s.add(c),se(r.data_onselected,n.api,l,n.canvasEngine.canvas)),o=!0}),o&&((e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1)))},canStartCanvasSelectionDrag(t){const e=this,{config:n}=e,r=t;return!!(n.interaction_enabled&&n.data_selection_enabled&&n.data_selection_draggable&&n.data_selection_multiple&&!n.zoom_enabled&&(r.button===void 0||r.button===0))},getCanvasSelectionDragData(t){const e=this,{config:n}=e,r=e.hitDetector.findInRect(t,n.data_selection_grouped);if(!n.data_selection_grouped)return r;const a=new Set(r.map(s=>s.index));return e.filterTargetsToShow(e.data.targets).flatMap(s=>s.values.filter(o=>a.has(o.index)))},startCanvasSelectionDrag(t){var e,n;const r=this,{state:a}=r,s=zs(r,t);return!s||!r.canStartCanvasSelectionDrag(t)?!1:(a.dragStart=s,a.canvasSelectionDragStart=s,a.canvasSelectionDragIncluded=new Set,a.canvasSelectionDragging=!0,a.canvasSelectionDragMoved=!1,hl.set(r,new Map),r.setDragStatus(!0),(e=r.hideTooltip)==null||e.call(r),(n=t.preventDefault)==null||n.call(t),!0)},updateCanvasSelectionDrag(t){var e;const n=this,{config:r,state:a}=n,s=a.canvasSelectionDragStart,o=zs(n,t);if(!a.canvasSelectionDragging||!s||!o)return!1;const[l,c]=s,[u,f]=o,d=Math.min(l,u),h=Math.max(l,u),v=r.data_selection_grouped?a.margin.top:Math.min(c,f),b=r.data_selection_grouped?a.margin.top+a.height:Math.max(c,f),x={x:d,y:v,w:h-d,h:b-v},E=Math.abs(u-l)>4||Math.abs(f-c)>4;if(a.canvasSelectionDragMoved=a.canvasSelectionDragMoved||E,E){const{included:w,rows:N}=nO(n,n.getCanvasSelectionDragData(x));N.length&&n.toggleCanvasSelection(N),a.canvasSelectionDragIncluded=w,a.cancelClick=!0}return n.renderCanvasSelectionDrag(x),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSelectionDrag(t){var e;const n=this,{state:r}=n;return r.canvasSelectionDragging?(n.updateCanvasSelectionDrag(t),r.cancelClick=r.cancelClick||r.canvasSelectionDragMoved,r.dragStart=null,r.canvasSelectionDragStart=null,r.canvasSelectionDragIncluded=new Set,r.canvasSelectionDragging=!1,r.canvasSelectionDragMoved=!1,hl.delete(n),n.setDragStatus(!1),n.clearCanvasFocus(),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSelectionDragStart(t){const e=this,{state:n}=e;if(!e.startCanvasSelectionDrag(t))return;const r=s=>{e.updateCanvasSelectionDrag(s)},a=s=>{e.endCanvasSelectionDrag(s),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a),n.canvasSelectionDragMoveHandler=null,n.canvasSelectionDragEndHandler=null};n.canvasSelectionDragMoveHandler=r,n.canvasSelectionDragEndHandler=a,window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)},renderCanvasSelectionDrag(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasRenderer.withContext(n,()=>{tm(e.canvasRenderer,e,t)})})}};const sO={draw(t,e){aO(t,this,e)},drawDragArea(t,e){tm(t,this,e)}};var oO=Object.defineProperty,lO=Object.defineProperties,cO=Object.getOwnPropertyDescriptors,em=Object.getOwnPropertySymbols,uO=Object.prototype.hasOwnProperty,fO=Object.prototype.propertyIsEnumerable,nm=(t,e,n)=>e in t?oO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dO=(t,e)=>{for(var n in e||(e={}))uO.call(e,n)&&nm(t,n,e[n]);if(em)for(var n of em(e))fO.call(e,n)&&nm(t,n,e[n]);return t},hO=(t,e)=>lO(t,cO(e));const rm=6,gO=2,am=new Map;function of(t,e){var n,r;if(!Array.isArray(e)||e.length<2)return null;const a=e.slice(0,2);return(r=(n=t.axis)==null?void 0:n.isTimeSeries)!=null&&r.call(n)?a.map(s=>bn.call(t,s)):a}function Us(t){const{config:e,state:n}=t;return!e.subchart_show||!n.hasAxis||n.width2<=0||n.height2<=0?null:{x:n.margin2.left,y:n.margin2.top,w:n.width2,h:n.height2}}function im(t,e){const n=Us(t);return!!n&&e[0]>=n.x&&e[0]<=n.x+n.w&&e[1]>=n.y&&e[1]<=n.y+n.h}function vO(t,e){const{config:n,state:r}=t,a=Us(t);if(n.subchart_brush_enabled!==!1||!a||!im(t,e))return null;const s=F(t,n.axis_rotated?e[1]-a.y:e[0]-a.x);return s===null?null:n.axis_rotated?[r.margin.left+r.width/2,r.margin.top+s]:[r.margin.left+s,r.margin.top+r.height/2]}function gl(t){var e,n;const r=Us(t),a=r?t.config.axis_rotated?r.h:r.w:0,s=(n=(e=t.axis)==null?void 0:e.getExtent)==null?void 0:n.call(e),o=Array.isArray(s)?s.slice(0,2):[];if(o.length===2&&o.every(Number.isFinite)){const l=Math.max(0,Math.min(a,o[0])),c=Math.max(0,Math.min(a,o[1]));return[Math.min(l,c),Math.max(l,c)]}return[0,a]}function lf(t,e,n=!1){const r=zs(t,e),a=r&&Us(t);if(!r||!a||!im(t,r))return null;const s=t.config.axis_rotated?r[1]-a.y:r[0]-a.x,[o,l]=gl(t);return!n&&(s<o||s>l)?null:Math.max(o,Math.min(l,s))}function pO(t,e,n){const r=Math.min(e,n),a=Math.max(e,n);return[t.scale.subX.invert(r),t.scale.subX.invert(a)]}function sm(t){const{scale:e,state:n}=t,r=n.domain;if(!(r!=null&&r.length)||!e.subX)return null;const a=Us(t),s=e.subX(r[0]),o=e.subX(r[1]);if(!a||!Number.isFinite(s)||!Number.isFinite(o))return null;const[l,c]=gl(t);return[Math.max(l,Math.min(c,Math.min(s,o))),Math.max(l,Math.min(c,Math.max(s,o)))]}function om(t,e){const n=sm(t);if(!n)return"select";const[r,a]=n;return Math.abs(e-r)<=rm?"resize-start":Math.abs(e-a)<=rm?"resize-end":e>r&&e<a?"move":"select"}function cf(t,e,n){const[r,a]=gl(t);return[Math.max(r,Math.min(a,e)),Math.max(r,Math.min(a,n))]}function mO(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function yO(t,e){const n=yt.Path2D;if(!n)return null;const r=`${t}:${e}`,a=am.get(r);if(a)return a;const s=new n(Ld[t][e]);return am.set(r,s),s}function xO(t,e){var n,r,a;const s=e==="y2"?"subY2":"subY",o=(a=(r=(n=t.axis)==null?void 0:n[s])==null?void 0:r.tickFormat)==null?void 0:a.call(r),l=t.config[`subchart_axis_${e}_tick_format`]||t.config[`axis_${e}_tick_format`];return o||(typeof l=="function"?l.bind(t.api):(c=>c))}function bO(t,e,n){const{config:r,state:a}=e;if(!r.subchart_show||!a.hasAxis||a.width2<=0||a.height2<=0)return;const{ctx:s,painter:o,theme:{style:l}}=t,{margin2:c,width2:u,height2:f}=a,d={x:c.left,y:c.top,w:u,h:f};e.withSubchartTypeContext(()=>{var h;const v=e.filterTargetsToShow().filter(Mr.bind(null,e)),b=e.getDrawShape();(h=e.updateSubchartYDomain)==null||h.call(e,v),o.withState(()=>{o.clipRect(d,()=>{o.withTranslation(d.x,d.y,()=>{var x,E,w,N,k,B;const G=v.filter(es.bind(null,e)),V=Pn(e,b,ne.AREA,es.bind(null,e));for(const lt of G)lt.values.some(gn.bind(null,e))&&(s.globalAlpha=l.shape.areaOpacity*ir(e,lt),s.fillStyle=e.color(lt.id),eh(e,lt,V,o,!0));s.globalAlpha=1;const Z=v.filter(_n.bind(null,e)),Y=Pn(e,b,ne.BAR,_n.bind(null,e)),et=(x=e.generateGetBarPoints)==null?void 0:x.call(e,Y,!0);if(et){for(const lt of Z)s.globalAlpha=l.shape.barOpacity*ir(e,lt),s.fillStyle=e.color(lt.id),lt.values.forEach((nt,dt)=>{var bt;if(!gn(e,nt))return;const At=ns(e,et,nt,dt),Et=((bt=e.getSubchartCandlestickBarColor)==null?void 0:bt.call(e,nt,!0))||s.fillStyle;At&&o.fillRect(At.rect,{fill:Et})});s.globalAlpha=1}const it=v.filter(zn.bind(null,e)),at=Pn(e,b,ne.CANDLESTICK,zn.bind(null,e)),ot=(E=e.generateGetCandlestickPoints)==null?void 0:E.call(e,at,!0);if(ot){s.lineWidth=l.shape.candlestickLineWidth;for(const lt of it){const nt=ir(e,lt);s.globalAlpha=nt,lt.values.forEach((dt,bt)=>{var At;const Et=(At=e.getCandlestickData)==null?void 0:At.call(e,dt),Rt=Et&&rs(e,ot,dt,bt);if(!Rt)return;const Vt=sh(e,{id:lt.id},Et);s.strokeStyle=Vt,s.fillStyle=Vt,o.strokePath(()=>{o.traceLine(Rt.wickStart[0],Rt.wickStart[1],Rt.wickEnd[0],Rt.wickEnd[1])}),o.fillRect(Rt.body,{fill:s.fillStyle})})}}const st=v.filter(li.bind(null,e)),_=Pn(e,b,ne.LINE,li.bind(null,e));s.globalAlpha=1;for(const lt of st)lt.values.some(gn.bind(null,e))&&(s.globalAlpha=ir(e,lt),s.lineWidth=ah(e,lt)?l.shape.lineFocusedWidth:l.shape.lineWidth,s.strokeStyle=e.color(lt.id),th(e,lt,_,o,!0));if(s.globalAlpha=1,r.point_show&&!((w=e.isPointFocusOnly)!=null&&w.call(e))){const lt=(N=e.updateCircleY)==null?void 0:N.call(e,!0),nt=(k=e.subxx)==null?void 0:k.bind(e);if(nt&<){for(const dt of v){if(!fa(e,dt)&&!da(e,dt))continue;const bt=e.color(dt.id),At=l.shape.pointFillColor||bt,Et=l.shape.pointStrokeColor||bt,Rt=Et?(B=l.shape.pointLineWidth)!=null?B:1:0,Vt=Et&&Rt>0?{fill:At,stroke:Et,lineWidth:Rt}:{fill:At};s.globalAlpha=ho(e,dt)*ir(e,dt),dt.values.forEach((ae,re)=>{if(!gn(e,ae))return;const ve=r.axis_rotated?lt(ae,re):nt(ae),xe=r.axis_rotated?nt(ae):lt(ae,re),ge=Math.min(os(e,dt,ae),3);ln(ve,xe)&&is(o,"circle",ve,xe,ge,Vt)})}s.globalAlpha=1}}})}),lm(t,e)})})}function lm(t,e){var n,r;const{config:a,scale:s,state:o}=e,l=o.domain;if(!a.subchart_show||a.subchart_brush_enabled===!1||!(l!=null&&l.length)||!s.subX)return;const{margin2:c,width2:u,height2:f}=o,d=s.subX(l[0]),h=s.subX(l[1]),v=a.axis_rotated?f:u,b=(r=(n=e.axis)==null?void 0:n.getExtent)==null?void 0:r.call(n),x=Array.isArray(b)&&b.length>=2&&b.every(Number.isFinite)?b.slice(0,2):[0,v],E=Math.max(0,Math.min(v,Math.min(...x))),w=Math.max(0,Math.min(v,Math.max(...x))),N=Math.max(E,Math.min(w,Math.min(d,h))),k=Math.max(E,Math.min(w,Math.max(d,h))),B=k-N;if(B<=0)return;const G=a.axis_rotated?{x:c.left,y:c.top+N,w:u,h:B}:{x:c.left+N,y:c.top,w:B,h:f};t.painter.fillRect(G,{fill:t.theme.style.subchartBrush.fill,alpha:t.theme.style.subchartBrush.opacity}),a.subchart_showHandle&&(uf(t,e,N,"start"),uf(t,e,k,"end"))}function uf(t,e,n,r){const{config:a,state:{margin2:s,width2:o,height2:l}}=e,{ctx:c,painter:u,theme:{style:f}}=t,d=a.axis_rotated,h=f.subchartBrush.handleFill,v=f.subchartBrush.handleStroke,b=d?s.left+o/2:s.left+n,x=d?s.top+n:s.top+l/2,E=yO(d?"y":"x",r);E&&u.withState(()=>{c.translate(b,x),c.fillStyle=h,c.strokeStyle=v,c.lineWidth=f.subchartBrush.handleLineWidth,c.globalAlpha=f.subchartBrush.handleOpacity,c.fill(E),c.globalAlpha=1,c.stroke(E)})}function TO(t,e,n){const{config:r,scale:a,state:s}=e,o=n==null?void 0:n.find(E=>E&&gn(e,E));if(!o||!r.subchart_show||r.subchart_grid_focus_continuous||r.subchart_brush_enabled!==!1||r.grid_focus_show===!1||r.subchart_grid_focus===!1||!r.tooltip_show||r.axis_tooltip||!a.subX||s.width2<=0||s.height2<=0)return;const{margin2:l,width2:c,height2:u}=s,f=a.subX(o.x);if(!Number.isFinite(f))return;const{painter:d,theme:{style:h}}=t,v=h.axis.lineWidth,b=d.crisp(l.left+f,v),x=d.crisp(l.top+f,v);d.strokePath(()=>{r.axis_rotated?d.traceLine(l.left,x,l.left+c,x):d.traceLine(b,l.top,b,l.top+u)},{lineDash:h.focusGrid.dashArray,lineWidth:h.focusGrid.lineWidth,stroke:h.focusGrid.lineColor})}function SO(t,e){var n,r,a,s;const{ctx:o,painter:l,theme:{style:{axis:c}}}=t,{config:u,format:f,scale:d,state:{current:h,margin2:v,width2:b,height2:x}}=e;if(!u.subchart_show||!u.subchart_axis_x_show||!d.subX||b<=0||x<=0)return;const E=u.axis_rotated,w=l.crisp(v.left,c.lineWidth),N=l.crisp(v.top+x,c.lineWidth),k=v.left,B=v.left+b,G=v.top,V=v.top+x,Z=E?G:k,Y=E?V:B,et=Kg(e),it=gA(e,et,c.tickWidth),at=(n=u.subchart_axis_x_tick_outer)!=null?n:u.axis_x_tick_outer,ot=E?u.axis_x_tick_inner?1:-1:u.axis_x_tick_inner?-1:1,st=tv(E),_=au(E),lt=u.axis_x_tick_text_position,nt=E?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0,dt=f.subXAxisTick||((s=(a=e.axis)==null?void 0:a.getXAxisTickFormat)==null?void 0:s.call(a,!0));l.clipRect(E?su(v,h.width,x):hO(dO({},iu(v,b,h.height-v.top)),{y:v.top}),()=>{o.globalAlpha=1,o.strokeStyle=c.lineColor,o.lineWidth=c.lineWidth,o.setLineDash([]),l.strokePath(()=>{E?l.traceLine(w,G,w,V):l.traceLine(k,N,B,N),at&&(E?(l.traceLine(w,G,w+tn*st,G),l.traceLine(w,V,w+tn*st,V)):(l.traceLine(k,N,k,N+tn*st),l.traceLine(B,N,B,N+tn*st)))});const bt=Es(c,"x");o.font=bt,o.fillStyle=c.labelColor,o.textAlign=E?_>0?"left":"right":"center",o.textBaseline=E?"middle":_>0?"top":"bottom",o.strokeStyle=c.tickColor,o.lineWidth=c.tickWidth;const At=lu(l,Qn(bt)),Et=cu(e,et,E,d.subX);if(u.subchart_axis_x_tick_show)for(const Rt of it){const Vt=d.subX(Jr(e,Rt)),ae=v.left+Vt,re=v.top+Vt;Xo(E?re:ae,Z,Y)&&l.strokePath(()=>{E?l.traceLine(w,re,w+tn*ot,re):l.traceLine(ae,N,ae,N+tn*ot)})}for(const Rt of et){const Vt=d.subX(Jr(e,Rt)),ae=v.left+Vt,re=v.top+Vt;if(!Xo(E?re:ae,Z,Y)||!u.subchart_axis_x_tick_text_show)continue;const xe=qg(e,l,dt,Rt,et,E,d.subX,Et);let ge,Le;E?(ge=w+(tn+Ma)*_+(lt.x||0),Le=re+(lt.y||0),o.textAlign=_>0?"left":"right",o.textBaseline="middle"):(ge=ae+(lt.x||0),Le=N+(tn+Ma)*_+(lt.y||0),o.textAlign=nt?nt>0?"left":"right":"center",o.textBaseline=_>0?"top":"bottom"),l.withState(Yt=>{Yt.translate(ge,Le),nt&&Yt.rotate(nt*Math.PI/180),xe.forEach((pe,be)=>{Yt.fillText(pe,0,be*At)})})}})}function AO(t,e){const{config:n,scale:r,state:{margin2:a,width2:s,height2:o}}=e;!n.subchart_show||s<=0||o<=0||["y","y2"].forEach(l=>{var c;const u=l==="y2"?r.subY2:r.subY;!n[`subchart_axis_${l}_show`]||!u||t.drawYAxis(e,l,{scale:u,ticks:As(e,l,void 0,!0,u,`subchart_axis_${l}`),format:xO(e,l),index:0,outerTick:(c=n[`subchart_axis_${l}_tick_outer`])!=null?c:n[`axis_${l}_tick_outer`],margin:a,width:s,height:o,prefix:`subchart_axis_${l}`,tickShow:n[`subchart_axis_${l}_tick_show`],tickTextShow:n[`subchart_axis_${l}_tick_text_show`],tickTextPosition:n[`axis_${l}_tick_text_position`]})})}var EO={getCanvasMainPointFromSubchart(t){return vO(this,t)},applyCanvasSubchartDomain(){const t=this,{axis:e,config:n,scale:r,state:a}=t;if(!n.subchart_show||!a.hasAxis||!r.subX)return;!a.rendered&&!a.domain&&n.subchart_init_range&&(a.domain=of(t,n.subchart_init_range));const s=of(t,a.domain);!s||!t.withinRange(s,t.getZoomDomain("subX",!0),t.getZoomDomain("subX"))||(a.domain=s,r.x.domain(s),e.x.scale(r.x))},setCanvasSubchartDomain(t,e=!0,n=!1){const r=this,{config:a,scale:s,state:o}=r,l=of(r,t);if(!(!a.subchart_show||!l||!r.withinRange(l,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))))return o.domain=l,s.zoom=null,e&&r.redraw({withTransition:!1,withY:a.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n&&a.subchart_onbrush.bind(r.api)(o.domain),o.domain},clearCanvasSubchartDomain(t=!0,e=!1){var n;const r=this,{axis:a,config:s,org:o,scale:l,state:c}=r;s.subchart_show&&(c.domain=void 0,l.zoom=null,(n=o.xDomain)!=null&&n.length&&(l.x.domain(o.xDomain),a.x.scale(l.x)),t&&r.redraw({withTransition:!1,withUpdateXDomain:!0,withUpdateOrgXDomain:!1,withY:s.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e&&s.subchart_onbrush.bind(r.api)(l.x.orgDomain()))},updateCanvasSubchartBrush(t){var e,n;const r=this,{config:a,state:s}=r,o=s.canvasSubchartBrushStart,l=s.canvasSubchartBrushOrigin,c=s.canvasSubchartBrushMode,u=lf(r,t,!0);if(a.subchart_brush_enabled===!1||!s.canvasSubchartBrushDragging||o===null||u===null||!c)return!1;const f=u-o;if(Math.abs(f)>gO&&(s.canvasSubchartBrushMoved=!0),!s.canvasSubchartBrushMoved)return(e=t.preventDefault)==null||e.call(t),!0;let d;if(c==="move"&&l){const[v,b]=gl(r),x=l[1]-l[0];let E=l[0]+f,w=l[1]+f;E<v&&(w+=v-E,E=v),w>b&&(E-=w-b,w=b),d=[Math.max(v,Math.min(b-x,E)),Math.min(b,Math.max(v+x,w))]}else c==="resize-start"&&l?d=cf(r,u,l[1]):c==="resize-end"&&l?d=cf(r,l[0],u):d=cf(r,o,u);const h=pO(r,d[0],d[1]);return r.setCanvasSubchartDomain(h,!0),s.cancelClick=!0,(n=t.preventDefault)==null||n.call(t),!0},updateCanvasSubchartCursor(t){const e=this,n=e.$el.canvas.node();if(e.config.subchart_brush_enabled===!1)return n.style.cursor="",!1;const r=lf(e,t);if(r===null)return n.style.cursor="",!1;const a=om(e,r);return n.style.cursor=mO(e,a),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;if(n.config.subchart_brush_enabled===!1)return!1;const a=lf(n,t);if(a===null)return!1;const s=om(n,a);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=s,r.canvasSubchartBrushStart=a,r.canvasSubchartBrushOrigin=sm(n),r.canvasSubchartBrushMoved=!1,r.cancelClick=!0,n.setDragStatus(!0),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSubchartBrush(t){var e,n,r;const a=this,{state:s}=a;if(!s.canvasSubchartBrushDragging)return!1;a.updateCanvasSubchartBrush(t);const o=s.canvasSubchartBrushMode==="select"&&!s.canvasSubchartBrushMoved,l=s.canvasSubchartBrushMoved||o;return o?(e=a.clearCanvasSubchartDomain)==null||e.call(a,!0,!0):l&&a.config.subchart_onbrush.bind(a.api)((n=s.domain)!=null?n:a.scale.x.orgDomain()),s.canvasSubchartBrushDragging=!1,s.canvasSubchartBrushMode=null,s.canvasSubchartBrushStart=null,s.canvasSubchartBrushOrigin=null,s.canvasSubchartBrushMoved=!1,a.setDragStatus(!1),(r=t.preventDefault)==null||r.call(t),!0},cancelCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;return r.canvasSubchartBrushDragging?(r.canvasSubchartBrushDragging=!1,r.canvasSubchartBrushMode=null,r.canvasSubchartBrushStart=null,r.canvasSubchartBrushOrigin=null,r.canvasSubchartBrushMoved=!1,n.setDragStatus(!1),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSubchartBrushStart(t){const e=this;if(!e.startCanvasSubchartBrush(t))return!1;const n=a=>{e.updateCanvasSubchartBrush(a)},r=a=>{e.endCanvasSubchartBrush(a),yt.removeEventListener("mousemove",n),yt.removeEventListener("mouseup",r)};return yt.addEventListener("mousemove",n),yt.addEventListener("mouseup",r),!0}};const CO={draw(t,e){bO(t,this,e)},drawXAxis(t){SO(t,this)},drawYAxes(t){AO(t,this)},drawBrush(t){lm(t,this)},drawBrushHandle(t,e,n){uf(t,this,e,n)},drawFocus(t,e){TO(t,this,e)}};var wO={exclusive:!0,draw(t){var e;const n=this,{ctx:r,painter:a,theme:{style:s}}=t,{config:o}=n,l=(e=n.getTreemapRoot)==null?void 0:e.call(n,n.data.targets),c=(l==null?void 0:l.children)||[];a.withState(()=>{var u;r.lineWidth=s.treemap.lineWidth,r.strokeStyle=s.treemap.stroke;for(const f of c){const{data:d}=f;if(!Ql(n,d))continue;const{x:h,y:v,w:b,h:x}=I(n,f,l,!0);if(!ln(h,v)||!ln(h+b,v+x)||b<=0||x<=0)continue;const E={x:h,y:v,w:b,h:x};if(r.fillStyle=n.color(d.name),a.fillRect(E),a.strokeRect(E),!o.treemap_label_show||(d.ratio||0)<(o.treemap_label_threshold||0))continue;const w=R(n,d,b,x);if(!w)continue;const N=w.split(`
|
|
51
|
+
`),k=!!o.data_labels.centered;r.font=s.label.font;const B=Qn(r.font),G=r.measureText((u=N[0])!=null?u:""),V=(G.fontBoundingBoxAscent||0)+(G.fontBoundingBoxDescent||0)||(G.actualBoundingBoxAscent||0)+(G.actualBoundingBoxDescent||0),Z=Math.max(B,V)+(N.length-1)*B,Y=k?v+x/2:v+Z+5;let et=k?h+b/2:h+5,it=Y-(N.length-1)*B/(k?2:1);r.textAlign=k?"center":"left",r.textBaseline=k?"middle":"alphabetic",{x:et,y:it}=t.drawLabelImage(n,d,w,et,it),r.fillStyle=Ud(n,d,s.label.color),Wd(n,a,d,w,et,k?it+(N.length-1)*B/2:Y),N.forEach((at,ot)=>{a.text(at,et,it+ot*B,{maxWidth:Math.max(0,b-8)})})}})},hits(t){var e;const n=this,r=(e=n.getTreemapRoot)==null?void 0:e.call(n,n.data.targets),a=(r==null?void 0:r.children)||[];for(const s of a){const{data:o}=s;if(!Ql(n,o))continue;const{x:l,y:c,w:u,h:f}=I(n,s,r,!0);!ln(l,c)||!ln(l+u,c+f)||t.addBar({x:l,y:c,w:u,h:f,data:o})}}},IO=Object.defineProperty,cm=Object.getOwnPropertySymbols,RO=Object.prototype.hasOwnProperty,OO=Object.prototype.propertyIsEnumerable,um=(t,e,n)=>e in t?IO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vl=(t,e)=>{for(var n in e||(e={}))RO.call(e,n)&&um(t,n,e[n]);if(cm)for(var n of cm(e))OO.call(e,n)&&um(t,n,e[n]);return t};function PO(t,e){const n=dn.prototype,r=n.canvasTypes||(n.canvasTypes={});r[t]=vl(vl({},r[t]),e)}function ff(t,e){const n=dn.prototype,r=n.canvasFeatures||(n.canvasFeatures={});r[t]=vl(vl({},r[t]),e)}var fm={category(t,e){const n=this.internal,{config:r}=n;return arguments.length>1&&(r.axis_x_categories[t]=e,n.state.dirty.data=!0,n.redraw()),r.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const r=n.axis_x_categories;return tt(r)?Object.values(e.data.xs)[0]:r}return n.axis_x_categories=t,e.state.dirty.data=!0,e.redraw(),n.axis_x_categories}};function MO(t){const e=this.config;let n,r,a;const s=()=>{const o=r.shift();if(o&&n&&K(n)&&o in n)return n=n[o],s();if(!o)return n};Object.keys(e).forEach(o=>{n=t,r=o.split("_"),a=s(),H(a)&&(e[o]=a)}),this.api&&(this.state.orgConfig=t)}var LO={resize(t){const e=this.internal,{config:n,state:r}=e;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,r.dirty.size=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n,r,a;const s=this.internal,{state:o,$el:{zoomResetBtn:l}}=s;o.rendered?(o.resizing?(e=s.brush)==null||e.updateResize():(n=s.axis)==null||n.setOrient(),l==null||l.style("display","none"),s.scale.zoom&&(o.current.zoomDomain=(a=(r=s.zoom)==null?void 0:r.getDomain())!=null?a:s.scale.zoom.domain()),s.scale.zoom=null,o.resizing||(o.dirty.data=!0),t?s.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):s.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!o.resizing&&s.brush&&(s.brush.getSelection().call(s.brush.move),s.unselectRect()),o.current.zoomDomain&&(s.api.zoom(o.current.zoomDomain),o.current.zoomDomain=null)):s.initToRender(!0)},destroy(){var t,e,n,r,a,s,o,l,c,u,f,d;const h=this.internal,{state:v,$el:{chart:b,style:x,svg:E}}=h;if(J(h)){h.callPluginHook("$willDestroy"),(t=h.cache)==null||t.remove(["setOverOut","callOverOutForTouch"]),h.charts.splice(h.charts.indexOf(this),1),h.charts.length===0&&jC(),h.unbindAllEvents(),E==null||E.select("*").interrupt(),v.canvasFlowFrame!==null&&((n=(e=yt).cancelAnimationFrame)==null||n.call(e,v.canvasFlowFrame)),v.canvasFlowFrame=null,v.canvasFlowFinish=null,v.pendingRaf!==null&&((a=(r=yt).cancelAnimationFrame)==null||a.call(r,v.pendingRaf)),v.pendingRaf=null,(s=h.canvasRenderer)==null||s.destroy(),(o=h.canvasEngine)==null||o.destroy(),(l=h.resizeFunction)==null||l.clear(),(u=(c=h.resizeFunction)==null?void 0:c.clearLive)==null||u.call(c),(d=(f=h.resizeFunction)==null?void 0:f.resizeObserver)==null||d.disconnect(),h.resizeFunction&&yt.removeEventListener("resize",h.resizeFunction),b.classed("bb",!1).style("position",null),v.isCanvasMode&&b.style("min-height",v.canvasInlineStyle.minHeight||null),b.selectChildren().remove(),x&&x.parentNode.removeChild(x),Object.keys(this).forEach(w=>{w==="internal"&&Object.keys(h).forEach(N=>{h[N]=null}),this[w]=null,delete this[w]});for(const w in this)this[w]=()=>{}}return null},config(t,e,n){const r=this.internal,{config:a,state:s}=r,o=t==null?void 0:t.replace(/\./g,"_");let l;return t&&o in a?H(e)?(a[o]=e,l=e,n&&this.flush()):l=a[o]:(arguments.length===0||tt(t))&&(l=s.orgConfig),l}},DO={color(t){return this.internal.color(t)}};const dm=function(t){const{targets:e}=this.internal.data;if(!z(t)){const n=q(t)?t:[t];return e.filter(r=>n.some(a=>a===r.id))}return e};Ve(dm,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const r=this.data(t);q(r)&&(n=[],r.forEach(a=>{e?a.values.forEach(s=>n.push(s.value)):n.push(a.values.map(s=>s.value))}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var FO={data:dm},NO={focus(t){var e,n,r;const a=this.internal,{state:s}=a,o=a.mapToTargetIds(t);if(s.isCanvasMode){const c=o.filter(a.isTargetToShow,a),u=new Set(c),f=a.mapToTargetIds().filter(d=>!u.has(d)&&a.isTargetToShow(d));a.revertLegend(),a.toggleFocusLegend(f,!1),a.toggleFocusLegend(c,!0),s.focusedTargetIds=u,s.defocusedTargetIds=new Set(f),(e=a.renderCanvasFrame)==null||e.call(a,void 0,null,!1);return}const l=a.$el.svg.selectAll(a.selectorTargets(o.filter(a.isTargetToShow,a)));this.revert(),this.defocus(),l.classed(Ke.focused,!0).classed(Ke.defocused,!1),a.hasArcType()&&!s.hasRadar&&(a.expandArc(o),a.hasType("gauge")&&a.markOverlapped(t,a,`.${er.gaugeValue}`)),a.toggleFocusLegend(o,!0),s.focusedTargetIds=new Set(o),o.forEach(c=>s.defocusedTargetIds.delete(c)),(r=(n=a.customTypeHooks)==null?void 0:n.afterFocus)==null||r.call(n,a)},defocus(t){var e,n,r;const a=this.internal,{state:s}=a,o=a.mapToTargetIds(t);if(s.isCanvasMode){const c=o.filter(a.isTargetToShow,a);a.toggleFocusLegend(c,!1),c.forEach(u=>s.focusedTargetIds.delete(u)),s.defocusedTargetIds=new Set(c),(e=a.renderCanvasFrame)==null||e.call(a,void 0,null,!1);return}a.$el.svg.selectAll(a.selectorTargets(o.filter(a.isTargetToShow,a))).classed(Ke.focused,!1).classed(Ke.defocused,!0),a.hasArcType(null,["polar"])&&(a.unexpandArc(o),a.hasType("gauge")&&a.undoMarkOverlapped(a,`.${er.gaugeValue}`)),a.toggleFocusLegend(o,!1),o.forEach(c=>s.focusedTargetIds.delete(c)),s.defocusedTargetIds=new Set(o),(r=(n=a.customTypeHooks)==null?void 0:n.afterFocus)==null||r.call(n,a)},revert(t){var e,n,r,a,s;const o=this.internal,{config:l,state:c,$el:u}=o,f=o.mapToTargetIds(t),d=()=>{l.legend_show&&(o.showLegend(f.filter(o.isLegendToShow.bind(o))),u.legend.selectAll(o.selectorLegends(f)).filter(function(){return Zt(this).classed(Ke.legendItemFocused)}).classed(Ke.legendItemFocused,!1))};if(c.isCanvasMode){const v=!!((e=c.focusedTargetIds)!=null&&e.size)||!!((n=c.defocusedTargetIds)!=null&&n.size);d(),c.focusedTargetIds=new Set,c.defocusedTargetIds=new Set,v&&((r=o.renderCanvasFrame)==null||r.call(o,void 0,null,!1));return}u.svg.selectAll(o.selectorTargets(f)).classed(Ke.focused,!1).classed(Ke.defocused,!1),o.hasArcType(null,["polar"])&&o.unexpandArc(f),d(),c.focusedTargetIds=new Set,c.defocusedTargetIds=new Set,(s=(a=o.customTypeHooks)==null?void 0:a.afterFocus)==null||s.call(a,o)}},$O={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},BO={load(t){const e=this.internal,{config:n}=e;e.state.dirty.data=!0,e.state._eventRectFingerprint=null,t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(s=>{n.data_classes[s]=t.classes[s]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(s=>{n.data_axes[s]=t.axes[s]}),"colors"in t&&Object.keys(t.colors).forEach(s=>{n.data_colors[s]=t.colors[s]}),"regions"in t&&(n.data_regions=t.regions||{});const r=["data","columns","rows","json","url"].some(s=>s in t),a="unload"in t&&t.unload!==!1;if("regions"in t&&!r&&!a){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),Jo.call(e,t.done,t.resizeAfter);return}if(a){const s=e.mapToTargetIds(t.unload===!0?null:t.unload);e.unload(s,()=>{!e.config||!e.cache||(e.cache.remove(s),Kt(()=>e.loadFromArgs(t)))})}else e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};tt(n)&&this.tooltip.hide(),q(n)?n={ids:n}:$(n)&&(n={ids:[n]});const r=e.mapToTargetIds(n.ids);e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.unload(r,()=>{!e.config||!e.cache||(e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(r),Jo.call(e,n.done,n.resizeAfter))})}};function pl(t,e,n,r=!1){var a;const s=this.internal,o=s.mapToTargetIds(e),l=new Set(o),c=[...s.state.hiddenTargetIds].filter(d=>l.has(d));if(s.state.toggling=!0,s.state.dirty.visibility=!0,s[`${t?"remove":"add"}HiddenTargetIds`](o),s.state.isCanvasMode){t&&c.length?se(s.config.data_onshown,this,c):!t&&c.length===0&&se((a=s.config)==null?void 0:a.data_onhidden,this,o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1;return}const u=s.$el.svg.selectAll(s.selectorTargets(o)),f=t?null:"0";t&&c.length&&(u.style("display",null),se(s.config.data_onshown,this,c)),s.$T(u).style("opacity",f,"important").call(Ue,()=>{var d;!t&&c.length===0&&(u.style("display","none"),se((d=s.config)==null?void 0:d.data_onhidden,this,o)),u.style("opacity",f)}),n.withLegend&&s[`${t?"show":"hide"}Legend`](o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1}var kO={show(t,e={}){pl.call(this,!0,t,e)},hide(t,e={}){pl.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,r={show:[],hide:[]};n.mapToTargetIds(t).forEach(a=>r[n.isTargetToShow(a)?"hide":"show"].push(a)),r.show.length&&r.hide.length?(pl.call(this,!0,r.show,e,!0),pl.call(this,!1,r.hide,e)):(r.show.length&&this.show(r.show,e),r.hide.length&&this.hide(r.hide,e))}},zO=Object.defineProperty,UO=Object.defineProperties,WO=Object.getOwnPropertyDescriptors,hm=Object.getOwnPropertySymbols,GO=Object.prototype.hasOwnProperty,HO=Object.prototype.propertyIsEnumerable,gm=(t,e,n)=>e in t?zO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XO=(t,e)=>{for(var n in e||(e={}))GO.call(e,n)&&gm(t,n,e[n]);if(hm)for(var n of hm(e))HO.call(e,n)&&gm(t,n,e[n]);return t},VO=(t,e)=>UO(t,WO(e)),jO={tooltip:{show:function(t){var e,n,r,a,s,o,l,c,u,f,d,h,v,b,x,E,w,N,k,B,G,V;const Z=this.internal,{$el:Y,config:et,state:{customType:it,eventReceiver:at,hasTreemap:ot,inputType:st,isCanvasMode:_}}=Z;let lt,nt;if(it&&!_&&!t.data){const dt=(n=(e=Z.customTypeHooks)==null?void 0:e.tooltipTarget)==null?void 0:n.call(e,Z,t).data[0];dt&&(t=VO(XO({},t),{data:{id:dt.id},index:(r=t.index)!=null?r:dt.index}))}if(t.mouse&&(nt=t.mouse),t.data){const{data:dt}=t,bt=(a=Z.getYScaleById(dt.id))==null?void 0:a(dt.value);if((it||ot)&&dt.id){if(!_){const At=`.${nn.shape}`,Et=(u=(s=t.index)!=null?s:dt.index)!=null?u:H(t.x)?(c=(l=(o=Z.customTypeHooks)==null?void 0:o.tooltipTarget)==null?void 0:l.call(o,Z,t).data[0])==null?void 0:c.index:void 0,Rt=H(Et)?Y.main.select(Z.selectorTarget(dt.id,void 0,`${At}${At}-${Et}`)):null;at.rect=Rt!=null&&Rt.node()?Rt:Y.main.select(Z.selectorTarget(dt.id,void 0,At))}}else Z.isMultipleX()?nt=[Z.xx(dt),bt]:(et.tooltip_grouped||(nt=[0,bt]),lt=(d=dt.index)!=null?d:Z.hasArcType()&&dt.id?(f=Z.getArcElementByIdOrIndex(dt.id))==null?void 0:f.datum().index:Z.getIndexByX(dt.x))}else H(t.x)?lt=Z.getIndexByX(t.x):H(t.index)&&(lt=t.index);if(Z.state.isCanvasMode){const dt=((h=Z.filterTargetsToShow)==null?void 0:h.call(Z))||Z.data.targets,bt=it?(b=(v=Z.customTypeHooks)==null?void 0:v.tooltipTarget)==null?void 0:b.call(v,Z,t):null,At=bt?bt.data:(x=t.data)!=null&&x.id&&!et.tooltip_grouped?dt.filter(re=>re.id===t.data.id).map(re=>re.values[lt!=null?lt:t.data.index]).filter(Boolean):dt.map(re=>re.values[lt]).filter(Boolean),Et=(w=(E=Y.canvas)==null?void 0:E.node)==null?void 0:w.call(E),Rt=Z.state.canvasShape||((N=Z.getDrawShape)==null?void 0:N.call(Z)),Vt=At[0],ae=nt||(bt?bt.point:Vt&&((k=Rt==null?void 0:Rt.pos)!=null&&k.cx)&&((B=Rt==null?void 0:Rt.pos)!=null&&B.cy)?[Z.state.margin.left+Rt.pos.cx(Vt),Z.state.margin.top+Rt.pos.cy(Vt)]:void 0);if(!At.length||!Et)return;if(bt&&ae){const re=Et.getBoundingClientRect();Z.state.event={clientX:re.left+ae[0],clientY:re.top+ae[1]}}Z.state.canvasFocusKey=At.map(re=>`${re.id}:${re.index}`).join("|"),(G=Z.renderCanvasFocus)==null||G.call(Z,At,ae),(V=Z.showTooltip)==null||V.call(Z,At,Et);return}(st==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(dt=>{Z.dispatchEvent(dt,lt,nt)})},hide:function(){var t,e,n,r,a;const s=this.internal,{state:{inputType:o,isCanvasMode:l},$el:{tooltip:c}}=s,u=c==null?void 0:c.datum();if(l){s.state.canvasFocusKey=null,s.hideTooltip(!0),(t=s.clearCanvasFocus)==null||t.call(s);return}if((e=u==null?void 0:u.data)!=null&&e[0]){const{index:f}=u.data[0];(o==="mouse"?["mouseout"]:["touchend"]).forEach(d=>{s.dispatchEvent(d,f)})}o==="touch"&&s.callOverOutForTouch(),s.hideTooltip(!0),(n=s.hideGridFocus)==null||n.call(s),(r=s.unexpandCircles)==null||r.call(s),(a=s.expandBarTypeShapes)==null||a.call(s,!1)}}},YO=Object.defineProperty,KO=(t,e,n)=>e in t?YO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vm=(t,e,n)=>KO(t,typeof e!="symbol"?e+"":e,n);class Gn{constructor(e){vm(this,"plugins",[]),vm(this,"internal");const n=new dn(this);this.internal=n,(function r(a,s,o){Object.keys(a).forEach(l=>{const c=M(a[l]),u=s!==o,f=J(a[l]),d=f&&Object.keys(a[l]).length>0;c&&(!u&&d||u)?s[l]=a[l].bind(o):f&&!c?s[l]={}:s[l]=a[l],d&&r(a[l],s[l],o)})})(Gn.prototype,this,this),MO.call(n,e),n.beforeInit(),n.init()}}Ve(Gn.prototype,[LO,DO,FO,NO,$O,BO,kO,jO]);let pm=()=>(Gn.prototype.category=fm.category,Gn.prototype.categories=fm.categories,(pm=()=>({}))());var ZO=Object.defineProperty,mm=Object.getOwnPropertySymbols,JO=Object.prototype.hasOwnProperty,QO=Object.prototype.propertyIsEnumerable,ym=(t,e,n)=>e in t?ZO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ml=(t,e)=>{for(var n in e||(e={}))JO.call(e,n)&&ym(t,n,e[n]);if(mm)for(var n of mm(e))QO.call(e,n)&&ym(t,n,e[n]);return t};function ja(t,e){const n=dn.prototype,r=n.customTypes||(n.customTypes={});r[t]=ml(ml({},r[t]),e)}function xm(t,e){const n=dn.prototype,r=n.axisTypes||(n.axisTypes={});r[t]=ml(ml({},r[t]),e)}const _O=t=>{var e,n;return(n=(e=yt).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(r,a)=>String.fromCharCode(+`0x${a}`)))};function qO(t,e,n){const{width:r,height:a}=e||n,s=new XMLSerializer,o=t.cloneNode(!0),l=MC(Rn(Tt.styleSheets)).filter(h=>h.cssText).map(h=>h.cssText);o.setAttribute("xmlns",bi.xhtml),o.style.margin="0",o.style.padding="0",e.preserveFontStyle&&o.querySelectorAll("text").forEach(h=>{h.innerHTML=""});const c=s.serializeToString(o),u=Tt.createElement("style");u.appendChild(Tt.createTextNode(l.join(`
|
|
52
|
+
`)));const f=s.serializeToString(u),d=`<svg xmlns="${bi.svg}" width="${r}" height="${a}"
|
|
53
53
|
viewBox="0 0 ${n.width} ${n.height}"
|
|
54
54
|
preserveAspectRatio="${(e==null?void 0:e.preserveAspectRatio)===!1?"none":"xMinYMid meet"}">
|
|
55
55
|
<foreignObject width="100%" height="100%">
|
|
56
56
|
${f}
|
|
57
57
|
${c.replace(/(url\()[^#]+/g,"$1")}
|
|
58
|
-
</foreignObject></svg>`;return`data:image/svg+xml;base64,${aC(d)}`}function sC(t,e){const{top:n,left:r}=e,{x:i,y:s}=ha(t,!0),{a:o,b:l,c,d:u,e:f,f:d}=t.getScreenCTM(),{width:h,height:m}=ln(t,!0);return{x:o*i+c*s+f-r,y:l*i+u*s+d-n+(m-Math.round(m/4)),width:h,height:m}}function oC(t){const{left:e,top:n}=ln(t),r=s=>s.textContent||s.childElementCount,i=[];return Oa(t.querySelectorAll("text")).filter(r).forEach(s=>{const o=l=>{const{fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}=se.getComputedStyle(l),{x:m,y:S,width:E,height:C}=sC(l,{left:e,top:n});return{[l.textContent]:{x:m,y:S,width:E,height:C,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};s.childElementCount>1?Oa(s.querySelectorAll("tspan")).filter(r).forEach(l=>{i.push(o(l))}):i.push(o(s))}),i}function lC(t,e){e.forEach(n=>{Object.keys(n).forEach(r=>{const{x:i,y:s,width:o,height:l,fill:c,fontFamily:u,fontSize:f,transform:d}=n[r];if(t.save(),t.font=`${f} ${u}`,t.fillStyle=c,d==="none")t.fillText(r,i,s);else{const h=d.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(m=>+m==0)?(h.push(i+o-o/4),h.push(s-l+l/3)):(h.push(i),h.push(s)),t.transform(...h),t.fillText(r,0,0)}t.restore()})})}function cC(t,e,n){const{width:r,height:i}=e||n,s=Ye.createElement("canvas"),o=s.getContext("2d");if(s.width=r,s.height=i,o){let c=0,u=r,f=i;if((e==null?void 0:e.preserveAspectRatio)!==!1){const d=Math.min(r/n.width,i/n.height);u=n.width*d,f=n.height*d,c=(i-f)/2}o.drawImage(t,0,0,t.width,t.height,0,c,u,f)}return s.toDataURL(e.mimeType)}var uC={export(t,e){var n;const r=this.internal,{state:i,$el:{chart:s,svg:o}}=r,l=(n=r.canvasEngine)==null?void 0:n.canvas,c=i.isCanvasMode&&l?ln(l,!0):null,{width:u,height:f}=c&&c.width&&c.height?{width:c.width,height:c.height}:i.current,d=Xr(Object.create(null),{width:u,height:f,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t);if(i.isCanvasMode&&l){const S=cC(l,d,{width:u,height:f});return e==null||e.bind(this)(S),S}const h=iC(s.node(),d,{width:u,height:f}),m=d.preserveFontStyle?oC(o.node()):[];if(e&&ie(e)){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{const E=Ye.createElement("canvas"),C=E.getContext("2d");E.width=d.width||u,E.height=d.height||f,C.drawImage(S,0,0),m.length&&(lC(C,m),m.length=0),e.bind(this)(E.toDataURL(d.mimeType))},S.src=h}return h}};let mg=()=>(jn.prototype.export=uC.export,(mg=()=>({}))());var fC={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,i=>{n=i,r()});function r(){var i,s,o;let l,c=0,u=0,f,d;if(e.state.redrawing||!n||!os())return;(i=e.flushCanvasFlow)==null||i.call(e);const h=[],m=e.getMaxDataCount(),S=e.convertDataToTargets(n,!0),E=e.axis.isTimeSeries();e.data.targets.forEach($=>{let z=!1;for(let B=0;B<S.length;B++)if($.id===S[B].id){z=!0,$.values[$.values.length-1]&&(u=$.values[$.values.length-1].index+1);const W=S[B].values;c=W.length;for(let H=0;H<c;H++)W[H].index=u+H,E||(W[H].x=u+H),$.values.push(W[H]);S.splice(B,1);break}!z&&h.push($.id)}),e.data.targets.forEach($=>{for(let z=0;z<h.length;z++)if($.id===h[z]){if(!$.values[$.values.length-1])continue;u=$.values[$.values.length-1].index+1;for(let B=0;B<c;B++)$.values.push({id:$.id,index:u+B,x:E?e.getOtherTargetX(u+B):u+B,value:null})}}),e.data.targets.length&&S.forEach($=>{const z=e.data.targets[0].values[0].index,B=$.values,W=B.length,H=Math.max(u-z,0);if(H){B.length=W+H;for(let Q=W-1;Q>=0;Q--)B[Q+H]=B[Q];for(let Q=0;Q<H;Q++){const q=z+Q;B[Q]={id:$.id,index:q,x:E?e.getOtherTargetX(q):q,value:null}}}for(let Q=H;Q<B.length;Q++){const q=B[Q];q.index+=u,E||(q.x+=u)}});for(let $=0;$<S.length;$++)e.data.targets.push(S[$]);const C=e.data.targets[0],w=C.values[0];if(sn(t.to)?(c=0,d=E?Wn.call(e,t.to):t.to,C.values.forEach($=>{$.x<d&&c++})):sn(t.length)&&(c=t.length),m?m===1&&E&&(f=(C.values[C.values.length-1].x-w.x)/2,l=[new Date(+w.x-f),new Date(+w.x+f)]):(E?f=C.values.length>1?C.values[C.values.length-1].x-w.x:w.x-e.getXDomain(e.data.targets)[0]:f=1,l=[w.x-f,w.x]),l&&e.updateXDomain(null,!0,!0,!1,l),e.state.isCanvasMode){const $=Ge(t.duration)?t.duration:e.config.transition_duration;if((s=e.animateCanvasFlow)==null?void 0:s.call(e,{done:t.done,duration:$,length:c,orgDataCount:m}))return;c&&m&&e.data.targets.forEach(B=>{B.values.splice(0,c)}),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),e.updateTypesElements(),(o=t.done)==null||o.call(e.api);return}e.updateTargets(e.data.targets),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({flow:{index:w.index,length:c,duration:Ge(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:m},withLegend:!0,withTransition:m>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},dC={generateFlow(t){const e=this,{data:n,state:r,$el:i}=e;return function(){var s;const o=t.flow.length;r.flowing=!0,n.targets.forEach(c=>{c.values.splice(0,o)}),r.dataGeneration++,e.updateXGrid&&e.updateXGrid(!0);const l={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(c=>{const u=c.split(".");let f=i[u[0]];f&&u.length>1&&(f=f[u[1]]),f!=null&&f.size()&&(l[c]=f)}),(s=e.hideGridFocus)==null||s.call(e),e.setFlowList(l,t)}},setFlowList(t,e){const n=this,{flow:r,targets:i}=e,{duration:s=e.duration,index:o,length:l,orgDataCount:c}=r,u=n.getFlowTransform(i,c,o,l),f=Mh();let d;f.add(Object.keys(t).map(h=>(d=t[h].transition().ease(m=>+m).duration(s),h==="axis.x"?d=d.call(m=>{n.axis.x.setTransition(m).create(m)}):h==="region.list"?d=d.filter(n.isRegionOnX).attr("transform",u):d=d.attr("transform",u),d))),d.call(f,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){const n=this,{config:r,state:i,$el:{svg:s}}=n,o=r.axis_rotated,{flow:l,shape:c,xv:u}=e,{cx:f,cy:d,xForText:h,yForText:m}=c.pos,{done:S=()=>{},length:E}=l;E&&(["circle","text","shape","eventRect"].forEach(C=>{const w=[];for(let $=0;$<E;$++)w.push(`.${Re[C]}-${$}`);s.selectAll(`.${Re[`${C}s`]}`).selectAll(w).remove()}),s.select(`.${Re.xgrid}`).remove()),Object.keys(t).forEach(C=>{const w=t[C];if(C!=="axis.x"&&w.attr("transform",null),C==="grid.x")w.attr(i.xgridAttr);else if(C==="gridLines.x")w.attr("x1",o?0:u).attr("x2",o?i.width:u),w.select("text").attr("x",o?i.width:0).attr("y",u);else if(/^(area|bar|line)$/.test(C))w.attr("d",c.type[C]);else if(C==="text")w.attr("x",h).attr("y",m).style("fill-opacity",n.opacityForText.bind(n));else if(C==="circle")if(n.isCirclePoint())w.attr("cx",f).attr("cy",d);else{const $=B=>f(B)-r.point_r,z=B=>d(B)-r.point_r;w.attr("x",$).attr("y",z)}else C==="region.list"&&w.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),r.interaction_enabled&&n.redrawEventRect(),S.call(n.api),i.flowing=!1},getFlowTransform(t,e,n,r){const i=this,{data:s,scale:{x:o}}=i,l=s.targets[0].values;let c=i.getValueOnIndex(l,n),u=i.getValueOnIndex(l,n+r),f;const d=o.domain(),h=i.updateXDomain(t,!0,!0);e?e===1||(c==null?void 0:c.x)===(u==null?void 0:u.x)?f=o(d[0])-o(h[0]):f=i.axis.isTimeSeries()?o(d[0])-o(h[0]):o((c==null?void 0:c.x)||0)-o(u.x):l.length!==1?f=o(d[0])-o(h[0]):i.axis.isTimeSeries()?(c=i.getValueOnIndex(l,0),u=i.getValueOnIndex(l,l.length-1),f=o(c.x)-o(u.x)):f=wa(h)/2;const m=wa(d)/wa(h);return`translate(${f},0) scale(${m},1)`}};let xg=()=>(xn(Sr.prototype,dC),jn.prototype.flow=fC.flow,(xg=()=>({}))());function yg(t){return Array.isArray(t)?t:[t]}function Tg(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function hu(t,e){const n=this.internal,{config:r}=n,i=r.transition_duration&&os(),s=`grid_${e}_lines`;return t?(r[s]=yg(t),n.state.isCanvasMode?(Tg(n),r[s]):(n.updateGrid(),n.redrawGrid(i),r[s])):r[s]}function bg(t,e){const n=`grid_${e}_lines`;return hu.bind(this)(this.internal.config[n].concat(t?yg(t):[]),e)}function Sg(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){const i=((n=r.getGridFilterToRemove)==null?void 0:n.call(r,t))||(()=>!0),s=`grid_${e?"x":"y"}_lines`;r.config[s]=r.config[s].filter(o=>!i(o)),Tg(r);return}r.removeGridLines(t,e)}const Ag=function(t){return hu.bind(this)(t,"x")};xn(Ag,{add(t){return bg.bind(this)(t,"x")},remove(t){return Sg.bind(this)(t,!0)}});const Eg=function(t){return hu.bind(this)(t,"y")};xn(Eg,{add(t){return bg.bind(this)(t,"y")},remove(t){return Sg.bind(this)(t,!1)}});var Cg={xgrids:Ag,ygrids:Eg};const hC=`line.${nn.xgridFocus}:not(.${nn.xgridFocusContinuous}), line.${nn.ygridFocus}`,vC=t=>Ge(t.position)||"end",gC=t=>t.position==="start"?4:t.position==="middle"?0:-4;function Ig(t){var e;const{state:n,$el:{main:r}}=t,i=n._gridFocusEl,s=r.node(),o=((e=i==null?void 0:i.nodes)==null?void 0:e.call(i))||[];return o.length&&o.every(l=>s==null?void 0:s.contains(l))?i:n._gridFocusEl=r.selectAll(hC)}function Rg(t){t.$el.main.select(`line.${nn.xgridFocusContinuous}`).style("visibility","hidden")}function wg(t,e,n){return r=>{let i=t?0:e;return r.position==="start"?i=t?-n:0:r.position==="middle"&&(i=(t?-n:e)/2),i}}function Og(t,e){e==="grid"&&t.each(function(){const n=Yt(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var pC={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:r}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g",`.${ze.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${yn.grid} ${yn.gridLines}`),r.gridLines.main.append("g").attr("class",yn.xgridLines),r.gridLines.main.append("g").attr("class",yn.ygridLines),r.gridLines.x=Ev([]))},updateXGrid(t){const e=this,{config:n,scale:r,state:i,$el:{main:s,grid:o}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),u=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=d=>(r.zoom||r.x)(d)+u*(l?-1:1);i.xgridAttr=l?{x1:0,x2:i.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:i.height},o.x=s.select(`.${yn.xgrids}`).selectAll(`.${yn.xgrid}`).data(c),o.x.exit().remove(),o.x=o.x.enter().append("line").attr("class",yn.xgrid).merge(o.x),t||o.x.each(function(){const d=Yt(this);Object.keys(i.xgridAttr).forEach(h=>{d.attr(h,i.xgridAttr[h])}),d.style("opacity",()=>+d.attr(l?"y1":"x1")===(l?i.height:0)?"0":null)})},updateYGrid(){const t=this,{axis:e,config:n,scale:r,state:i,$el:{grid:s,main:o}}=t,l=n.axis_rotated,c=d=>r.y(d),u=e.y.getGeneratedTicks(n.grid_y_ticks),f=u!=null&&u.length?u:t.scale.y.ticks(n.grid_y_ticks);s.y=o.select(`.${yn.ygrids}`).selectAll(`.${yn.ygrid}`).data(f),s.y.exit().remove(),s.y=s.y.enter().append("line").attr("class",yn.ygrid).merge(s.y),s.y.attr("x1",l?c:0).attr("x2",l?c:i.width).attr("y1",l?0:c).attr("y2",l?i.height:c),Og(s.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:r,main:i},$T:s}=e,o=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=i.select(`.${yn[`${t}gridLines`]}`).selectAll(`.${yn[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);s(c.exit()).style("opacity","0").remove();const u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(f){const d=Yt(this);d.select("text").empty()&&f.text&&d.append("text").style("opacity","0")}),s(c.attr("class",f=>`${yn[`${t}gridLine`]} ${f.class||""}`.trim()).select("text").attr("text-anchor",vC).attr("transform",()=>l?o?null:"rotate(-90)":o?"rotate(-90)":null).attr("dx",gC).attr("dy",-5)).text(function(f){var d;return(d=f.text)!=null?d:this.remove()}),r[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:r,height:i},$el:{gridLines:s},$T:o}=e,l=e.xv.bind(e),c=e.yv.bind(e);let u=s.x.select("line"),f=s.x.select("text"),d=s.y.select("line"),h=s.y.select("text");return u=o(u,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:i),f=o(f,t).attr("x",wg(!n,r,i)).attr("y",l),d=o(d,t).attr("x1",n?c:0).attr("x2",n?c:r).attr("y1",n?0:c).attr("y2",n?i:c),h=o(h,t).attr("x",wg(n,r,i)).attr("y",c),[u.style("opacity",null),f.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:n,state:{clip:r},$el:i}=t;n._gridFocusEl=null;const s=e.grid_front,o=`.${s&&i.gridLines.main?yn.gridLines:ze.chart}${s?" + *":""}`,l=i.main.insert("g",o).attr("clip-path",r.pathGrid).attr("class",yn.grid);if(i.grid.main=l,e.grid_x_show&&l.append("g").attr("class",yn.xgrids),e.grid_y_show&&l.append("g").attr("class",yn.ygrids),e.axis_tooltip){const c=l.append("g").attr("class","bb-axis-tooltip");c.append("line").attr("class","bb-axis-tooltip-x"),c.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(l.append("g").attr("class",nn.xgridFocus).append("line").attr("class",nn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",nn.ygridFocus).append("line").attr("class",nn.ygridFocus),e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&i.main.insert("g",o).attr("class",nn.xgridFocusContinuous).append("line").attr("class",`${nn.xgridFocus} ${nn.xgridFocusContinuous}`).style("visibility","hidden"))},showAxisGridFocus(){var t,e;const n=this,{config:r,format:i,state:{event:s,width:o,height:l}}=n,c=r.axis_rotated,[u,f]=Jn(s,(t=n.$el.eventRect)==null?void 0:t.node()),d={x:u,y:f};for(const[h,m]of Object.entries(n.$el.axisTooltip)){const S=h==="x"&&!c||h!=="x"&&c?"x":"y",E=d[S];let C=(e=n.scale[h])==null?void 0:e.invert(E);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(S,E).text(C))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,m){const S=Yt(this);m===0?S.attr("x1",u).attr("x2",u).attr("y1",m?0:l).attr("y2",m?l:0):S.attr("x1",m?0:o).attr("x2",m?o:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll(`line.${Rn.axisTooltipX}, line.${Rn.axisTooltipY}`).style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:r,state:{width:i,height:s}}=n,o=r.axis_rotated,l=Ig(n),c=(t||[l.datum()]).filter(d=>d&&Ge(n.getBaseValue(d)));if(!r.tooltip_show||c.length===0||!r.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const u=r.grid_focus_edge&&!r.tooltip_grouped,f=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(d){const h=Yt(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let S;if(h.classed(nn.xgridFocus))S=o?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,s];else{const E=n.axis.getId(d.id)==="y2";S=o?[m.y,u&&!E?m.x:null,m.y,u&&E?m.x:s]:[u&&E?m.x:null,m.y,u&&!E?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((E,C)=>h.attr(E,S[C]))}),Og(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(t=!1){var e;const n=this,{state:{inputType:r,resizing:i}}=n;(t||r==="mouse"||!i)&&(Ig(n).style("visibility","hidden"),Rg(n),(e=n.hideCircleFocus)==null||e.call(n))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:r,height:i,resizing:s},$el:{grid:o}}=e,l=o.main.select(`line.${nn.xgridFocus}`);if(n==="touch")l.empty()?s&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?r:-10).attr("y1",c?-10:0).attr("y2",c?-10:i),Rg(e)}return!0},generateGridData(t,e){const n=this,r=n.$el.main.select(`.${Rn.axisX}`).selectAll(".tick").size();let i=[];if(t==="year"){const s=n.getXDomain(n.data.targets),[o,l]=s.map(c=>c.getFullYear());for(let c=o;c<=l;c++)i.push(new Date(`${c}-01-01 00:00:00`))}else i=e.ticks(Bt),i.length>r&&(i=i.filter(s=>String(s).indexOf(".")<0));return i},getGridFilterToRemove(t){return t?e=>{let n=!1;return(qe(t)?t.concat():[t]).forEach(r=>{("value"in r&&e.value===r.value||"class"in r&&e.class===r.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:r,$T:i}=n,s=n.getGridFilterToRemove(t),o=f=>!s(f),l=e?yn.xgridLines:yn.ygridLines,c=e?yn.xgridLine:yn.ygridLine;i(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(s)).style("opacity","0").remove();const u=`grid_${e?"x":"y"}_lines`;r[u]=r[u].filter(o)}},mC={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0};let Pg=()=>(xn(Sr.prototype,pC),jn.prototype.xgrids=Cg.xgrids,jn.prototype.ygrids=Cg.ygrids,$a.setOptions([mC]),(Pg=()=>({}))());function Mg(t,e,n,r){const i=this,{config:s,$el:{main:o}}=i,l=s.data_selection_grouped,c=s.data_selection_isselectable.bind(i.api),u=sn(e)?[].concat(e):null,f=t&&!s.data_selection_multiple;let d=!f;const h=(m,S,E)=>{i.unselectPoint(m,S,E),m.interrupt().remove()};i.getTargetsToShow().forEach(m=>{const{id:S}=m,E=l||!u||u.indexOf(S)>=0,C=o.select(`.${on.selectedCircles}${i.getTargetSelectorSuffix(S)}`);m.values.forEach(w=>{const{index:$}=w,z=!n||n.indexOf($)>=0,B=C.selectAll(`.${on.selectedCircle}-${$}`),W=!B.empty();t?E&&z&&c(w)&&(!W||f)?(d||(Mg.call(i,!1),d=!0),i.selectPoint(null,w,$)):(!f||d)&&sn(r)&&r&&W&&h(B,w,$):E&&z&&W&&h(B,w,$)})})}function vu(t=!1,e,n,r){var i;const s=this,{config:o,$el:{main:l}}=s,c=o.data_selection_grouped,u=o.data_selection_isselectable.bind(s.api),f=t&&!o.data_selection_multiple;let d=!f;if(o.data_selection_enabled){if(f&&(n=n!=null&&n.length?[n[0]]:[0],c||(e=(sn(e)?[].concat(e):s.getTargetsToShow().map(m=>m.id)).slice(0,1))),(i=s.isPointFocusOnly)!=null&&i.call(s)){Mg.call(s,t,e,n,r);return}l.selectAll(`.${Tn.shapes}`).selectAll(`.${Tn.shape}`).each(function(h){const m=Yt(this),{id:S,index:E}=h.data?h.data:h,C=c||!e||e.indexOf(S)>=0,w=!n||n.indexOf(E)>=0;if(m.classed(Lr.line)||m.classed(To.area))return;const $=s.getToggle(this,h).bind(s),z=m.classed(on.SELECTED);t?C&&w&&u(h)&&(!z||f)?(d||(vu.call(s,!1),d=!0),!m.classed(on.SELECTED)&&$(!0,m.classed(on.SELECTED,!0),h,E)):(!f||d)&&sn(r)&&r&&z&&$(!1,m.classed(on.SELECTED,!1),h,E):C&&w&&u(h)&&z&&$(!1,m.classed(on.SELECTED,!1),h,E)})}}var xC={selected(t){var e,n;const r=this.internal,i=[];return r.state.isCanvasMode?((e=r.getCanvasSelectedData)==null?void 0:e.call(r,t))||i:(n=r.isPointFocusOnly)!=null&&n.call(r)?(r.$el.main.selectAll(`.${on.selectedCircles+r.getTargetSelectorSuffix(t)}`).selectAll(`.${on.selectedCircle}`).each(s=>i.push(s)),i):(r.$el.main.selectAll(`.${Tn.shapes+r.getTargetSelectorSuffix(t)}`).selectAll(`.${Tn.shape}`).filter(function(){return Yt(this).classed(on.SELECTED)}).each(s=>i.push(s)),i)},select(t,e,n){var r;const i=this.internal;if(i.state.isCanvasMode){(r=i.setCanvasSelection)==null||r.call(i,!0,t,e,n);return}vu.bind(i)(!0,t,e,n)},unselect(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){(n=r.setCanvasSelection)==null||n.call(r,!1,t,e);return}vu.bind(r)(!1,t,e)}},yC={drag(t){const e=this,{config:n,state:r,$el:{main:i}}=e,s=n.data_selection_grouped,o=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=r.dragStart||[0,0],[u,f]=t,d=Math.min(l,u),h=Math.max(l,u),m=s?r.margin.top:Math.min(c,f),S=s?r.height:Math.max(c,f),E=()=>{!e||!e.$el||!e.$el.main||(i.select(`.${Na.dragarea}`).attr("x",d).attr("y",m).attr("width",h-d).attr("height",S-m),i.selectAll(`.${Tn.shapes}`).selectAll(`.${Tn.shape}`).filter(C=>o==null?void 0:o.bind(e.api)(C)).each(function(C,w){const $=Yt(this),z=$.classed(on.SELECTED),B=$.classed(Na.INCLUDED);let W,H;if($.classed($n.circle)){const Q=+$.attr("cx"),q=+$.attr("cy");H=e.togglePoint,W=d<Q&&Q<h&&m<q&&q<S}else if($.classed(rr.bar)){const{x:Q,y:q,width:st,height:it}=wh(this);H=e.togglePath,W=!(h<Q||Q+st<d)&&!(S<q||q+it<m)}else return;W^B&&($.classed(Na.INCLUDED,!B),$.classed(on.SELECTED,!z),H.call(e,!z,$,C,w))}))};Ph(e.state,E)},dragstart(t){const e=this,{config:n,state:r,$el:{main:i}}=e;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,i.select(`.${ze.chart}`).append("rect").attr("class",Na.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend(){const t=this,{config:e,$el:{main:n},$T:r}=t;t.hasArcType()||!e.data_selection_enabled||(r(n.select(`.${Na.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${Tn.shape}`).classed(Na.INCLUDED,!1),t.setDragStatus(!1))}},TC=Object.defineProperty,bC=Object.defineProperties,SC=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,AC=Object.prototype.hasOwnProperty,EC=Object.prototype.propertyIsEnumerable,Dg=(t,e,n)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CC=(t,e)=>{for(var n in e||(e={}))AC.call(e,n)&&Dg(t,n,e[n]);if(Lg)for(var n of Lg(e))EC.call(e,n)&&Dg(t,n,e[n]);return t},IC=(t,e)=>bC(t,SC(e)),RC=IC(CC({},yC),{selectPoint(t,e,n){const r=this,{config:i,$el:{main:s},$T:o}=r,l=i.axis_rotated,c=(l?r.circleY:r.circleX).bind(r),u=(l?r.circleX:r.circleY).bind(r),f=r.pointSelectR.bind(r);Ne(i.data_onselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${on.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${on.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>r.generateClass(on.selectedCircle,n)).attr("cx",c).attr("cy",u).attr("stroke",r.color).attr("r",d=>r.pointSelectR(d)*1.4)).attr("r",f)},unselectPoint(t,e,n){const r=this,{config:i,$el:{main:s},$T:o}=r;Ne(i.data_onunselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${on.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${on.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,r){this[`${t?"":"un"}selectPoint`](e,n,r)},selectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,r){this[`${t?"":"un"}selectPath`](e,n,r)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var r;const i=this,{config:s,$el:{main:o}}=i;if(s.data_selection_enabled&&s.data_selection_isselectable.bind(i.api)(e)){const l=Yt(t),c=l.classed(on.SELECTED),u=i.getToggle(t,e).bind(i);let f;if(!s.data_selection_multiple){const d=(r=i.isPointFocusOnly)==null?void 0:r.call(i);let h=`.${d?on.selectedCircles:Tn.shapes}`;s.data_selection_grouped&&(h+=i.getTargetSelectorSuffix(e.id)),o.selectAll(h).selectAll(d?`.${on.selectedCircle}`:`.${Tn.shape}.${on.SELECTED}`).classed(on.SELECTED,!1).each(function(m){const S=Yt(this);f=S,u(!1,S,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(on.SELECTED,!c),u(!c,l,e,n))}}}),wC={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}};let Fg=()=>(xn(Sr.prototype,RC),xn(jn.prototype,xC),$a.setOptions([wC]),(Fg=()=>!0)());const Ng=function(t){var e,n;const r=this.internal,{axis:i,brush:s,config:o,scale:{x:l,subX:c},state:u}=r;let f;return u.isCanvasMode?(o.subchart_show&&(f=t,Array.isArray(f)?(f=i.isTimeSeries()?f.map(d=>Wn.bind(r)(d)):f,f=r.setCanvasSubchartDomain(f)||u.domain):f=(e=u.domain)!=null?e:l.orgDomain()),f):(o.subchart_show&&(f=t,Array.isArray(f)?(i.isTimeSeries()&&(f=f.map(h=>Wn.bind(r)(h))),r.withinRange(f,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))&&(u.domain=f.slice(),s.move(s.getSelection(),f.map(c)))):f=(n=u.domain)!=null?n:l.orgDomain()),f)};xn(Ng,{show(){var t,e,n;const r=this.internal,{$el:{subchart:i},config:s}=r,o=s.subchart_show;if(!o){if(r.state.isCanvasMode){(t=r.unbindZoomEvent)==null||t.call(r),s.subchart_show=!0,this.resize();return}r.unbindZoomEvent(),s.subchart_show=!o,!i.main&&r.initSubchart();let l=i.main.selectAll(`.${ze.target}`);r.data.targets.length!==l.size()&&(r.updateSizes(),r.updateTargetsForSubchart(r.data.targets),l=(e=i.main)==null?void 0:e.selectAll(`.${ze.target}`)),l==null||l.style("opacity",null),(n=i.main)==null||n.style("display",null),this.resize()}},hide(){var t;const e=this.internal,{$el:{subchart:{main:n}},config:r}=e;if(e.state.isCanvasMode){r.subchart_show&&(r.subchart_show=!1,this.resize(),(t=e.bindZoomEvent)==null||t.call(e));return}r.subchart_show&&(n==null?void 0:n.style("display"))!=="none"&&(r.subchart_show=!1,n.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){var t;const e=this.internal,{brush:n}=e;if(e.state.isCanvasMode){(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1);return}n.clear(n.getSelection())}});var OC={subchart:Ng};const $g=["bar","line","bubble","candlestick","scatter"],PC=["opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width"];function Bg(t,e){var n,r;const i=(r=(n=t.$el.grid)==null?void 0:n.main)==null?void 0:r.select(`line.${Re.xgridFocus}`).node();if(!i||!se.getComputedStyle)return;const s=se.getComputedStyle(i);PC.forEach(o=>{const l=s.getPropertyValue(o);l&&e.style(o,l)})}function mi(t,e){const n=Number(t);return Number.isFinite(n)?n:e}function MC(t){var e,n;if(!rc(t))return!1;const{config:r,state:i,$el:s}=t,o=(n=(e=s.grid)==null?void 0:e.main)==null?void 0:n.select(`line.${Re.xgridFocus}:not(.${Re.xgridFocusContinuous})`),l=s.main.select(`line.${Re.xgridFocusContinuous}`);if(!(o!=null&&o.node())||!l.node())return!1;const c=i.margin2.left-i.margin.left+i.width2,u=i.margin2.top-i.margin.top+i.height2;return Bg(t,l),r.axis_rotated?l.attr("x1",mi(o.attr("x1"),0)).attr("x2",c).attr("y1",mi(o.attr("y1"),-10)).attr("y2",mi(o.attr("y2"),-10)):l.attr("x1",mi(o.attr("x1"),-10)).attr("x2",mi(o.attr("x2"),-10)).attr("y1",mi(o.attr("y1"),0)).attr("y2",u),l.style("visibility",null),o.style("visibility","hidden"),!0}function LC(t){var e;(e=t.$el.main)==null||e.select(`line.${Re.xgridFocusContinuous}`).style("visibility","hidden")}function DC(t,e,n){const{config:r,state:i}=t,[s,o]=Jn(e,n),l=Td(t,r.axis_rotated?o:s);return l===null?null:r.axis_rotated?[i.width/2,l]:[l,i.height/2]}function gu(t,e,n,r){var i,s;const o=(s=(i=t.$el.eventRect)==null?void 0:i.node)==null?void 0:s.call(i);if(!o)return;const l=DC(t,n,r)||[0,0],c=ln(o,!0),u=c.left+l[0],f=c.top+l[1],d={bubbles:!0,cancelable:!0,screenX:u,screenY:f,clientX:u,clientY:f};/^touch/.test(e)?wc.touch(o,e,d):wc.mouse(o,e,d)}var FC={isSubchartBrushEnabled(){const{config:t}=this;return t.subchart_show&&t.subchart_brush_enabled!==!1},bindSubchartEventRect(t){const e=this,{config:n,state:r}=e;t.on("mouseover mousemove mouseout touchstart touchmove touchend",null),n.interaction_enabled&&(r.inputType==="mouse"?t.on("mouseover mousemove",function(i){e.isSubchartBrushEnabled()||gu(e,i.type,i,this)}).on("mouseout",function(i){e.isSubchartBrushEnabled()||gu(e,"mouseout",i,this)}):r.inputType==="touch"&&t.on("touchstart touchmove touchend",function(i){var s;e.isSubchartBrushEnabled()||((s=i.touches)==null?void 0:s.length)>1||gu(e,i.type,i,this)}))},initBrush(){const t=this,{config:e,scale:n,$el:{subchart:r},state:i}=t,s=e.axis_rotated,o=e.subchart_size_height;let l,c,u;t.brush=(s?oA():sA()).handleSize(5),t.brush.on("start brush end",f=>{const{selection:d,sourceEvent:h,target:m,type:S}=f;S==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=h?d:null),/(start|brush)/.test(S)&&(S==="brush"&&h&&i.domain&&(c==null||c.forEach((E,C)=>{E!==d[C]&&(i.domain[C]=n.x.orgDomain()[C])})),t.redrawForBrush(S!=="start")),S==="end"&&(l=n.x.orgDomain()),m!=null&&m.handle&&(d===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(E,C)=>{const w=[d[C],o/2];return`translate(${s?w.reverse():w})`}))}),t.brush.updateResize=function(){u&&clearTimeout(u),u=setTimeout(()=>{const f=this.getSelection();l&&vv(f.node())&&this.move(f,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var f;return this.extent()()[1].filter(h=>isNaN(h)).length===0&&((f=r.main)==null||f.select(`.${Re.brush}`).call(this)),this},t.brush.scale=function(f){const d=e.subchart_size_height;let h=t.axis.getExtent();!h&&f.range?h=[[0,0],[f.range()[1],d]]:qe(h)&&(h=h.map((m,S)=>[m,S>0?d:S])),s&&h[1].reverse(),this.extent(h),this.update()},t.brush.getSelection=()=>r.main?r.main.select(`.${Re.brush}`):Yt([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:r},$el:{defs:i,svg:s,subchart:o,axis:l}}=t;if(!r)return;const c=e.subchart_show?null:"hidden",u=`${n.id}-subchart`,f=t.getClipPath(u);n.idSubchart=u,t.appendClip(i,u),t.initBrush(),o.main=s.append("g").classed(Re.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=o;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",Re.chart),t.withSubchartTypeContext(()=>{$g.forEach(m=>{const S=Ln(/^(bubble|scatter)$/.test(m)?"circle":m);if(t.hasType(m)||t.hasTypeOf(S)){const E=d.select(`.${Re.chart}`),C=Re[`chart${S}s`];E.select(`.${C}`).empty()&&E.append("g").attr("class",C)}})});const h=d.append("g").attr("clip-path",f).attr("class",Re.brush).style("pointer-events",t.isSubchartBrushEnabled()?null:"none").call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),o.eventRect=d.append("g").attr("clip-path",f).attr("class",`${Re.eventRects} ${Re.eventRects}-subchart`).style("fill-opacity","0").style("pointer-events",t.isSubchartBrushEnabled()?"none":"all").append("rect").attr("class",`${Re.eventRect} ${Re.eventRect}-subchart`).attr("width",t.state.width2).attr("height",t.state.height2),t.bindSubchartEventRect(o.eventRect),d.append("g").attr("clip-path",f).attr("class",Re.xgridFocus).append("line").attr("class",Re.xgridFocus).style("visibility","hidden"),l.subX=d.append("g").attr("class",Re.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden"),l.subY=d.append("g").attr("class",Re.axisY).attr("transform",t.getTranslate("subY")).style("visibility",e.subchart_axis_y_show?c:"hidden"),l.subY2=d.append("g").attr("class",Re.axisY2).attr("transform",t.getTranslate("subY2")).style("visibility",e.subchart_axis_y2_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,r=n.axis_rotated,i=n.subchart_init_range,s="handle--custom",o=de[r?"y":"x"];e.brush.handle=t.selectAll(`.${s}`).data(r?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",s).attr("cursor",`${r?"ns":"ew"}-resize`).attr("d",l=>o[/[se]/.test(l.type)?"end":"start"]).attr("display",i?null:"none")},updateTargetsForSubchart(t){var e;const n=this,{config:r,state:i,$el:{subchart:{main:s}}}=n;r.subchart_show&&(n.withSubchartTypeContext(()=>{$g.filter(o=>n.hasType(o)||n.hasTypeOf(Ln(o))).forEach(o=>{const l=/^(bubble|scatter)$/.test(o),c=Ln(l?"circle":o),u=n.getChartClass(c,!0),f=n.getClass(l?"circles":`${o}s`,!0),d=s.select(`.${Re[`chart${`${c}s`}`]}`);if(l){const h=d.selectAll(`.${Re.circles}`).data(t.filter(n[`is${Ln(o)}Type`].bind(n))).attr("class",f);h.exit().remove(),h.enter().append("g").attr("class",f)}else{const h=d.selectAll(`.${Re[`chart${c}`]}`).attr("class",u).data(t.filter(n[`is${c}Type`].bind(n))),m=h.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",f);h.exit().remove(),o==="line"&&n.hasTypeOf("Area")&&m.append("g").attr("class",n.getClass("areas",!0))}})}),s.selectAll(`.${Re.brush} rect`).attr(r.axis_rotated?"width":"height",r.axis_rotated?i.width2:i.height2),(e=n.$el.subchart.eventRect)==null||e.attr("width",i.width2).attr("height",i.height2).style("pointer-events",n.isSubchartBrushEnabled()?"none":"all"))},updateSubchartYDomain(t){var e,n;const r=this,{scale:i}=r,s=t||r.filterTargetsToShow(r.data.targets);(e=i.subY)==null||e.domain(r.getYDomain(s,"y")),(n=i.subY2)==null||n.domain(r.getYDomain(s,"y2"))},redrawSubchart(t,e){var n,r,i,s;const o=this,{config:l,$el:{subchart:{main:c}},state:u}=o,f=!!e;if(c.style("visibility",l.subchart_show?null:"hidden"),c.select(`.${Re.brush}`).style("pointer-events",o.isSubchartBrushEnabled()?null:"none"),(n=o.$el.subchart.eventRect)==null||n.style("pointer-events",o.isSubchartBrushEnabled()?"none":"all"),(r=o.$el.axis.subY)==null||r.style("visibility",l.subchart_axis_y_show?null:"hidden"),(i=o.$el.axis.subY2)==null||i.style("visibility",l.subchart_axis_y2_show?null:"hidden"),l.subchart_show&&(((s=u.event)==null?void 0:s.type)==="zoom"&&o.brush.update(),t)){const d=l.subchart_init_range;!pv(o)&&o.brush.update(),o.withSubchartTypeContext(()=>{const h=u._targetsToShow||o.filterTargetsToShow(o.data.targets);o.updateSubchartYDomain(h);const m=o.getDrawShape();if(Object.keys(m.type).forEach(S=>{const E=Ln(S),C=o[`generateDraw${E}`](m.indices[S],!0);o[`update${E}`](f,!0),o[`redraw${E}`](C,f,!0)}),o.hasType("bubble")||o.hasType("scatter")){const{cx:S}=m.pos,E=o.updateCircleY(!0);o.updateCircle(!0),o.redrawCircle(S,E,f,void 0,!0)}}),!u.rendered&&d&&(u.domain=d,o.brush.move(o.brush.getSelection(),d.map(o.scale.x)))}},showSubchartGridFocus(t){const e=this,{config:n,state:r,$el:{subchart:{main:i}}}=e;if(!i||!n.subchart_show||e.isSubchartBrushEnabled()||n.grid_focus_show===!1||n.subchart_grid_focus===!1||!n.tooltip_show||n.axis_tooltip)return;const o=(Array.isArray(t)?t:[t]).find(u=>u&&e.getBaseValue(u)!=null);if(!o){e.hideSubchartGridFocus();return}const l=e.scale.subX(o.x);if(!Number.isFinite(l)){e.hideSubchartGridFocus();return}const c=i.select(`g.${Re.xgridFocus} line.${Re.xgridFocus}`);if(MC(e)){c.style("visibility","hidden");return}Bg(e,c),n.axis_rotated?c.attr("x1",0).attr("x2",r.width2).attr("y1",l).attr("y2",l):c.attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",r.height2),c.style("visibility",null)},hideSubchartGridFocus(){var t;LC(this),(t=this.$el.subchart.main)==null||t.select(`g.${Re.xgridFocus} line.${Re.xgridFocus}`).style("visibility","hidden")},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:r,zoom_rescale:i},scale:s,state:o}=n;n.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&o.rendered&&r.bind(n.api)((e=o.domain)!=null?e:s.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:r},$T:i}=n,s=e!=null&&e.axisSubX?e.axisSubX:i(r.main.select(`.${Re.axisX}`),t),o=e!=null&&e.axisSubY?e.axisSubY:i(r.main.select(`.${Re.axisY}`),t),l=e!=null&&e.axisSubY2?e.axisSubY2:i(r.main.select(`.${Re.axisY2}`),t);r.main.attr("transform",n.getTranslate("context")),s.attr("transform",n.getTranslate("subX")),o.attr("transform",n.getTranslate("subY")),l.attr("transform",n.getTranslate("subY2"))}},NC={subchart_show:!1,subchart_type:void 0,subchart_types:{},subchart_brush_enabled:!0,subchart_showHandle:!1,subchart_size_height:60,subchart_grid_focus:!0,subchart_grid_focus_continuous:!1,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_count:void 0,subchart_axis_x_tick_values:void 0,subchart_axis_x_tick_culling:void 0,subchart_axis_x_tick_culling_max:void 0,subchart_axis_x_tick_culling_lines:void 0,subchart_axis_x_tick_culling_reverse:void 0,subchart_axis_x_tick_outer:void 0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_axis_y_show:!1,subchart_axis_y_tick_show:!0,subchart_axis_y_tick_count:void 0,subchart_axis_y_tick_values:void 0,subchart_axis_y_tick_culling:void 0,subchart_axis_y_tick_culling_max:void 0,subchart_axis_y_tick_culling_lines:void 0,subchart_axis_y_tick_culling_reverse:void 0,subchart_axis_y_tick_outer:void 0,subchart_axis_y_tick_format:void 0,subchart_axis_y_tick_text_show:!0,subchart_axis_y2_show:!1,subchart_axis_y2_tick_show:!0,subchart_axis_y2_tick_count:void 0,subchart_axis_y2_tick_values:void 0,subchart_axis_y2_tick_culling:void 0,subchart_axis_y2_tick_culling_max:void 0,subchart_axis_y2_tick_culling_lines:void 0,subchart_axis_y2_tick_culling_reverse:void 0,subchart_axis_y2_tick_outer:void 0,subchart_axis_y2_tick_format:void 0,subchart_axis_y2_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}};let zg=()=>(xn(Sr.prototype,FC),xn(jn.prototype,OC),$a.setOptions([NC]),(zg=()=>!0)());var $C=1e-12;function Ug(t){return((t=Math.exp(t))+1/t)/2}function BC(t){return((t=Math.exp(t))-1/t)/2}function zC(t){return((t=Math.exp(2*t))-1)/(t+1)}var UC=(function t(e,n,r){function i(s,o){var l=s[0],c=s[1],u=s[2],f=o[0],d=o[1],h=o[2],m=f-l,S=d-c,E=m*m+S*S,C,w;if(E<$C)w=Math.log(h/u)/e,C=function(Q){return[l+Q*m,c+Q*S,u*Math.exp(e*Q*w)]};else{var $=Math.sqrt(E),z=(h*h-u*u+r*E)/(2*u*n*$),B=(h*h-u*u-r*E)/(2*h*n*$),W=Math.log(Math.sqrt(z*z+1)-z),H=Math.log(Math.sqrt(B*B+1)-B);w=(H-W)/e,C=function(Q){var q=Q*w,st=Ug(W),it=u/(n*$)*(st*zC(e*q+W)-BC(W));return[l+it*m,c+it*S,u*st/Ug(e*q+W)]}}return C.duration=w*1e3*e/Math.SQRT2,C}return i.rho=function(s){var o=Math.max(.001,+s),l=o*o,c=l*l;return t(o,l,c)},i})(Math.SQRT2,2,4),_o=(t=>()=>t);function kC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ta(t,e,n){this.k=t,this.x=e,this.y=n}ta.prototype={constructor:ta,scale:function(t){return t===1?this:new ta(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ta(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var fr=new ta(1,0,0);pu.prototype=ta.prototype;function pu(t){for(;!t.__zoom;)if(!(t=t.parentNode))return fr;return t.__zoom}function mu(t){t.stopImmediatePropagation()}function xs(t){t.preventDefault(),t.stopImmediatePropagation()}function GC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function XC(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function kg(){return this.__zoom||fr}function WC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function VC(){return navigator.maxTouchPoints||"ontouchstart"in this}function jC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function HC(){var t=GC,e=XC,n=jC,r=WC,i=VC,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=UC,u=Io("start","zoom","end"),f,d,h,m=500,S=150,E=0,C=10;function w(tt){tt.property("__zoom",kg).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",st).on("dblclick.zoom",it).filter(i).on("touchstart.zoom",ot).on("touchmove.zoom",ct).on("touchend.zoom touchcancel.zoom",gt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(tt,ft,lt,bt){var St=tt.selection?tt.selection():tt;St.property("__zoom",kg),tt!==St?W(tt,ft,lt,bt):St.interrupt().each(function(){H(this,arguments).event(bt).start().zoom(null,typeof ft=="function"?ft.apply(this,arguments):ft).end()})},w.scaleBy=function(tt,ft,lt,bt){w.scaleTo(tt,function(){var St=this.__zoom.k,Mt=typeof ft=="function"?ft.apply(this,arguments):ft;return St*Mt},lt,bt)},w.scaleTo=function(tt,ft,lt,bt){w.transform(tt,function(){var St=e.apply(this,arguments),Mt=this.__zoom,Ot=lt==null?B(St):typeof lt=="function"?lt.apply(this,arguments):lt,Kt=Mt.invert(Ot),ee=typeof ft=="function"?ft.apply(this,arguments):ft;return n(z($(Mt,ee),Ot,Kt),St,o)},lt,bt)},w.translateBy=function(tt,ft,lt,bt){w.transform(tt,function(){return n(this.__zoom.translate(typeof ft=="function"?ft.apply(this,arguments):ft,typeof lt=="function"?lt.apply(this,arguments):lt),e.apply(this,arguments),o)},null,bt)},w.translateTo=function(tt,ft,lt,bt,St){w.transform(tt,function(){var Mt=e.apply(this,arguments),Ot=this.__zoom,Kt=bt==null?B(Mt):typeof bt=="function"?bt.apply(this,arguments):bt;return n(fr.translate(Kt[0],Kt[1]).scale(Ot.k).translate(typeof ft=="function"?-ft.apply(this,arguments):-ft,typeof lt=="function"?-lt.apply(this,arguments):-lt),Mt,o)},bt,St)};function $(tt,ft){return ft=Math.max(s[0],Math.min(s[1],ft)),ft===tt.k?tt:new ta(ft,tt.x,tt.y)}function z(tt,ft,lt){var bt=ft[0]-lt[0]*tt.k,St=ft[1]-lt[1]*tt.k;return bt===tt.x&&St===tt.y?tt:new ta(tt.k,bt,St)}function B(tt){return[(+tt[0][0]+ +tt[1][0])/2,(+tt[0][1]+ +tt[1][1])/2]}function W(tt,ft,lt,bt){tt.on("start.zoom",function(){H(this,arguments).event(bt).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(bt).end()}).tween("zoom",function(){var St=this,Mt=arguments,Ot=H(St,Mt).event(bt),Kt=e.apply(St,Mt),ee=lt==null?B(Kt):typeof lt=="function"?lt.apply(St,Mt):lt,Ae=Math.max(Kt[1][0]-Kt[0][0],Kt[1][1]-Kt[0][1]),Ee=St.__zoom,Te=typeof ft=="function"?ft.apply(St,Mt):ft,De=c(Ee.invert(ee).concat(Ae/Ee.k),Te.invert(ee).concat(Ae/Te.k));return function(me){if(me===1)me=Te;else{var Pe=De(me),Zt=Ae/Pe[2];me=new ta(Zt,ee[0]-Pe[0]*Zt,ee[1]-Pe[1]*Zt)}Ot.zoom(null,me)}})}function H(tt,ft,lt){return!lt&&tt.__zooming||new Q(tt,ft)}function Q(tt,ft){this.that=tt,this.args=ft,this.active=0,this.sourceEvent=null,this.extent=e.apply(tt,ft),this.taps=0}Q.prototype={event:function(tt){return tt&&(this.sourceEvent=tt),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(tt,ft){return this.mouse&&tt!=="mouse"&&(this.mouse[1]=ft.invert(this.mouse[0])),this.touch0&&tt!=="touch"&&(this.touch0[1]=ft.invert(this.touch0[0])),this.touch1&&tt!=="touch"&&(this.touch1[1]=ft.invert(this.touch1[0])),this.that.__zoom=ft,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(tt){var ft=Yt(this.that).datum();u.call(tt,this.that,new kC(tt,{sourceEvent:this.sourceEvent,target:w,type:tt,transform:this.that.__zoom,dispatch:u}),ft)}};function q(tt,...ft){if(!t.apply(this,arguments))return;var lt=H(this,ft).event(tt),bt=this.__zoom,St=Math.max(s[0],Math.min(s[1],bt.k*Math.pow(2,r.apply(this,arguments)))),Mt=ur(tt);if(lt.wheel)(lt.mouse[0][0]!==Mt[0]||lt.mouse[0][1]!==Mt[1])&&(lt.mouse[1]=bt.invert(lt.mouse[0]=Mt)),clearTimeout(lt.wheel);else{if(bt.k===St)return;lt.mouse=[Mt,bt.invert(Mt)],di(this),lt.start()}xs(tt),lt.wheel=setTimeout(Ot,S),lt.zoom("mouse",n(z($(bt,St),lt.mouse[0],lt.mouse[1]),lt.extent,o));function Ot(){lt.wheel=null,lt.end()}}function st(tt,...ft){if(h||!t.apply(this,arguments))return;var lt=tt.currentTarget,bt=H(this,ft,!0).event(tt),St=Yt(tt.view).on("mousemove.zoom",ee,!0).on("mouseup.zoom",Ae,!0),Mt=ur(tt,lt),Ot=tt.clientX,Kt=tt.clientY;Fc(tt.view),mu(tt),bt.mouse=[Mt,this.__zoom.invert(Mt)],di(this),bt.start();function ee(Ee){if(xs(Ee),!bt.moved){var Te=Ee.clientX-Ot,De=Ee.clientY-Kt;bt.moved=Te*Te+De*De>E}bt.event(Ee).zoom("mouse",n(z(bt.that.__zoom,bt.mouse[0]=ur(Ee,lt),bt.mouse[1]),bt.extent,o))}function Ae(Ee){St.on("mousemove.zoom mouseup.zoom",null),Nc(Ee.view,bt.moved),xs(Ee),bt.event(Ee).end()}}function it(tt,...ft){if(t.apply(this,arguments)){var lt=this.__zoom,bt=ur(tt.changedTouches?tt.changedTouches[0]:tt,this),St=lt.invert(bt),Mt=lt.k*(tt.shiftKey?.5:2),Ot=n(z($(lt,Mt),bt,St),e.apply(this,ft),o);xs(tt),l>0?Yt(this).transition().duration(l).call(W,Ot,bt,tt):Yt(this).call(w.transform,Ot,bt,tt)}}function ot(tt,...ft){if(t.apply(this,arguments)){var lt=tt.touches,bt=lt.length,St=H(this,ft,tt.changedTouches.length===bt).event(tt),Mt,Ot,Kt,ee;for(mu(tt),Ot=0;Ot<bt;++Ot)Kt=lt[Ot],ee=ur(Kt,this),ee=[ee,this.__zoom.invert(ee),Kt.identifier],St.touch0?!St.touch1&&St.touch0[2]!==ee[2]&&(St.touch1=ee,St.taps=0):(St.touch0=ee,Mt=!0,St.taps=1+!!f);f&&(f=clearTimeout(f)),Mt&&(St.taps<2&&(d=ee[0],f=setTimeout(function(){f=null},m)),di(this),St.start())}}function ct(tt,...ft){if(this.__zooming){var lt=H(this,ft).event(tt),bt=tt.changedTouches,St=bt.length,Mt,Ot,Kt,ee;for(xs(tt),Mt=0;Mt<St;++Mt)Ot=bt[Mt],Kt=ur(Ot,this),lt.touch0&<.touch0[2]===Ot.identifier?lt.touch0[0]=Kt:lt.touch1&<.touch1[2]===Ot.identifier&&(lt.touch1[0]=Kt);if(Ot=lt.that.__zoom,lt.touch1){var Ae=lt.touch0[0],Ee=lt.touch0[1],Te=lt.touch1[0],De=lt.touch1[1],me=(me=Te[0]-Ae[0])*me+(me=Te[1]-Ae[1])*me,Pe=(Pe=De[0]-Ee[0])*Pe+(Pe=De[1]-Ee[1])*Pe;Ot=$(Ot,Math.sqrt(me/Pe)),Kt=[(Ae[0]+Te[0])/2,(Ae[1]+Te[1])/2],ee=[(Ee[0]+De[0])/2,(Ee[1]+De[1])/2]}else if(lt.touch0)Kt=lt.touch0[0],ee=lt.touch0[1];else return;lt.zoom("touch",n(z(Ot,Kt,ee),lt.extent,o))}}function gt(tt,...ft){if(this.__zooming){var lt=H(this,ft).event(tt),bt=tt.changedTouches,St=bt.length,Mt,Ot;for(mu(tt),h&&clearTimeout(h),h=setTimeout(function(){h=null},m),Mt=0;Mt<St;++Mt)Ot=bt[Mt],lt.touch0&<.touch0[2]===Ot.identifier?delete lt.touch0:lt.touch1&<.touch1[2]===Ot.identifier&&delete lt.touch1;if(lt.touch1&&!lt.touch0&&(lt.touch0=lt.touch1,delete lt.touch1),lt.touch0)lt.touch0[1]=this.__zoom.invert(lt.touch0[0]);else if(lt.end(),lt.taps===2&&(Ot=ur(Ot,this),Math.hypot(d[0]-Ot[0],d[1]-Ot[1])<C)){var Kt=Yt(this).on("dblclick.zoom");Kt&&Kt.apply(this,arguments)}}}return w.wheelDelta=function(tt){return arguments.length?(r=typeof tt=="function"?tt:_o(+tt),w):r},w.filter=function(tt){return arguments.length?(t=typeof tt=="function"?tt:_o(!!tt),w):t},w.touchable=function(tt){return arguments.length?(i=typeof tt=="function"?tt:_o(!!tt),w):i},w.extent=function(tt){return arguments.length?(e=typeof tt=="function"?tt:_o([[+tt[0][0],+tt[0][1]],[+tt[1][0],+tt[1][1]]]),w):e},w.scaleExtent=function(tt){return arguments.length?(s[0]=+tt[0],s[1]=+tt[1],w):[s[0],s[1]]},w.translateExtent=function(tt){return arguments.length?(o[0][0]=+tt[0][0],o[1][0]=+tt[1][0],o[0][1]=+tt[0][1],o[1][1]=+tt[1][1],w):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},w.constrain=function(tt){return arguments.length?(n=tt,w):n},w.duration=function(tt){return arguments.length?(l=+tt,w):l},w.interpolate=function(tt){return arguments.length?(c=tt,w):c},w.on=function(){var tt=u.on.apply(u,arguments);return tt===u?w:tt},w.clickDistance=function(tt){return arguments.length?(E=(tt=+tt)*tt,w):Math.sqrt(E)},w.tapDistance=function(tt){return arguments.length?(C=+tt,w):C},w}const Gg=function(t){var e,n;const r=this.internal,{axis:i,config:s,org:o,scale:l,state:c}=r;let u;if(!i)return;const f=i.isCategorized();if(s.zoom_enabled)if(u=t,Array.isArray(u)){if(i.isTimeSeries()&&(u=u.map(h=>Wn.bind(r)(h))),r.withinRange(u,r.getZoomDomain("zoom",!0),r.getZoomDomain("zoom"))){if(c.domain=u.slice(),u=r.getZoomDomainValue(u),r.api.tooltip.hide(),s.subchart_show)if(c.isCanvasMode)(e=r.setCanvasSubchartDomain)==null||e.call(r,u,!0,!1);else{const h=l.zoom||l.x;r.brush.getSelection().call(r.brush.move,u.map(h))}else{const h=f?l.x.orgScale():o.xScale||l.x;r.updateCurrentZoomTransform(h,u)}r.setZoomResetButton()}}else u=r.zoom.getDomain();return(n=c.domain)!=null?n:u};xn(Gg,{enable(t){var e;const n=this.internal,{axis:r,config:i}=n;if(!r){i.zoom_enabled=!1;return}/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,n.zoom?t===!1&&n.bindZoomEvent(!1):n.initZoom(),t!==!1&&(i.zoom_type==="drag"&&!n.zoomBehaviour&&((e=n.initZoomBehaviour)==null||e.call(n)),n.bindZoomEvent()),n.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_max=mr("max",[r[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_min=mr("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(He(t)){const{min:n,max:r}=t;sn(n)&&e.min(n),sn(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var YC={zoom:Gg,unzoom(){var t;const e=this.internal,{config:n,$el:{canvas:r,eventRect:i,zoomResetBtn:s},scale:{zoom:o},state:l}=e,c=l.isCanvasMode?r:i;(o||l.isCanvasMode&&n.subchart_show&&l.domain)&&(n.subchart_show?l.isCanvasMode?(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1):e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(fr),e.updateZoom(!0),s==null||s.style("display","none"),c!=null&&c.node()&&pu(c.node())!==fr&&e.zoom.transform(c,fr),l.domain=void 0)}};function qo(t){return t.state.isCanvasMode?t.$el.canvas:t.$el.eventRect}function Xg(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return fr.translate(e.x+(e.k-1)*n.left,e.y+(e.k-1)*n.top).scale(e.k)}function Wg(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return fr.translate(e.x-(e.k-1)*n.left,e.y-(e.k-1)*n.top).scale(e.k)}function Vg(t,e,n){const r=Jn(e,n);if(t.state.isCanvasMode){const{margin:i}=t.state;r[0]-=i.left,r[1]-=i.top}return r}var KC={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:r}=t,i=HC().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=()=>{const s=e.zoom_extent||[1,10];return[s[0],Math.max(t.getMaxDataCount()/s[1],s[1])]},i.updateScaleExtent=function(){const s=wa(t.scale.x.orgDomain())/wa(t.getZoomDomain()),o=this.orgScaleExtent();return this.scaleExtent([o[0]*s,o[1]*s]),this},i.updateTransformScale=(s,o)=>{var l,c;const u=e.axis_rotated,f=Xg(t,s);(l=n.xScale)==null||l.range(r.x.range());const d=f[u?"rescaleY":"rescaleX"](n.xScale||r.x);if(d.domain().some(S=>/(Invalid Date|NaN)/.test(S.toString())))return;const h=t.trimXDomain(d.domain()),m=e.zoom_rescale;if(d.domain(h,n.xDomain),o){const S=d(r.x.domain()[0]),E=u?f.x:S,C=u?S:f.y,w=Wg(t,fr.translate(E,C).scale(s.k));(c=qo(t))==null||c.property("__zoom",w)}r.zoom=t.getCustomizedXScale(d),t.axis.x.scale(r.zoom),m?(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(h)):n.xScale&&(r.x.domain(n.xScale.domain()),n.xScale=null)},i.getDomain=()=>{const s=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(s[1]-=2),s},t.zoom=i},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,Ne(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){const e=this,{config:n,scale:r,state:i,org:s}=e,{sourceEvent:o}=t,l=(t==null?void 0:t.transform)===fr;if(!n.zoom_enabled||e.filterTargetsToShow(e.data.targets).length===0||!r.zoom&&(o==null?void 0:o.type.indexOf("touch"))>-1&&(o==null?void 0:o.touches.length)===1)return;t.sourceEvent&&(i.zooming=!0,i.domain=void 0);const c=(o==null?void 0:o.type)==="mousemove",u=(o==null?void 0:o.wheelDelta)<0,{transform:f}=t;!c&&u&&r.x.domain().every((S,E)=>S!==s.xDomain[E])&&r.x.domain(s.xDomain),e.zoom.updateTransformScale(f,n.zoom_type==="wheel"&&o);const d=n.transition_duration>0&&!n.subchart_show&&(i.dragging||l||!t.sourceEvent),h=o&&c&&n.zoom_type!=="wheel",m=()=>{var S;e.config&&(e.redraw({withTransition:d,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=c,!l&&Ne(n.zoom_onzoom,e.api,(S=e.state.domain)!=null?S:e.zoom.getDomain()))};h?Ph(e.state,m):m()},onZoomEnd(t){var e,n;const r=this,{config:i,state:s}=r,o=r.zoom;if(!o)return;let{startEvent:l}=o,c=t==null?void 0:t.sourceEvent;const u=(t==null?void 0:t.transform)===fr;(l==null?void 0:l.type.indexOf("touch"))>-1&&(l=l.changedTouches[0],c=(e=c==null?void 0:c.changedTouches)==null?void 0:e[0]),!(i.zoom_type==="drag"&&c&&l.clientX===c.clientX&&l.clientY===c.clientY)&&(s.zooming=!1,!s.isCanvasMode&&r.redrawEventRect(),r.updateZoom(),!u&&(c||s.dragging)&&Ne(i.zoom_onzoomend,r.api,(n=r.state.domain)!=null?n:r.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:r,zoom:i}=e.scale;if(i){const s=i.domain(),o=n.domain(),l=.015,c=e.config.axis_x_inverted?(s[0]>=o[0]||s[0]+l>=o[0])&&(o[1]>=s[1]||o[1]>=s[1]+l):(s[0]<=o[0]||s[0]-l<=o[0])&&(o[1]<=s[1]||o[1]<=s[1]-l);(t||c)&&(e.axis.x.scale(n),r.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){var n;const r=this,{config:i}=r,s=i.axis_rotated,o=[-t(e[0]),0],l=fr.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...s?o.reverse():o);(n=qo(r))==null||n.call(r.zoom.transform,Wg(r,l))},bindZoomOnEventRect(){var t,e;const n=this,{config:r,$el:{svg:i}}=n,s=qo(n),o=r.zoom_type==="drag"?n.zoomBehaviour:n.zoom;n.state.isCanvasMode&&((t=o==null?void 0:o.touchable)==null||t.call(o,()=>r.interaction_inputType_touch!==!1)),!n.state.isCanvasMode&&se.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=se.navigator)==null?void 0:e.userAgent)&&i.on("wheel",()=>{}),s==null||s.call(o).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,r=e.axis_rotated;let i=0,s=0,o,l;const c={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0},u=f=>{const[d,h]=l!=null?l:[0,r?n.height:n.width];return Math.min(Math.max(f,d),h)};t.zoomBehaviour=Yh().touchable(()=>!n.isCanvasMode||e.interaction_inputType_touch!==!1).clickDistance(4).on("start",function(f){var d;l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),!n.isCanvasMode&&!o&&(o=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",Ec.zoomBrush).attr("width",r?n.width:0).attr("height",r?0:n.height)),o==null||o.attr(r?"width":"height",r?n.width:n.height),i=u(Vg(t,f,this)[c.index]),s=i,n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,s):o.attr(c.axis,i).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){var d;s=u(Vg(t,f,this)[c.index]),n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,s):o.attr(c.axis,Math.min(i,s)).attr(c.attr,Math.abs(s-i))}).on("end",f=>{var d;const h=t.scale.zoom||t.scale.x;n.event=f,s=u(s),n.isCanvasMode?(d=t.clearCanvasZoomBrush)==null||d.call(t):o.attr(c.axis,0).attr(c.attr,0),i>s&&([i,s]=[s,i]),i<0&&(s+=Math.abs(i),i=0),i!==s&&t.api.zoom([i,s].map(m=>h.invert(m))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,r=e.zoom_resetButton;r&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(ze.button,!0).append("span").on("click",function(){ie(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()}).classed(Ec.buttonZoomReset,!0).text(r.text||"Reset Zoom"))},getZoomTransform(){const t=this,e=qo(t),n=e==null?void 0:e.node();return n?Xg(t,pu(n)):{k:1}}},ZC={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let jg=()=>(xn(Sr.prototype,KC),xn(jn.prototype,YC),$a.setOptions([ZC]),(jg=()=>!0)());function Hg(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function Yg(t,e=!1){const n=this.internal,{config:r}=n,i=r.transition_duration&&os();return t?(r.regions=e?r.regions.concat(t):t,n.state.isCanvasMode?(Hg(n),r.regions):(n.updateRegion(),n.redrawRegion(i),r.regions)):r.regions}const Kg=function(t){return Yg.bind(this)(t)};xn(Kg,{add:function(t){return Yg.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:r}=e,i=t||{},s=ia(i,"classes",[ss.region]);let o=n.regions;if(e.state.isCanvasMode)return Object.keys(i).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],Hg(e),n.regions;const l=e.$el.main.select(`.${ss.regions}`).selectAll(s.map(c=>`.${c}`));return r(l).style("opacity","0").remove(),Object.keys(i).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],o}});var JC={regions:Kg},QC={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",ss.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:r}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const i=n.main.selectAll(`.${ss.region}`).data(e.regions);r(i.exit()).style("opacity","0").remove();const s=i.enter().append("g");s.append("rect").style("fill-opacity","0"),n.list=s.merge(i).attr("class",t.classRegion.bind(t)),n.list.each(function(o){var l;Yt(this).select("text").empty()&&((l=o.label)!=null&&l.text)&&Yt(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:r}=e,i=e.regionX.bind(e),s=e.regionY.bind(e),o=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=r(l,t).attr("x",i).attr("y",s).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=r(c,t).text(u=>{var f;return(f=u.label)==null?void 0:f.text}).attr("transform",({label:u})=>u.rotated?" rotate(-90)":null).attr("transform",function(u){var f;const{x:d=0,y:h=0,center:m=!1,rotated:S=!1}=(f=u.label)!=null?f:{},E=this.previousElementSibling,C={x:0,y:0};return je(m)&&["x","y"].forEach((w,$)=>{m.indexOf(w)>-1&&(C[w]=(+E.getAttribute(o[$])-ln(this)[o[$]])/2)}),`translate(${i(u)+C.x+d}, ${s(u)+C.y+h})${S?" rotate(-90)":""}`}).attr("text-anchor",({label:u})=>u!=null&&u.rotated?"end":null).attr("dy","1em").style("fill",({label:u})=>{var f;return(f=u==null?void 0:u.color)!=null?f:null}),[l.style("fill-opacity",u=>Ge(u.opacity)?u.opacity:null).on("end",function(){Yt(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:r,scale:i,state:s}=n,o=r.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",u=!l&&n[c?"regionX":"regionY"](e);let f=l?"start":"end",d=l?0:s[t],h;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?f="start":l&&!c&&(f="end"),(c?o:!o)&&f in e&&(h=i[e.axis])):(c?!o:o)&&f in e&&(h=i.zoom||i.x),h){let m=0;d=e[f],n.axis.isTimeSeries(e.axis)?d=Wn.call(n,d):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),m=n.axis.x.tickOffset()*(f==="start"?-1:1)),d=h(d)+m}return l?d:d<u?0:d-u},isRegionOnX(t){return!t.axis||t.axis==="x"}};let Zg=()=>(xn(Sr.prototype,QC),jn.prototype.regions=JC.regions,(Zg=()=>({}))());var xi={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?$n.circles:Lr.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return Yv.call(e,t,"area_linearGradient",e.color)},updateArea(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,state:i,$el:s,$T:o}=n,l=e?s.subchart:s;r.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${To.areas}`).selectAll(`.${To.area}`).data(n.lineData.bind(n));o(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return i.orgAreaOpacity=Yt(this).style("opacity"),"0"}).merge(c),c.style("opacity",i.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{area:i}=n?this.$el.subchart:this.$el,{orgAreaOpacity:s}=r.state;return[r.$T(i,e,Ir()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",o=>String(r.isAreaRangeType(o)?s/1.75:s))]},generateDrawArea(t,e){return Bd(this,t,e)}},yi={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},xu={spline_interpolation_type:"cardinal"};function _C(t){return Kn(t)&&ie(t.create)&&ie(t.update)}function qC(t,e){var n;const r=this,i=(c,u)=>{const f=c.attributes;for(let d=0,h;h=f[d];d++)h=h.name,u.setAttribute(h,c.getAttribute(h))},o=new DOMParser().parseFromString(pr(t),"image/svg+xml").documentElement,l=Ye.createElementNS(_t.svg,o.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",i(o,l),(n=o.childNodes)!=null&&n.length){const c=Yt(l);"innerHTML"in l?c.html(pr(o.innerHTML)):Oa(o.childNodes).forEach(u=>{i(u,c.append(u.tagName).node())})}r.$el.defs.node().appendChild(l)}var Ti={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},getValidPointPattern(){const{config:t}=this,e=/^(circle|rect(angle)?)$/i.test(t.point_type)?t.point_type:"circle";return vn(t.point_pattern)?t.point_pattern:[e]},generatePoint(){const t=this,{$el:e,config:n}=t,r=[],i=t.getValidPointPattern();return function(s,o,...l){return function(c){var u,f,d,h;const m=t.getTargetSelectorSuffix(c.id||((u=c.data)==null?void 0:u.id)||c),S=Yt(this);r.indexOf(m)<0&&r.push(m);let E=i[r.indexOf(m)%i.length];if(t.hasValidPointType(E))E=t[E];else if(!_C(E||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&qC.call(t,E,C),s==="create")return(f=t.custom)==null?void 0:f.create.bind(o)(S,C,...l);if(s==="update")return(d=t.custom)==null?void 0:d.update.bind(o)(S,...l)}return(h=E[s])==null?void 0:h.bind(o)(S,...l)}}}};function t2(t,e,n,r=!1){const i=t?[t,0]:n;for(let s=t||n.reduce((o,l)=>o+l);s<=e;)n.forEach(o=>{s+o<=e&&i.push(o),s+=o});return i.length%2!==0&&i.push(r?n[1]:0),{dash:i.join(" "),length:i.reduce((s,o)=>s+o,0)}}var e2={initLine(){Kv.call(this,{elKey:"line",className:Lr.chartLines,cssRules:["pointer-events:none"]})},updateTargetsForLine(t){const e=this,{$el:{area:n,main:r}}=e,i=e.getClass("lines",!0),s=t.filter(l=>!(e.isScatterType(l)||e.isBubbleType(l))),o=su.call(e,s,{type:"Line",elKey:"line",containerClass:Lr.chartLines,itemClass:Lr.chartLine,initFn:e.initLine});if(o.append("g").attr("class",i),e.hasTypeOf("Area")){const l=r.select(`.${Lr.chartLines}`).selectAll(`.${Lr.chartLine}`),c=(!n&&o.empty()?l:o).filter(e.isAreaType.bind(e));e.initArea(c)}e.updateTargetForCircle(s,o)},updateLine(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{format:{extraLineClasses:r},$el:i,$T:s}=n,o=e?i.subchart:i,l=o.main.selectAll(`.${Lr.lines}`).selectAll(`.${Lr.line}`).data(n.lineData.bind(n));s(l.exit(),t).style("opacity","0").remove(),o.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${r(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{$el:i,$T:s}=r,{line:o}=n?i.subchart:i;return[s(o,e,Ir()).attr("d",t).style("stroke",this.color).style("opacity",null)]},generateDrawLine(t,e){return $d(this,t,e)},lineWithRegions(t,e,n,r){const i=this,{config:s}=i,o=s.axis_rotated,l=i.axis.isTimeSeries(),c="2 2",u=Ad(i,t,r),f=i.hasNullDataValue(t);let d,h,m,S;const E=o?it=>n(it.value):it=>e(it.x),C=o?it=>e(it.x):it=>n(it.value),w=it=>`M${it[0][0]},${it[0][1]}L${it[1][0]},${it[1][1]}`,$=l?(it,ot,ct,gt)=>{const tt=it.x.getTime(),ft=ot.x-it.x,lt=new Date(tt+ft*ct),bt=new Date(tt+ft*(ct+gt)),St=o?[[n(h(ct)),e(lt)],[n(h(ct+m)),e(bt)]]:[[e(lt),n(h(ct))],[e(bt),n(h(ct+m))]];return w(St)}:(it,ot,ct,gt)=>{const tt=e(ot.x,!o),ft=n(ot.value,o),lt=ct+gt,bt=e(d(ct),!o),St=n(h(ct),o);let Mt=e(d(lt),!o),Ot=n(h(lt),o);Mt>tt&&(Mt=tt),it.value>ot.value&&(o?Ot<ft:Ot>ft)&&(Ot=ft);const Kt=[[bt,St],[Mt,Ot]];return o&&Kt.forEach(ee=>ee.reverse()),w(Kt)},z={x:i.axis.getAxisType("x"),y:i.axis.getAxisType("y")};let B="";if(!t.length)return B;const W=i.$el.line.filter(({id:it})=>it===t[0].id),H=W.clone().style("display","none"),Q=(it,ot)=>it.attr("d",ot).node().getTotalLength(),q={dash:[],lastLength:0};let st=!1;for(let it=0,ot;ot=t[it];it++){const ct=t[it-1],gt=ct&&Ge(ct.value);let tt=i.isWithinRegions(ot.x,u);if(Ge(ot.value)){if(mn(u)||!tt||!gt)B+=`${it&>?"L":"M"}${E(ot)},${C(ot)}`;else if(gt)if(tt=((tt==null?void 0:tt.dasharray)||c).split(" ").map(Number),d=sa(z.x,ct.x,ot.x),h=sa(z.y,ct.value,ot.value),f){const ft=e(ot.x)-e(ct.x),lt=n(ot.value)-n(ct.value),bt=Math.sqrt(ft*ft+lt*lt);m=tt[0]/bt,S=m*tt[1];for(let St=m;St<=1;St+=S)B+=$(ct,ot,St,m),St+S>=1&&(B+=$(ct,ot,1,0))}else{let ft;if(st=ot.x===t[t.length-1].x,l){const Mt=+ct.x,Ot=new Date(Mt),Kt=new Date(Mt+(+ot.x-Mt));ft=[[e(Ot),n(h(0))],[e(Kt),n(h(1))]]}else ft=[[e(d(0)),n(h(0))],[e(d(1)),n(h(1))]];o&&ft.forEach(Mt=>Mt.reverse());const lt=Q(H,B),bt=Q(H,B+=`L${ft[1].join(",")}`),St=t2(lt-q.lastLength,bt-q.lastLength,tt,st);q.lastLength+=St.length,q.dash.push(St.dash)}}}return q.dash.length&&(!st&&q.dash.push(Q(H,B)),W.attr("stroke-dasharray",q.dash.join(" "))),H.remove(),B},isWithinRegions(t,e){return Ed(t,e)},isWithinStep(t,e){return Math.abs(e-Jn(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||qe(e)&&e.indexOf(t.id)!==-1}};const bi=()=>Ir(),Jg=new WeakMap;function Qg(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),i=Jg.get(t);if(i&&i.attrHeight===e&&i.attrWidth===n&&i.href===r)return i;const{width:s,height:o}=ha(t),l={attrHeight:e,attrWidth:n,height:o,href:r,width:s};return Jg.set(t,l),l}var tl={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let r=e.point_opacity;return mn(r)&&(r=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle(t){var e;const{config:n}=this;let r=n.point_opacity;return mn(r)&&(r=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",r=Ge(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":r:"0"),r},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${ze.chart} > .${$n.chartCircles}`).empty()&&e.select(`.${ze.chart}`).append("g").attr("class",$n.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:r,data:i,$el:s}=n,o=r.interaction_enabled&&r.data_selection_enabled,l=o&&r.data_selection_isselectable,c=n.getClass("circles",!0);if(!r.point_show)return;n.initCircle();let u=t,f=e;if(!u){u=n.filterNullish(i.targets).filter(h=>this.isScatterType(h)||this.isBubbleType(h));const d=s.main.select(`.${$n.chartCircles}`).style("pointer-events","none").selectAll(`.${$n.circles}`).data(u);d.exit().remove(),f=d.enter()}o&&f.append("g").attr("class",d=>n.generateClass(on.selectedCircles,d.id)),f.append("g").attr("class",c).call(d=>{n.setCssRule(!0,`.${$n.circles}`,["cursor:pointer"],l)(d),n.setCssRule(!0,` .${$n.circle}`,["fill","stroke"],n.color)(d)}).style("opacity",function(){return Yt(this.parentNode).classed($n.chartCircles)?"0":null}),o&&u.forEach(d=>{s.main.selectAll(`.${on.selectedCircles}${n.getTargetSelectorSuffix(d.id)}`).selectAll(`${on.selectedCircle}`).each(h=>{h.value=d.values[h.index].value})})},updateCircle(t=!1){const e=this,{config:n,state:r,$el:i}=e,s=e.isPointFocusOnly(),o=t?i.subchart:i;if(n.point_show&&!r.toggling){n.point_radialGradient&&e.updateLinearGradient();const l=o.main.selectAll(`.${$n.circles}`).selectAll(`.${$n.circle}`).data(d=>{const h=e.isLineType(d)&&e.shouldDrawPointsForLine(d)||e.isBubbleType(d)||e.isRadarType(d)||e.isScatterType(d)?s?[d.values[0]]:d.values:[];return e.filterNullish(h)});l.exit().remove();const c=e.pointR.bind(e),u=e.generateUpdateCircleColor(),f=e.initialOpacityForCircle.bind(e);l.enter().filter(Boolean).append(e.point("create",this,c,u)),o.circle=o.main.selectAll(`.${$n.circles} .${$n.circle}`).style("stroke",e.getStylePropValue(e.color)).style("opacity",f)}},generateUpdateCircleColor(){const t=this,e=t.getStylePropValue(t.color);return n=>t.config.point_radialGradient?t.getGradienColortUrl(n.id):e?e(n):null},updateCircleColor(t){return this.generateUpdateCircleColor()(t)},redrawCircle(t,e,n,r,i=!1){const s=this,{state:{rendered:o},$el:l,$T:c}=s,u=i?l.subchart:l,f=u.main.selectAll(`.${on.selectedCircle}`);if(!s.config.point_show)return[];const d=s.isCirclePoint()?"c":"",h=Ir(),m=s.opacityForCircle.bind(s),S=s.generateUpdateCircleColor();if(s.isCirclePoint()){const w=u.circle;return s.hasType("bubble")&&w.attr("r",s.pointR.bind(s)),n?(r&&w.attr("cx",t),c(w.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",S),w.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",S)):w.attr("cx",t).attr("cy",e).style("fill",S),[[c(w,n||!o,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const E=s.point("update",s,t,e,S,n,r,f),C=[];return u.circle.each(function(w){let $=E.bind(this)(w);$=c($,n||!o,h).style("opacity",m),C.push($)}),[C,c(f,n).attr(`${d}x`,t).attr(`${d}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:r,toggling:i,transiting:s},$el:o}=e;let{circle:l}=o;if(s===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),u=(n?e.radarCircleY:e.circleY).bind(e),f=i||mn(t),d=e.point("update",e,c,u,e.getStylePropValue(e.color),r?!1:f);t&&(l=l.filter(function(h){var m;const S=(m=t.filter)==null?void 0:m.call(t,E=>E.id===h.id);return S.length?Yt(this).datum(S[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:S,value:E}=h;let C="hidden";Ge(E)&&(d.bind(this)(h),e.expandCircles(S,m),C=""),this.style.visibility=C})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},expandCircles(t,e,n){const r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();const s=r.getShapeByIndex("circle",t,e).classed(ze.EXPANDED,!0),o=i(s)/r.config.point_r,l=1-o;r.isCirclePoint()?s.attr("r",i):s.each(function(){const c=Yt(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:u,height:f}=Qg(this),d=l*(+c.attr("x")+u/2),h=l*(+c.attr("y")+f/2);c.attr("transform",`translate(${d} ${h}) scale(${o})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),r=e.getShapeByIndex("circle",t).filter(function(){return Yt(this).classed(ze.EXPANDED)}).classed(ze.EXPANDED,!1);if(r.attr("r",n),!e.isCirclePoint()){const i=n(r)/e.config.point_r;r.attr("transform",i!==1?`scale(${i})`:null)}},isWithinCircle(t,e){const{state:n}=this,r=Jn(n.event,t),i=Yt(t),s=this.isCirclePoint(t)?"c":"",o=this.getPointSensitivity(i==null?void 0:i.datum());let l=+i.attr(`${s}x`),c=+i.attr(`${s}y`);if(!(l||c)&&t.nodeType===1){const{x:d,y:h}=ln(t);l=d,c=h}const u=l-r[0],f=c-r[1];return Math.sqrt(u*u+f*f)<(e||o)},updatePointClass(t){const e=this,{circle:n}=e.$el;let r=!1;return(He(t)||n)&&(r=t===!0?n.each(function(i){let s=e.getClass("circle",!0)(i);this.getAttribute("class").indexOf(ze.EXPANDED)>-1&&(s+=` ${ze.EXPANDED}`),this.setAttribute("class",s)}):e.getClass("circle",!0)(t)),r},custom:{create(t,e,n){return t.append("use").attr("xlink:href",`#${e}`).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this,{width:c,height:u}=Qg(t.node()),f=m=>Ge(m.value)?e(m)-c/2:0,d=m=>Ge(m.value)?n(m)-u/2:0;let h=t;return i&&(s&&h.attr("x",f),h=l.$T(h,i,bi()),o&&l.$T(o,i,bi())),h.attr("x",f).attr("y",d).style("fill",r)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),i&&(s&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,i,bi())),o&&l.$T(o,i,bi())),c.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create(t,e,n){const r=i=>e(i)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this,c=l.config.point_r,u=h=>e(h)-c,f=h=>n(h)-c;let d=t;return i&&(s&&d.attr("x",u),d=l.$T(d,i,bi()),o&&l.$T(o,i,bi())),d.attr("x",u).attr("y",f).style("fill",r)}}},ka={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},n2={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function _g(t,e,n){const{config:r}=t,i=(s,o)=>{const l=ae(o)?o:o===!1?void 0:null;l!==null&&(r[`axis_${s}_${e}`]=l)};sn(n)&&(Kn(n)?Object.keys(n).forEach(s=>{i(s,n[s])}):(ae(n)||n===!1)&&["y","y2"].forEach(s=>{i(s,n)}),t.state.dirty.data=!0,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function qg(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var r2={axis:{labels:function(t){var e;const n=this.internal;let r;return t&&(Object.keys(t).forEach(i=>{n.axis.setLabelText(i,t[i])}),n.state.isCanvasMode?(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1):n.axis.updateLabels()),["x","y","y2"].forEach(i=>{const s=n.axis.getLabelText(i);s&&(!r&&(r={}),r[i]=s)}),r},min:function(t){const e=this.internal;return Ge(t)||t===!1?_g(e,"min",t):qg(e,"min")},max:function(t){const e=this.internal;return Ge(t)||t===!1?_g(e,"max",t):qg(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;sn(r)&&e.max(r),sn(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},a2={groups(t){const e=this.internal,{config:n}=e;return mn(t)||(n.data_groups=t,e.state.dirty.data=!0,e.redraw()),n.data_groups}},i2={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return qe(t)&&(i?this.categories(t):(e.updateTargetX(r.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs(t){const e=this.internal;return He(t)&&(e.updateTargetXs(e.data.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},s2=Object.defineProperty,o2=(t,e,n)=>e in t?s2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,el=(t,e,n)=>o2(t,typeof e!="symbol"?e+"":e,n);class l2{constructor(e){el(this,"owner"),el(this,"config"),el(this,"scale"),el(this,"charSize",{});const n=sa(),{config:r,params:i}=e;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!i.config.transition_duration)&&(r.withoutTransition=!0),r.range=this.scaleExtent((i.orgXScale||n).range())}getSizeFor1Char(e,n,r=!0){const i={w:5.5,h:11.5};return this.charSize[e]&&r?this.charSize[e]:(!n.empty()&&n.text("0").call(s=>{try{const{width:o,height:l}=ha(s.node(),!0);o&&l&&(i.w=o,i.h=l)}finally{s.text("")}}),this.charSize[e]=i,i)}getTickTransformSetter(e){const{config:n}=this,r=e==="x"?i=>`translate(${i+n.tickOffset},0)`:i=>`translate(0,${i})`;return(i,s)=>{i.attr("transform",o=>{const l=s(o);return Ge(o)?r(l):null})}}scaleExtent(e){const n=e[0],r=e[e.length-1];return n<r?[n,r]:[r,n]}generateTicks(e,n){const{tickStepSize:r}=this.owner.params,[i,s]=e.domain();let o=[];if(n&&r){let l=Math.round(i);for(;l<=s;)o.push(l),l+=r}else if(e.ticks){const{tickArguments:l}=this.config;if(e.type==="log"&&!l){const c=sa("_log").domain([i>0?i:1,s]).range(e.range());o=c.ticks();for(let u=s.toFixed().length;o.length>15;u--)o=c.ticks(u);o.splice(0,1,i),o.splice(o.length-1,1,s)}else o=e.ticks(...this.config.tickArguments||[])}return o}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,r=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,i=n?n(r):r;return sn(i)?i:""}transitionise(e){const{config:n}=this;let r=e;if(n.withoutTransition)r=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{r=e.transition(n.transition)}catch(i){}return r}}var c2=Object.defineProperty,u2=(t,e,n)=>e in t?c2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ys=(t,e,n)=>u2(t,typeof e!="symbol"?e+"":e,n);function nl(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function f2(t){const e=nl(t);return/^sub/.test(t)?`subchart_axis_${e}`:`axis_${e}`}class tp{constructor(e={}){ys(this,"helper"),ys(this,"config"),ys(this,"params"),ys(this,"g"),ys(this,"generatedTicks",[]);const n={innerTickSize:xt,outerTickSize:e.outerTick?xt:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:Gt,tickOffset:0,tickPadding:mt,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new l2(this)}canReuseTickTextOnResize(e){const{config:n,params:r}=this,{config:i,id:s,owner:o}=r,l=/^(x|subX)$/.test(s),c=nl(s),u=/^sub/.test(s)?i[`subchart_axis_${c}_tick_format`]||i[`axis_${c}_tick_format`]:i[`axis_${c}_tick_format`],f=r.tickMultiline&&r.isCategory&&!e&&!(r.tickWidth>0);return!!(o.state.resizing&&!o.state.flowing&&!ie(i.axis_evalTextSize)&&!u&&!r.tickTitle&&!(l&&i.axis_x_tick_autorotate)&&!f&&n.withoutTransition)}canReuseTickNodesOnResize(e,n,r,i){if(i.tick||!i.text||!this.canReuseTickTextOnResize(r)||e.size()!==n.length)return!1;const s=e.nodes();for(let o=0;o<n.length;o++){const l=s[o].__data__,c=n[o];if(l instanceof Date||c instanceof Date){if(+l!=+c)return!1}else if(l!==c)return!1}return!0}create(e){const n=this,{config:r,helper:i,params:s}=n,{scale:o}=i,{orient:l}=r,c=this.splitTickText.bind(n),u=/^(left|right)$/.test(l),f=/^(top|bottom)$/.test(l),d=i.getTickTransformSetter(f?"x":"y"),h=d===i.axisX?"y":"x",m=/^(top|left)$/.test(l)?-1:1,S=s.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():i.scaleExtent((s.orgXScale||o).range());const{innerTickSize:E,tickLength:C,range:w}=r,$=s.id,z=nl($),{isSubAxes:B}=s,W=!B&&z&&/^(x|y|y2)$/.test(z)?s.config[`axis_${z}_tick_text_position`]:{x:0,y:0},H=f2($),Q=s.config[`${H}_show`],q=B?{tick:!0,text:!0}:{tick:Q?s.config[`${H}_tick_show`]:!1,text:Q?s.config[`${H}_tick_text_show`]:!1},st=s.config.axis_evalTextSize;let it;e.each(function(){const ot=Yt(this);let ct=this.__chart__||o,gt=i.copyScale();it=ot,this.__chart__=gt,r.tickOffset=s.isCategory?(gt(1)-gt(0))/2:0;const tt=ot.selectAll(".domain").data([0]);if(tt.enter().append("path").attr("class","domain").merge(tt).attr("d",()=>{const ft=r.outerTickSize*m;return f?`M${w[0]},${ft}V0H${w[1]}V${ft}`:`M${ft},${w[0]}H0V${w[1]}H${ft}`}),q.tick||q.text){const ft=r.tickValues||i.generateTicks(gt,u||s.config.axis_rotated);n.generatedTicks=ft;let lt=ot.selectAll(".tick");if(n.canReuseTickNodesOnResize(lt,ft,u||s.config.axis_rotated,q))d(lt,gt);else{lt=lt.data(ft,gt);const St=lt.enter().insert("g",".domain").attr("class","tick"),Mt=lt.exit().remove();lt=St.merge(lt),q.tick&&St.append("line"),q.text&&St.append("text");const Ot=!St.empty()||!Mt.empty(),Kt=q.text&&!Ot&&n.canReuseTickTextOnResize(u||s.config.axis_rotated);let ee={w:0,h:0},Ae=lt.selectAll("text.__bb-empty");if(q.text&&!Kt){const Te=lt.select("text"),De=[];Ae=Te,ie(st)&&(ee=st.bind(n.params.owner.api)(Te.node(),$),this.classList.contains(ze.dummy)&&(this.sizeFor1Char=ee)),(!ee||ee.w===0||ee.h===0)&&(ee=n.helper.getSizeFor1Char(l,Te,!!st));let me=Te.selectAll("tspan").data((Pe,Zt)=>{let he;if(s.tickMultiline)he=c(Pe,gt,ft,u,ee.w);else{const ge=i.textFormatted(Pe);he=qe(ge)?ge.concat():[ge]}return De[Zt]=he.length,he.map(ge=>({index:Zt,splitted:ge}))});me.exit().remove(),me=me.enter().append("tspan").merge(me).text(Pe=>Pe.splitted),me.attr("x",f?0:C*m).attr("dx",(()=>{let Pe=0;return/(top|bottom)/.test(l)&&S&&(Pe=8*Math.sin(Math.PI*(S/180))*(l==="top"?-1:1)),Pe+(W.x||0)})()).attr("dy",(Pe,Zt)=>{const he=".71em";let ge=0;return l!=="top"&&(ge=ee.h,Zt===0&&(ge=u?-((De[Pe.index]-1)*(ee.h/2)-3):W.y===0?he:0)),ae(ge)&&W.y?ge+W.y:ge||he})}const Ee=lt.select("line");if(St.select("line").attr(`${h}2`,E*m),St.select("text").attr(h,C*m),n.setTickLineTextPosition(Ee,Ae,ee),s.tickTitle){const Te=Ae.select("title"),De=s.tickTitle;(Te.empty()?Ae.append("title"):Te).text(me=>De[Number(me)])}if(gt.bandwidth){const Te=gt,De=Te.bandwidth()/2;ct=me=>Te(me)+De,gt=ct}else ct.bandwidth?ct=gt:d(Mt,gt);lt=s.owner.state.flowing?i.transitionise(lt):s.owner.$T(lt),d(St,ct),d(lt.style("opacity",null),gt)}}}),this.g=it}getGeneratedTicks(e){var n;const r=((n=this.generatedTicks)==null?void 0:n.length)-1;let i=this.generatedTicks;if(r>e){const s=Math.round(r/e+.1);i=this.generatedTicks.map((o,l)=>l%s===0?o:null).filter(o=>o!==null).splice(0,e)}return i}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:r}=this,{innerTickSize:i,range:s}=r,o=n(e)+(r.tickCentered?0:r.tickOffset);return s[0]<o&&o<s[1]?i:0}setTickLineTextPosition(e,n,r){const i=this.getTickXY(),{innerTickSize:s,orient:o,tickLength:l,tickOffset:c}=this.config,u=this.params.id,f=this.params.tickTextRotate,d=6,h=r.h/2-d,m=z=>{const B=["start","end"];return o==="top"&&B.reverse(),z?B[z>0?0:1]:"middle"},S=z=>z?`rotate(${z})`:null,E=z=>{const B=z/(o==="bottom"?15:23);return z?11.5-2.5*B*(z>0?1:-1):l},{config:{axis_rotated:C,axis_x_tick_text_inner:w}}=this.params.owner,$=this.params.config[`axis_${nl(u)}_tick_inner`];switch(o){case"bottom":e.attr("x1",i.x).attr("x2",i.x).attr("y2",z=>this.getTickSize.bind(this)(z)*($?-1:1)),n.attr("x",0).attr("y",E(f)).style("text-anchor",(z,B,{length:W})=>!C&&B===0&&(w===!0||w.first)?"start":!C&&B===W-1&&(w===!0||w.last)?"end":m(f)).attr("transform",S(f));break;case"top":e.attr("x2",0).attr("y2",$?s:-s),n.attr("x",0).attr("y",-(E(f)+h+d)).style("text-anchor",m(f)).attr("transform",S(f));break;case"left":e.attr("x2",$?s:-s).attr("y1",i.y).attr("y2",i.y),n.attr("x",-l).attr("y",c+(C?h/4:h)).style("text-anchor","end");break;case"right":e.attr("x2",$?-s:s).attr("y2",0),n.attr("x",l).attr("y",h).style("text-anchor","start")}}splitTickText(e,n,r,i,s){const{params:o}=this,l=this.helper.textFormatted(e),c=je(l)&&l.indexOf(`
|
|
58
|
+
</foreignObject></svg>`;return`data:image/svg+xml;base64,${_O(d)}`}function tP(t,e){const{top:n,left:r}=e,{x:a,y:s}=ba(t,!0),{a:o,b:l,c,d:u,e:f,f:d}=t.getScreenCTM(),{width:h,height:v}=en(t,!0);return{x:o*a+c*s+f-r,y:l*a+u*s+d-n+(v-Math.round(v/4)),width:h,height:v}}function eP(t){const{left:e,top:n}=en(t),r=s=>s.textContent||s.childElementCount,a=[];return Rn(t.querySelectorAll("text")).filter(r).forEach(s=>{const o=l=>{const{fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}=yt.getComputedStyle(l),{x:v,y:b,width:x,height:E}=tP(l,{left:e,top:n});return{[l.textContent]:{x:v,y:b,width:x,height:E,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};s.childElementCount>1?Rn(s.querySelectorAll("tspan")).filter(r).forEach(l=>{a.push(o(l))}):a.push(o(s))}),a}function nP(t,e){e.forEach(n=>{Object.keys(n).forEach(r=>{const{x:a,y:s,width:o,height:l,fill:c,fontFamily:u,fontSize:f,transform:d}=n[r];if(t.save(),t.font=`${f} ${u}`,t.fillStyle=c,d==="none")t.fillText(r,a,s);else{const h=d.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(v=>+v==0)?(h.push(a+o-o/4),h.push(s-l+l/3)):(h.push(a),h.push(s)),t.transform(...h),t.fillText(r,0,0)}t.restore()})})}function rP(t,e,n){const{width:r,height:a}=e||n,s=Tt.createElement("canvas"),o=s.getContext("2d");if(s.width=r,s.height=a,o){let c=0,u=r,f=a;if((e==null?void 0:e.preserveAspectRatio)!==!1){const d=Math.min(r/n.width,a/n.height);u=n.width*d,f=n.height*d,c=(a-f)/2}o.drawImage(t,0,0,t.width,t.height,0,c,u,f)}return s.toDataURL(e.mimeType)}var aP={export(t,e){var n;const r=this.internal,{state:a,$el:{chart:s,svg:o}}=r,l=(n=r.canvasEngine)==null?void 0:n.canvas,c=a.isCanvasMode&&l?en(l,!0):null,{width:u,height:f}=c&&c.width&&c.height?{width:c.width,height:c.height}:a.current,d=dr(Object.create(null),{width:u,height:f,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t);if(a.isCanvasMode&&l){const b=rP(l,d,{width:u,height:f});return e==null||e.bind(this)(b),b}const h=qO(s.node(),d,{width:u,height:f}),v=d.preserveFontStyle?eP(o.node()):[];if(e&&M(e)){const b=new Image;b.crossOrigin="Anonymous",b.onload=()=>{const x=Tt.createElement("canvas"),E=x.getContext("2d");x.width=d.width||u,x.height=d.height||f,E.drawImage(b,0,0),v.length&&(nP(E,v),v.length=0),e.bind(this)(x.toDataURL(d.mimeType))},b.src=h}return h}};let bm=()=>(Gn.prototype.export=aP.export,(bm=()=>({}))());var iP={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,a=>{n=a,r()});function r(){var a,s,o,l,c;let u,f=0,d=0,h,v;if(e.state.redrawing||!n||!Ps())return;(a=e.flushCanvasFlow)==null||a.call(e);const b=[],x=e.getMaxDataCount(),E=e.convertDataToTargets(n,!0),w=e.axis.isTimeSeries(),N=!w&&e.axis.isCustomX()&&!e.axis.isCategorized(),k=w||N,B=(s=e.data.targets.find(it=>it.values.length))==null?void 0:s.values[0],G=B?B.x-B.index:0,V=it=>w?e.getOtherTargetX(it):it+G,Z=[];e.data.targets.forEach(it=>{let at=!1;for(let ot=0;ot<E.length;ot++)if(it.id===E[ot].id){at=!0,it.values[it.values.length-1]&&(d=it.values[it.values.length-1].index+1);const st=E[ot].values;f=st.length;for(let _=0;_<f;_++)st[_].index=d+_,k||(st[_].x=V(d+_)),Z[_]=st[_].x,it.values.push(st[_]);E.splice(ot,1);break}!at&&b.push(it.id)}),e.data.targets.forEach(it=>{for(let at=0;at<b.length;at++)if(it.id===b[at]){if(!it.values[it.values.length-1])continue;d=it.values[it.values.length-1].index+1;for(let ot=0;ot<f;ot++)it.values.push({id:it.id,index:d+ot,x:N?Z[ot]:V(d+ot),value:null})}}),e.data.targets.length&&E.forEach(it=>{var at;const ot=e.data.targets[0].values[0].index,st=it.values,_=st.length,lt=Math.max(d-ot,0);if(lt){st.length=_+lt;for(let nt=_-1;nt>=0;nt--)st[nt+lt]=st[nt];for(let nt=0;nt<lt;nt++){const dt=ot+nt;st[nt]={id:it.id,index:dt,x:N?(at=e.data.targets[0].values[nt])==null?void 0:at.x:V(dt),value:null}}}for(let nt=lt;nt<st.length;nt++){const dt=st[nt];dt.index+=d,k||(dt.x=V(dt.index))}});for(let it=0;it<E.length;it++)e.data.targets.push(E[it]);const Y=e.data.targets[0],et=Y.values[0];if(H(t.to)?(f=0,v=w?bn.call(e,t.to):t.to,Y.values.forEach(it=>{it.x<v&&f++})):H(t.length)&&(f=t.length),x?x===1&&w&&(h=(Y.values[Y.values.length-1].x-et.x)/2,u=[new Date(+et.x-h),new Date(+et.x+h)]):(w?h=Y.values.length>1?Y.values[Y.values.length-1].x-et.x:et.x-e.getXDomain(e.data.targets)[0]:h=1,u=[et.x-h,et.x]),u&&e.updateXDomain(null,!0,!0,!1,u),e.state.isCanvasMode){const it=L(t.duration)?t.duration:e.config.transition_duration;if((o=e.animateCanvasFlow)==null?void 0:o.call(e,{done:t.done,duration:it,length:f,orgDataCount:x}))return;f&&x&&e.data.targets.forEach(ot=>{ot.values.splice(0,f)}),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),e.updateTypesElements(),(l=e.updateCanvasFlowFocus)==null||l.call(e),(c=t.done)==null||c.call(e.api);return}e.updateTargets(e.data.targets),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({flow:{length:f,duration:L(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:x},withLegend:!0,withTransition:x>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},sP={generateFlow(t){const e=this,{config:n,data:r,state:a,$el:s}=e;return function(){var o;if(!e.$el)return;const l=t.flow.length;a.flowing=!0,r.targets.forEach(u=>{u.values.splice(0,l)}),a.dataGeneration++,e.updateXGrid&&e.updateXGrid(!0);const c={};if(["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(u=>{const f=u.split(".");let d=s[f[0]];d&&f.length>1&&(d=d[f[1]]),d!=null&&d.size()&&(c[u]=d)}),n.axis_rotated)(o=e.hideGridFocus)==null||o.call(e);else{const u=s.main.selectAll(`line.${Se.xgridFocus}:not(.${Se.xgridFocusContinuous})`);u.size()&&(c["gridFocus.x"]=u),s.main.selectAll(`line.${Se.ygridFocus}`).style("visibility","hidden")}e.setFlowList(c,t)}},setFlowList(t,e){const n=this,{flow:r,targets:a}=e,{duration:s=e.duration,orgDataCount:o}=r,l=n.getFlowTransform(a,o),c=jv();let u;c.add(Object.keys(t).map(f=>(u=t[f].transition().ease(d=>+d).duration(s),f==="axis.x"?u=u.call(d=>{n.axis.x.setTransition(d).create(d)}):f==="region.list"?u=u.filter(n.isRegionOnX).attr("transform",l):u=u.attr("transform",l),u))),u.call(c,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){var n,r;const a=this;if(!a.$el)return;const{config:s,state:o,$el:{svg:l}}=a,c=s.axis_rotated,{flow:u,shape:f,xv:d}=e,{cx:h,cy:v,xForText:b,yForText:x}=f.pos,{done:E=()=>{},length:w}=u;if(w){const N=a.isPointFocusOnly()?k=>{var B;return(B=k.parentElement)==null?void 0:B.classList.contains(Se.circles)}:()=>!1;["circle","text","shape","eventRect"].forEach(k=>{const B=[];for(let G=0;G<w;G++)B.push(`.${Se[k]}-${G}`);l.selectAll(`.${Se[`${k}s`]}`).selectAll(B).filter(function(){return!N(this)}).remove()}),l.select(`.${Se.xgrid}`).remove()}Object.keys(t).forEach(N=>{const k=t[N];if(N!=="axis.x"&&k.attr("transform",null),N==="grid.x")k.attr(o.xgridAttr);else if(N==="gridLines.x")k.attr("x1",c?0:d).attr("x2",c?o.width:d),k.select("text").attr("x",c?o.width:0).attr("y",d);else if(/^(area|bar|line)$/.test(N))k.attr("d",f.type[N]);else if(N==="text")k.attr("x",b).attr("y",x).style("fill-opacity",a.opacityForText.bind(a));else if(N==="circle")if(a.isCirclePoint())k.attr("cx",h).attr("cy",v);else{const B=V=>h(V)-s.point_r,G=V=>v(V)-s.point_r;k.attr("x",B).attr("y",G)}else N==="region.list"&&k.select("rect").filter(a.isRegionOnX).attr("x",a.regionX.bind(a)).attr("width",a.regionWidth.bind(a))}),s.interaction_enabled&&a.redrawEventRect(),o.flowing=!1,((n=a.$el.tooltip)==null?void 0:n.style("display"))==="block"?a.updateTooltipOnRedraw():(r=a.hideGridFocus)==null||r.call(a),E.call(a.api)},getFlowTransform(t,e){const n=this,{data:r,scale:{x:a}}=n,s=r.targets[0].values;let o;const l=a.domain(),c=n.updateXDomain(t,!0,!0);if(e)o=a(l[0])-a(c[0]);else if(s.length!==1)o=a(l[0])-a(c[0]);else if(n.axis.isTimeSeries()){const f=n.getValueOnIndex(s,0),d=n.getValueOnIndex(s,s.length-1);o=a(f.x)-a(d.x)}else o=W(c)/2;const u=W(l)/W(c);return`translate(${o},0) scale(${u},1)`}};let Tm=()=>(Ve(dn.prototype,sP),Gn.prototype.flow=iP.flow,(Tm=()=>({}))());function Sm(t){return Array.isArray(t)?t:[t]}function Am(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function df(t,e){const n=this.internal,{config:r}=n,a=r.transition_duration&&Ps(),s=`grid_${e}_lines`;return t?(r[s]=Sm(t),n.state.isCanvasMode?(Am(n),r[s]):(n.updateGrid(),n.redrawGrid(a),r[s])):r[s]}function Em(t,e){const n=`grid_${e}_lines`;return df.bind(this)(this.internal.config[n].concat(t?Sm(t):[]),e)}function Cm(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){const a=((n=r.getGridFilterToRemove)==null?void 0:n.call(r,t))||(()=>!0),s=`grid_${e?"x":"y"}_lines`;r.config[s]=r.config[s].filter(o=>!a(o)),Am(r);return}r.removeGridLines(t,e)}const wm=function(t){return df.bind(this)(t,"x")};Ve(wm,{add(t){return Em.bind(this)(t,"x")},remove(t){return Cm.bind(this)(t,!0)}});const Im=function(t){return df.bind(this)(t,"y")};Ve(Im,{add(t){return Em.bind(this)(t,"y")},remove(t){return Cm.bind(this)(t,!1)}});var Rm={xgrids:wm,ygrids:Im};const oP=`line.${Ke.xgridFocus}:not(.${Ke.xgridFocusContinuous}), line.${Ke.ygridFocus}`,lP=t=>L(t.position)||"end",cP=t=>t.position==="start"?4:t.position==="middle"?0:-4;function Om(t){var e;const{state:n,$el:{main:r}}=t,a=n._gridFocusEl,s=r.node(),o=((e=a==null?void 0:a.nodes)==null?void 0:e.call(a))||[];return o.length&&o.every(l=>s==null?void 0:s.contains(l))?a:n._gridFocusEl=r.selectAll(oP)}function Pm(t){t.$el.main.select(`line.${Ke.xgridFocusContinuous}`).style("visibility","hidden")}function Mm(t,e,n){return r=>{let a=t?0:e;return r.position==="start"?a=t?-n:0:r.position==="middle"&&(a=(t?-n:e)/2),a}}function Lm(t,e){e==="grid"&&t.each(function(){const n=Zt(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var uP={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:r}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g",`.${Oe.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${un.grid} ${un.gridLines}`),r.gridLines.main.append("g").attr("class",un.xgridLines),r.gridLines.main.append("g").attr("class",un.ygridLines),r.gridLines.x=Ev([]))},updateXGrid(t){const e=this,{config:n,scale:r,state:a,$el:{main:s,grid:o}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),u=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=d=>(r.zoom||r.x)(d)+u*(l?-1:1);a.xgridAttr=l?{x1:0,x2:a.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:a.height},o.x=s.select(`.${un.xgrids}`).selectAll(`.${un.xgrid}`).data(c),o.x.exit().remove(),o.x=o.x.enter().append("line").attr("class",un.xgrid).merge(o.x),t||o.x.each(function(){const d=Zt(this);Object.keys(a.xgridAttr).forEach(h=>{d.attr(h,a.xgridAttr[h])}),d.style("opacity",()=>+d.attr(l?"y1":"x1")===(l?a.height:0)?"0":null)})},updateYGrid(){const t=this,{axis:e,config:n,scale:r,state:a,$el:{grid:s,main:o}}=t,l=n.axis_rotated,c=d=>r.y(d),u=e.y.getGeneratedTicks(n.grid_y_ticks),f=u!=null&&u.length?u:t.scale.y.ticks(n.grid_y_ticks);s.y=o.select(`.${un.ygrids}`).selectAll(`.${un.ygrid}`).data(f),s.y.exit().remove(),s.y=s.y.enter().append("line").attr("class",un.ygrid).merge(s.y),s.y.attr("x1",l?c:0).attr("x2",l?c:a.width).attr("y1",l?0:c).attr("y2",l?a.height:c),Lm(s.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:r,main:a},$T:s}=e,o=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=a.select(`.${un[`${t}gridLines`]}`).selectAll(`.${un[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);s(c.exit()).style("opacity","0").remove();const u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(f){const d=Zt(this);d.select("text").empty()&&f.text&&d.append("text").style("opacity","0")}),s(c.attr("class",f=>`${un[`${t}gridLine`]} ${f.class||""}`.trim()).select("text").attr("text-anchor",lP).attr("transform",()=>l?o?null:"rotate(-90)":o?"rotate(-90)":null).attr("dx",cP).attr("dy",-5)).text(function(f){var d;return(d=f.text)!=null?d:this.remove()}),r[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:r,height:a},$el:{gridLines:s},$T:o}=e,l=e.xv.bind(e),c=e.yv.bind(e);let u=s.x.select("line"),f=s.x.select("text"),d=s.y.select("line"),h=s.y.select("text");return u=o(u,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:a),f=o(f,t).attr("x",Mm(!n,r,a)).attr("y",l),d=o(d,t).attr("x1",n?c:0).attr("x2",n?c:r).attr("y1",n?0:c).attr("y2",n?a:c),h=o(h,t).attr("x",Mm(n,r,a)).attr("y",c),[u.style("opacity",null),f.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:n,state:{clip:r},$el:a}=t;n._gridFocusEl=null;const s=e.grid_front,o=`.${s&&a.gridLines.main?un.gridLines:Oe.chart}${s?" + *":""}`,l=a.main.insert("g",o).attr("clip-path",r.pathGrid).attr("class",un.grid);if(a.grid.main=l,e.grid_x_show&&l.append("g").attr("class",un.xgrids),e.grid_y_show&&l.append("g").attr("class",un.ygrids),e.axis_tooltip){const c=l.append("g").attr("class","bb-axis-tooltip");c.append("line").attr("class","bb-axis-tooltip-x"),c.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(l.append("g").attr("class",Ke.xgridFocus).append("line").attr("class",Ke.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",Ke.ygridFocus).append("line").attr("class",Ke.ygridFocus),e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&a.main.insert("g",o).attr("class",Ke.xgridFocusContinuous).append("line").attr("class",`${Ke.xgridFocus} ${Ke.xgridFocusContinuous}`).style("visibility","hidden"))},showAxisGridFocus(){var t,e;const n=this,{config:r,format:a,state:{event:s,width:o,height:l}}=n,c=r.axis_rotated,[u,f]=Zn(s,(t=n.$el.eventRect)==null?void 0:t.node()),d={x:u,y:f};for(const[h,v]of Object.entries(n.$el.axisTooltip)){const b=h==="x"&&!c||h!=="x"&&c?"x":"y",x=d[b];let E=(e=n.scale[h])==null?void 0:e.invert(x);E&&(E=h==="x"&&n.axis.isTimeSeries()?a.xAxisTick(E):E==null?void 0:E.toFixed(2),v==null||v.attr(b,x).text(E))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,v){const b=Zt(this);v===0?b.attr("x1",u).attr("x2",u).attr("y1",v?0:l).attr("y2",v?l:0):b.attr("x1",v?0:o).attr("x2",v?o:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll(`line.${yn.axisTooltipX}, line.${yn.axisTooltipY}`).style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:r,state:{width:a,height:s}}=n,o=r.axis_rotated,l=Om(n),c=(t||[l.datum()]).filter(d=>d&&L(n.getBaseValue(d)));if(!r.tooltip_show||c.length===0||!r.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const u=r.grid_focus_edge&&!r.tooltip_grouped,f=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(d){const h=Zt(this),v={x:f(d),y:n.getYScaleById(d.id)(d.value)};let b;if(h.classed(Ke.xgridFocus))b=o?[null,v.x,u?v.y:a,v.x]:[v.x,u?v.y:null,v.x,s];else{const x=n.axis.getId(d.id)==="y2";b=o?[v.y,u&&!x?v.x:null,v.y,u&&x?v.x:s]:[u&&x?v.x:null,v.y,u&&!x?v.x:a,v.y]}["x1","y1","x2","y2"].forEach((x,E)=>h.attr(x,b[E]))}),Lm(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(t=!1){var e;const n=this,{state:{inputType:r,resizing:a}}=n;(t||r==="mouse"||!a)&&(Om(n).style("visibility","hidden"),Pm(n),(e=n.hideCircleFocus)==null||e.call(n))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:r,height:a,resizing:s},$el:{grid:o}}=e,l=o.main.select(`line.${Ke.xgridFocus}`);if(n==="touch")l.empty()?s&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?r:-10).attr("y1",c?-10:0).attr("y2",c?-10:a),Pm(e)}return!0},generateGridData(t,e){const n=this,r=n.$el.main.select(`.${yn.axisX}`).selectAll(".tick").size();let a=[];if(t==="year"){const s=n.getXDomain(n.data.targets),[o,l]=s.map(c=>c.getFullYear());for(let c=o;c<=l;c++)a.push(new Date(`${c}-01-01 00:00:00`))}else a=e.ticks(Rr),a.length>r&&(a=a.filter(s=>String(s).indexOf(".")<0));return a},getGridFilterToRemove(t){return t?e=>{let n=!1;return(q(t)?t.concat():[t]).forEach(r=>{("value"in r&&e.value===r.value||"class"in r&&e.class===r.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:r,$T:a}=n,s=n.getGridFilterToRemove(t),o=f=>!s(f),l=e?un.xgridLines:un.ygridLines,c=e?un.xgridLine:un.ygridLine;a(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(s)).style("opacity","0").remove();const u=`grid_${e?"x":"y"}_lines`;r[u]=r[u].filter(o)}},fP={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0};let Dm=()=>(Ve(dn.prototype,uP),Gn.prototype.xgrids=Rm.xgrids,Gn.prototype.ygrids=Rm.ygrids,Br.setOptions([fP]),(Dm=()=>({}))());function Fm(t,e,n,r){const a=this,{config:s,$el:{main:o}}=a,l=s.data_selection_grouped,c=s.data_selection_isselectable.bind(a.api),u=H(e)?[].concat(e):null,f=t&&!s.data_selection_multiple;let d=!f;const h=(v,b,x)=>{a.unselectPoint(v,b,x),v.interrupt().remove()};a.getTargetsToShow().forEach(v=>{const{id:b}=v,x=l||!u||u.indexOf(b)>=0,E=o.select(`.${_e.selectedCircles}${a.getTargetSelectorSuffix(b)}`);v.values.forEach(w=>{const{index:N}=w,k=!n||n.indexOf(N)>=0,B=E.selectAll(`.${_e.selectedCircle}-${N}`),G=!B.empty();t?x&&k&&c(w)&&(!G||f)?(d||(Fm.call(a,!1),d=!0),a.selectPoint(null,w,N)):(!f||d)&&H(r)&&r&&G&&h(B,w,N):x&&k&&G&&h(B,w,N)})})}function hf(t=!1,e,n,r){var a;const s=this,{config:o,$el:{main:l}}=s,c=o.data_selection_grouped,u=o.data_selection_isselectable.bind(s.api),f=t&&!o.data_selection_multiple;let d=!f;if(o.data_selection_enabled){if(f&&(n=n!=null&&n.length?[n[0]]:[0],c||(e=(H(e)?[].concat(e):s.getTargetsToShow().map(v=>v.id)).slice(0,1))),(a=s.isPointFocusOnly)!=null&&a.call(s)){Fm.call(s,t,e,n,r);return}l.selectAll(`.${nn.shapes}`).selectAll(`.${nn.shape}`).each(function(h){const v=Zt(this),{id:b,index:x}=h.data?h.data:h,E=c||!e||e.indexOf(b)>=0,w=!n||n.indexOf(x)>=0;if(v.classed($r.line)||v.classed(Yo.area))return;const N=s.getToggle(this,h).bind(s),k=v.classed(_e.SELECTED);t?E&&w&&u(h)&&(!k||f)?(d||(hf.call(s,!1),d=!0),!v.classed(_e.SELECTED)&&N(!0,v.classed(_e.SELECTED,!0),h,x)):(!f||d)&&H(r)&&r&&k&&N(!1,v.classed(_e.SELECTED,!1),h,x):E&&w&&u(h)&&k&&N(!1,v.classed(_e.SELECTED,!1),h,x)})}}var dP={selected(t){var e,n;const r=this.internal,a=[];return r.state.isCanvasMode?((e=r.getCanvasSelectedData)==null?void 0:e.call(r,t))||a:(n=r.isPointFocusOnly)!=null&&n.call(r)?(r.$el.main.selectAll(`.${_e.selectedCircles+r.getTargetSelectorSuffix(t)}`).selectAll(`.${_e.selectedCircle}`).each(s=>a.push(s)),a):(r.$el.main.selectAll(`.${nn.shapes+r.getTargetSelectorSuffix(t)}`).selectAll(`.${nn.shape}`).filter(function(){return Zt(this).classed(_e.SELECTED)}).each(s=>a.push(s)),a)},select(t,e,n){var r;const a=this.internal;if(a.state.isCanvasMode){(r=a.setCanvasSelection)==null||r.call(a,!0,t,e,n);return}hf.bind(a)(!0,t,e,n)},unselect(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){(n=r.setCanvasSelection)==null||n.call(r,!1,t,e);return}hf.bind(r)(!1,t,e)}},hP={drag(t){const e=this,{config:n,state:r,$el:{main:a}}=e,s=n.data_selection_grouped,o=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=r.dragStart||[0,0],[u,f]=t,d=Math.min(l,u),h=Math.max(l,u),v=s?r.margin.top:Math.min(c,f),b=s?r.height:Math.max(c,f),x=()=>{!e||!e.$el||!e.$el.main||(a.select(`.${Ha.dragarea}`).attr("x",d).attr("y",v).attr("width",h-d).attr("height",b-v),a.selectAll(`.${nn.shapes}`).selectAll(`.${nn.shape}`).filter(E=>o==null?void 0:o.bind(e.api)(E)).each(function(E,w){const N=Zt(this),k=N.classed(_e.SELECTED),B=N.classed(Ha.INCLUDED);let G,V;if(N.classed(Ln.circle)){const Z=+N.attr("cx"),Y=+N.attr("cy");V=e.togglePoint,G=d<Z&&Z<h&&v<Y&&Y<b}else if(N.classed(tr.bar)){const{x:Z,y:Y,width:et,height:it}=Hv(this);V=e.togglePath,G=!(h<Z||Z+et<d)&&!(b<Y||Y+it<v)}else return;G^B&&(N.classed(Ha.INCLUDED,!B),N.classed(_e.SELECTED,!k),V.call(e,!k,N,E,w))}))};Vv(e.state,x)},dragstart(t){const e=this,{config:n,state:r,$el:{main:a}}=e;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,a.select(`.${Oe.chart}`).append("rect").attr("class",Ha.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend(){const t=this,{config:e,$el:{main:n},$T:r}=t;t.hasArcType()||!e.data_selection_enabled||(r(n.select(`.${Ha.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${nn.shape}`).classed(Ha.INCLUDED,!1),t.setDragStatus(!1))}},gP=Object.defineProperty,vP=Object.defineProperties,pP=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,mP=Object.prototype.hasOwnProperty,yP=Object.prototype.propertyIsEnumerable,$m=(t,e,n)=>e in t?gP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xP=(t,e)=>{for(var n in e||(e={}))mP.call(e,n)&&$m(t,n,e[n]);if(Nm)for(var n of Nm(e))yP.call(e,n)&&$m(t,n,e[n]);return t},bP=(t,e)=>vP(t,pP(e)),TP=bP(xP({},hP),{selectPoint(t,e,n){const r=this,{config:a,$el:{main:s},$T:o}=r,l=a.axis_rotated,c=(l?r.circleY:r.circleX).bind(r),u=(l?r.circleX:r.circleY).bind(r),f=r.pointSelectR.bind(r);se(a.data_onselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${_e.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${_e.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>r.generateClass(_e.selectedCircle,n)).attr("cx",c).attr("cy",u).attr("stroke",r.color).attr("r",d=>r.pointSelectR(d)*1.4)).attr("r",f)},unselectPoint(t,e,n){const r=this,{config:a,$el:{main:s},$T:o}=r;se(a.data_onunselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${_e.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${_e.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,r){this[`${t?"":"un"}selectPoint`](e,n,r)},selectPath(t,e){const n=this,{config:r}=n;se(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:r}=n;se(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,r){this[`${t?"":"un"}selectPath`](e,n,r)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var r;const a=this,{config:s,$el:{main:o}}=a;if(s.data_selection_enabled&&s.data_selection_isselectable.bind(a.api)(e)){const l=Zt(t),c=l.classed(_e.SELECTED),u=a.getToggle(t,e).bind(a);let f;if(!s.data_selection_multiple){const d=(r=a.isPointFocusOnly)==null?void 0:r.call(a);let h=`.${d?_e.selectedCircles:nn.shapes}`;s.data_selection_grouped&&(h+=a.getTargetSelectorSuffix(e.id)),o.selectAll(h).selectAll(d?`.${_e.selectedCircle}`:`.${nn.shape}.${_e.SELECTED}`).classed(_e.SELECTED,!1).each(function(v){const b=Zt(this);f=b,u(!1,b,v,v.index)})}(!f||f.node()!==l.node())&&(l.classed(_e.SELECTED,!c),u(!c,l,e,n))}}}),SP={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}};let Bm=()=>(Ve(dn.prototype,TP),Ve(Gn.prototype,dP),Br.setOptions([SP]),(Bm=()=>!0)());const km=function(t){var e,n,r;const a=this.internal,{axis:s,brush:o,config:l,scale:{x:c,subX:u},state:f}=a;let d;return f.isCanvasMode?(l.subchart_show&&(d=t,Array.isArray(d)?(d=s.isTimeSeries()?d.map(h=>bn.bind(a)(h)):d,d=((e=a.setCanvasSubchartDomain)==null?void 0:e.call(a,d))||f.domain):d=(n=f.domain)!=null?n:c.orgDomain()),d):(l.subchart_show&&(d=t,Array.isArray(d)?(s.isTimeSeries()&&(d=d.map(v=>bn.bind(a)(v))),a.withinRange(d,a.getZoomDomain("subX",!0),a.getZoomDomain("subX"))&&(f.domain=d.slice(),o.move(o.getSelection(),d.map(u)))):d=(r=f.domain)!=null?r:c.orgDomain()),d)};Ve(km,{show(){var t,e,n;const r=this.internal,{$el:{subchart:a},config:s}=r,o=s.subchart_show;if(!o){if(r.state.isCanvasMode){(t=r.unbindZoomEvent)==null||t.call(r),s.subchart_show=!0,this.resize();return}r.unbindZoomEvent(),s.subchart_show=!o,!a.main&&r.initSubchart();let l=a.main.selectAll(`.${Oe.target}`);r.data.targets.length!==l.size()&&(r.updateSizes(),r.updateTargetsForSubchart(r.data.targets),l=(e=a.main)==null?void 0:e.selectAll(`.${Oe.target}`)),l==null||l.style("opacity",null),(n=a.main)==null||n.style("display",null),this.resize()}},hide(){var t;const e=this.internal,{$el:{subchart:{main:n}},config:r}=e;if(e.state.isCanvasMode){r.subchart_show&&(r.subchart_show=!1,this.resize(),(t=e.bindZoomEvent)==null||t.call(e));return}r.subchart_show&&(n==null?void 0:n.style("display"))!=="none"&&(r.subchart_show=!1,n.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){var t;const e=this.internal,{brush:n}=e;if(e.state.isCanvasMode){(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1);return}n.clear(n.getSelection())}});var AP={subchart:km};const zm=["bar","line","bubble","candlestick","scatter"],EP=["opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width"];function Um(t,e){var n,r;const a=(r=(n=t.$el.grid)==null?void 0:n.main)==null?void 0:r.select(`line.${Se.xgridFocus}`).node();if(!a||!yt.getComputedStyle)return;const s=yt.getComputedStyle(a);EP.forEach(o=>{const l=s.getPropertyValue(o);l&&e.style(o,l)})}function $i(t,e){const n=Number(t);return Number.isFinite(n)?n:e}function CP(t){var e,n;if(!O(t))return!1;const{config:r,state:a,$el:s}=t,o=(n=(e=s.grid)==null?void 0:e.main)==null?void 0:n.select(`line.${Se.xgridFocus}:not(.${Se.xgridFocusContinuous})`),l=s.main.select(`line.${Se.xgridFocusContinuous}`);if(!(o!=null&&o.node())||!l.node())return!1;const c=a.margin2.left-a.margin.left+a.width2,u=a.margin2.top-a.margin.top+a.height2;return Um(t,l),r.axis_rotated?l.attr("x1",$i(o.attr("x1"),0)).attr("x2",c).attr("y1",$i(o.attr("y1"),-10)).attr("y2",$i(o.attr("y2"),-10)):l.attr("x1",$i(o.attr("x1"),-10)).attr("x2",$i(o.attr("x2"),-10)).attr("y1",$i(o.attr("y1"),0)).attr("y2",u),l.style("visibility",null),o.style("visibility","hidden"),!0}function wP(t){var e;(e=t.$el.main)==null||e.select(`line.${Se.xgridFocusContinuous}`).style("visibility","hidden")}function IP(t,e,n){const{config:r,state:a}=t,[s,o]=Zn(e,n),l=F(t,r.axis_rotated?o:s);return l===null?null:r.axis_rotated?[a.width/2,l]:[l,a.height/2]}function gf(t,e,n,r){var a,s;const o=(s=(a=t.$el.eventRect)==null?void 0:a.node)==null?void 0:s.call(a);if(!o)return;const l=IP(t,n,r)||[0,0],c=en(o,!0),u=c.left+l[0],f=c.top+l[1],d={bubbles:!0,cancelable:!0,screenX:u,screenY:f,clientX:u,clientY:f};/^touch/.test(e)?Ru.touch(o,e,d):Ru.mouse(o,e,d)}var RP={isSubchartBrushEnabled(){const{config:t}=this;return t.subchart_show&&t.subchart_brush_enabled!==!1},bindSubchartEventRect(t){const e=this,{config:n,state:r}=e;t.on("mouseover mousemove mouseout touchstart touchmove touchend",null),n.interaction_enabled&&(r.inputType==="mouse"?t.on("mouseover mousemove",function(a){e.isSubchartBrushEnabled()||gf(e,a.type,a,this)}).on("mouseout",function(a){e.isSubchartBrushEnabled()||gf(e,"mouseout",a,this)}):r.inputType==="touch"&&t.on("touchstart touchmove touchend",function(a){var s;e.isSubchartBrushEnabled()||((s=a.touches)==null?void 0:s.length)>1||gf(e,a.type,a,this)}))},initBrush(){const t=this,{config:e,scale:n,$el:{subchart:r},state:a}=t,s=e.axis_rotated,o=e.subchart_size_height;let l,c,u;t.brush=(s?VI():XI()).handleSize(5),t.brush.on("start brush end",f=>{const{selection:d,sourceEvent:h,target:v,type:b}=f;b==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=h?d:null),/(start|brush)/.test(b)&&(b==="brush"&&h&&a.domain&&(c==null||c.forEach((x,E)=>{x!==d[E]&&(a.domain[E]=n.x.orgDomain()[E])})),t.redrawForBrush(b!=="start")),b==="end"&&(l=n.x.orgDomain()),v!=null&&v.handle&&(d===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(x,E)=>{const w=[d[E],o/2];return`translate(${s?w.reverse():w})`}))}),t.brush.updateResize=function(){u&&clearTimeout(u),u=setTimeout(()=>{const f=this.getSelection();l&&Cp(f.node())&&this.move(f,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var f;return this.extent()()[1].filter(h=>isNaN(h)).length===0&&((f=r.main)==null||f.select(`.${Se.brush}`).call(this)),this},t.brush.scale=function(f){const d=e.subchart_size_height;let h=t.axis.getExtent();!h&&f.range?h=[[0,0],[f.range()[1],d]]:q(h)&&(h=h.map((v,b)=>[v,b>0?d:b])),s&&h[1].reverse(),this.extent(h),this.update()},t.brush.getSelection=()=>r.main?r.main.select(`.${Se.brush}`):Zt([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:r},$el:{defs:a,svg:s,subchart:o,axis:l}}=t;if(!r)return;const c=e.subchart_show?null:"hidden",u=`${n.id}-subchart`,f=t.getClipPath(u);n.idSubchart=u,t.appendClip(a,u),t.initBrush(),o.main=s.append("g").classed(Se.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=o;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",Se.chart),t.withSubchartTypeContext(()=>{zm.forEach(v=>{const b=Ze(/^(bubble|scatter)$/.test(v)?"circle":v);if(t.hasType(v)||t.hasTypeOf(b)){const x=d.select(`.${Se.chart}`),E=Se[`chart${b}s`];x.select(`.${E}`).empty()&&x.append("g").attr("class",E)}})});const h=d.append("g").attr("clip-path",f).attr("class",Se.brush).style("pointer-events",t.isSubchartBrushEnabled()?null:"none").call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),o.eventRect=d.append("g").attr("clip-path",f).attr("class",`${Se.eventRects} ${Se.eventRects}-subchart`).style("fill-opacity","0").style("pointer-events",t.isSubchartBrushEnabled()?"none":"all").append("rect").attr("class",`${Se.eventRect} ${Se.eventRect}-subchart`).attr("width",t.state.width2).attr("height",t.state.height2),t.bindSubchartEventRect(o.eventRect),d.append("g").attr("clip-path",f).attr("class",Se.xgridFocus).append("line").attr("class",Se.xgridFocus).style("visibility","hidden"),l.subX=d.append("g").attr("class",Se.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden"),l.subY=d.append("g").attr("class",Se.axisY).attr("transform",t.getTranslate("subY")).style("visibility",e.subchart_axis_y_show?c:"hidden"),l.subY2=d.append("g").attr("class",Se.axisY2).attr("transform",t.getTranslate("subY2")).style("visibility",e.subchart_axis_y2_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,r=n.axis_rotated,a=n.subchart_init_range,s="handle--custom",o=Ld[r?"y":"x"];e.brush.handle=t.selectAll(`.${s}`).data(r?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",s).attr("cursor",`${r?"ns":"ew"}-resize`).attr("d",l=>o[/[se]/.test(l.type)?"end":"start"]).attr("display",a?null:"none")},updateTargetsForSubchart(t){var e;const n=this,{config:r,state:a,$el:{subchart:{main:s}}}=n;r.subchart_show&&(n.withSubchartTypeContext(()=>{zm.filter(o=>n.hasType(o)||n.hasTypeOf(Ze(o))).forEach(o=>{const l=/^(bubble|scatter)$/.test(o),c=Ze(l?"circle":o),u=n.getChartClass(c,!0),f=n.getClass(l?"circles":`${o}s`,!0),d=s.select(`.${Se[`chart${`${c}s`}`]}`);if(l){const h=d.selectAll(`.${Se.circles}`).data(t.filter(n[`is${Ze(o)}Type`].bind(n))).attr("class",f);h.exit().remove(),h.enter().append("g").attr("class",f)}else{const h=d.selectAll(`.${Se[`chart${c}`]}`).attr("class",u).data(t.filter(n[`is${c}Type`].bind(n))),v=h.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",f);h.exit().remove(),o==="line"&&n.hasTypeOf("Area")&&v.append("g").attr("class",n.getClass("areas",!0))}})}),s.selectAll(`.${Se.brush} rect`).attr(r.axis_rotated?"width":"height",r.axis_rotated?a.width2:a.height2),(e=n.$el.subchart.eventRect)==null||e.attr("width",a.width2).attr("height",a.height2).style("pointer-events",n.isSubchartBrushEnabled()?"none":"all"))},updateSubchartYDomain(t){var e,n;const r=this,{scale:a}=r,s=t||r.filterTargetsToShow(r.data.targets);(e=a.subY)==null||e.domain(r.getYDomain(s,"y")),(n=a.subY2)==null||n.domain(r.getYDomain(s,"y2"))},redrawSubchart(t,e){var n,r,a,s;const o=this,{config:l,$el:{subchart:{main:c}},state:u}=o,f=!!e;if(c.style("visibility",l.subchart_show?null:"hidden"),c.select(`.${Se.brush}`).style("pointer-events",o.isSubchartBrushEnabled()?null:"none"),(n=o.$el.subchart.eventRect)==null||n.style("pointer-events",o.isSubchartBrushEnabled()?"none":"all"),(r=o.$el.axis.subY)==null||r.style("visibility",l.subchart_axis_y_show?null:"hidden"),(a=o.$el.axis.subY2)==null||a.style("visibility",l.subchart_axis_y2_show?null:"hidden"),l.subchart_show&&(((s=u.event)==null?void 0:s.type)==="zoom"&&o.brush.update(),t)){const d=l.subchart_init_range;!Ip(o)&&o.brush.update(),o.withSubchartTypeContext(()=>{const h=u._targetsToShow||o.filterTargetsToShow(o.data.targets);o.updateSubchartYDomain(h);const v=o.getDrawShape();if(Object.keys(v.type).forEach(b=>{const x=Ze(b),E=o[`generateDraw${x}`](v.indices[b],!0);o[`update${x}`](f,!0),o[`redraw${x}`](E,f,!0)}),o.hasType("bubble")||o.hasType("scatter")){const{cx:b}=v.pos,x=o.updateCircleY(!0);o.updateCircle(!0),o.redrawCircle(b,x,f,void 0,!0)}}),!u.rendered&&d&&(u.domain=d,o.brush.move(o.brush.getSelection(),d.map(o.scale.x)))}},showSubchartGridFocus(t){const e=this,{config:n,state:r,$el:{subchart:{main:a}}}=e;if(!a||!n.subchart_show||e.isSubchartBrushEnabled()||n.grid_focus_show===!1||n.subchart_grid_focus===!1||!n.tooltip_show||n.axis_tooltip)return;const o=(Array.isArray(t)?t:[t]).find(u=>u&&e.getBaseValue(u)!=null);if(!o){e.hideSubchartGridFocus();return}const l=e.scale.subX(o.x);if(!Number.isFinite(l)){e.hideSubchartGridFocus();return}const c=a.select(`g.${Se.xgridFocus} line.${Se.xgridFocus}`);if(CP(e)){c.style("visibility","hidden");return}Um(e,c),n.axis_rotated?c.attr("x1",0).attr("x2",r.width2).attr("y1",l).attr("y2",l):c.attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",r.height2),c.style("visibility",null)},hideSubchartGridFocus(){var t;wP(this),(t=this.$el.subchart.main)==null||t.select(`g.${Se.xgridFocus} line.${Se.xgridFocus}`).style("visibility","hidden")},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:r,zoom_rescale:a},scale:s,state:o}=n;n.redraw({withTransition:!1,withY:a,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&o.rendered&&r.bind(n.api)((e=o.domain)!=null?e:s.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:r},$T:a}=n,s=e!=null&&e.axisSubX?e.axisSubX:a(r.main.select(`.${Se.axisX}`),t),o=e!=null&&e.axisSubY?e.axisSubY:a(r.main.select(`.${Se.axisY}`),t),l=e!=null&&e.axisSubY2?e.axisSubY2:a(r.main.select(`.${Se.axisY2}`),t);r.main.attr("transform",n.getTranslate("context")),s.attr("transform",n.getTranslate("subX")),o.attr("transform",n.getTranslate("subY")),l.attr("transform",n.getTranslate("subY2"))}},OP={subchart_show:!1,subchart_type:void 0,subchart_types:{},subchart_brush_enabled:!0,subchart_showHandle:!1,subchart_size_height:60,subchart_grid_focus:!0,subchart_grid_focus_continuous:!1,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_count:void 0,subchart_axis_x_tick_values:void 0,subchart_axis_x_tick_culling:void 0,subchart_axis_x_tick_culling_max:void 0,subchart_axis_x_tick_culling_lines:void 0,subchart_axis_x_tick_culling_reverse:void 0,subchart_axis_x_tick_outer:void 0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_axis_y_show:!1,subchart_axis_y_tick_show:!0,subchart_axis_y_tick_count:void 0,subchart_axis_y_tick_values:void 0,subchart_axis_y_tick_culling:void 0,subchart_axis_y_tick_culling_max:void 0,subchart_axis_y_tick_culling_lines:void 0,subchart_axis_y_tick_culling_reverse:void 0,subchart_axis_y_tick_outer:void 0,subchart_axis_y_tick_format:void 0,subchart_axis_y_tick_text_show:!0,subchart_axis_y2_show:!1,subchart_axis_y2_tick_show:!0,subchart_axis_y2_tick_count:void 0,subchart_axis_y2_tick_values:void 0,subchart_axis_y2_tick_culling:void 0,subchart_axis_y2_tick_culling_max:void 0,subchart_axis_y2_tick_culling_lines:void 0,subchart_axis_y2_tick_culling_reverse:void 0,subchart_axis_y2_tick_outer:void 0,subchart_axis_y2_tick_format:void 0,subchart_axis_y2_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}};let Wm=()=>(Ve(dn.prototype,RP),Ve(Gn.prototype,AP),Br.setOptions([OP]),(Wm=()=>!0)());var yl=t=>()=>t;function PP(t,{sourceEvent:e,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function na(t,e,n){this.k=t,this.x=e,this.y=n}na.prototype={constructor:na,scale:function(t){return t===1?this:new na(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new na(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var cr=new na(1,0,0);vf.prototype=na.prototype;function vf(t){for(;!t.__zoom;)if(!(t=t.parentNode))return cr;return t.__zoom}function pf(t){t.stopImmediatePropagation()}function Ws(t){t.preventDefault(),t.stopImmediatePropagation()}function MP(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function LP(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Gm(){return this.__zoom||cr}function DP(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function FP(){return navigator.maxTouchPoints||"ontouchstart"in this}function NP(t,e,n){var r=t.invertX(e[0][0])-n[0][0],a=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function $P(){var t=MP,e=LP,n=NP,r=DP,a=FP,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=q1,u=_o("start","zoom","end"),f,d,h,v=500,b=150,x=0,E=10;function w(_){_.property("__zoom",Gm).on("wheel.zoom",Y,{passive:!1}).on("mousedown.zoom",et).on("dblclick.zoom",it).filter(a).on("touchstart.zoom",at).on("touchmove.zoom",ot).on("touchend.zoom touchcancel.zoom",st).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(_,lt,nt,dt){var bt=_.selection?_.selection():_;bt.property("__zoom",Gm),_!==bt?G(_,lt,nt,dt):bt.interrupt().each(function(){V(this,arguments).event(dt).start().zoom(null,typeof lt=="function"?lt.apply(this,arguments):lt).end()})},w.scaleBy=function(_,lt,nt,dt){w.scaleTo(_,function(){var bt=this.__zoom.k,At=typeof lt=="function"?lt.apply(this,arguments):lt;return bt*At},nt,dt)},w.scaleTo=function(_,lt,nt,dt){w.transform(_,function(){var bt=e.apply(this,arguments),At=this.__zoom,Et=nt==null?B(bt):typeof nt=="function"?nt.apply(this,arguments):nt,Rt=At.invert(Et),Vt=typeof lt=="function"?lt.apply(this,arguments):lt;return n(k(N(At,Vt),Et,Rt),bt,o)},nt,dt)},w.translateBy=function(_,lt,nt,dt){w.transform(_,function(){return n(this.__zoom.translate(typeof lt=="function"?lt.apply(this,arguments):lt,typeof nt=="function"?nt.apply(this,arguments):nt),e.apply(this,arguments),o)},null,dt)},w.translateTo=function(_,lt,nt,dt,bt){w.transform(_,function(){var At=e.apply(this,arguments),Et=this.__zoom,Rt=dt==null?B(At):typeof dt=="function"?dt.apply(this,arguments):dt;return n(cr.translate(Rt[0],Rt[1]).scale(Et.k).translate(typeof lt=="function"?-lt.apply(this,arguments):-lt,typeof nt=="function"?-nt.apply(this,arguments):-nt),At,o)},dt,bt)};function N(_,lt){return lt=Math.max(s[0],Math.min(s[1],lt)),lt===_.k?_:new na(lt,_.x,_.y)}function k(_,lt,nt){var dt=lt[0]-nt[0]*_.k,bt=lt[1]-nt[1]*_.k;return dt===_.x&&bt===_.y?_:new na(_.k,dt,bt)}function B(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function G(_,lt,nt,dt){_.on("start.zoom",function(){V(this,arguments).event(dt).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(dt).end()}).tween("zoom",function(){var bt=this,At=arguments,Et=V(bt,At).event(dt),Rt=e.apply(bt,At),Vt=nt==null?B(Rt):typeof nt=="function"?nt.apply(bt,At):nt,ae=Math.max(Rt[1][0]-Rt[0][0],Rt[1][1]-Rt[0][1]),re=bt.__zoom,ve=typeof lt=="function"?lt.apply(bt,At):lt,xe=c(re.invert(Vt).concat(ae/re.k),ve.invert(Vt).concat(ae/ve.k));return function(ge){if(ge===1)ge=ve;else{var Le=xe(ge),Yt=ae/Le[2];ge=new na(Yt,Vt[0]-Le[0]*Yt,Vt[1]-Le[1]*Yt)}Et.zoom(null,ge)}})}function V(_,lt,nt){return!nt&&_.__zooming||new Z(_,lt)}function Z(_,lt){this.that=_,this.args=lt,this.active=0,this.sourceEvent=null,this.extent=e.apply(_,lt),this.taps=0}Z.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,lt){return this.mouse&&_!=="mouse"&&(this.mouse[1]=lt.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=lt.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=lt.invert(this.touch1[0])),this.that.__zoom=lt,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var lt=Zt(this.that).datum();u.call(_,this.that,new PP(_,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:u}),lt)}};function Y(_,...lt){if(!t.apply(this,arguments))return;var nt=V(this,lt).event(_),dt=this.__zoom,bt=Math.max(s[0],Math.min(s[1],dt.k*Math.pow(2,r.apply(this,arguments)))),At=qn(_);if(nt.wheel)(nt.mouse[0][0]!==At[0]||nt.mouse[0][1]!==At[1])&&(nt.mouse[1]=dt.invert(nt.mouse[0]=At)),clearTimeout(nt.wheel);else{if(dt.k===bt)return;nt.mouse=[At,dt.invert(At)],Mi(this),nt.start()}Ws(_),nt.wheel=setTimeout(Et,b),nt.zoom("mouse",n(k(N(dt,bt),nt.mouse[0],nt.mouse[1]),nt.extent,o));function Et(){nt.wheel=null,nt.end()}}function et(_,...lt){if(h||!t.apply(this,arguments))return;var nt=_.currentTarget,dt=V(this,lt,!0).event(_),bt=Zt(_.view).on("mousemove.zoom",Vt,!0).on("mouseup.zoom",ae,!0),At=qn(_,nt),Et=_.clientX,Rt=_.clientY;Fu(_.view),pf(_),dt.mouse=[At,this.__zoom.invert(At)],Mi(this),dt.start();function Vt(re){if(Ws(re),!dt.moved){var ve=re.clientX-Et,xe=re.clientY-Rt;dt.moved=ve*ve+xe*xe>x}dt.event(re).zoom("mouse",n(k(dt.that.__zoom,dt.mouse[0]=qn(re,nt),dt.mouse[1]),dt.extent,o))}function ae(re){bt.on("mousemove.zoom mouseup.zoom",null),Nu(re.view,dt.moved),Ws(re),dt.event(re).end()}}function it(_,...lt){if(t.apply(this,arguments)){var nt=this.__zoom,dt=qn(_.changedTouches?_.changedTouches[0]:_,this),bt=nt.invert(dt),At=nt.k*(_.shiftKey?.5:2),Et=n(k(N(nt,At),dt,bt),e.apply(this,lt),o);Ws(_),l>0?Zt(this).transition().duration(l).call(G,Et,dt,_):Zt(this).call(w.transform,Et,dt,_)}}function at(_,...lt){if(t.apply(this,arguments)){var nt=_.touches,dt=nt.length,bt=V(this,lt,_.changedTouches.length===dt).event(_),At,Et,Rt,Vt;for(pf(_),Et=0;Et<dt;++Et)Rt=nt[Et],Vt=qn(Rt,this),Vt=[Vt,this.__zoom.invert(Vt),Rt.identifier],bt.touch0?!bt.touch1&&bt.touch0[2]!==Vt[2]&&(bt.touch1=Vt,bt.taps=0):(bt.touch0=Vt,At=!0,bt.taps=1+!!f);f&&(f=clearTimeout(f)),At&&(bt.taps<2&&(d=Vt[0],f=setTimeout(function(){f=null},v)),Mi(this),bt.start())}}function ot(_,...lt){if(this.__zooming){var nt=V(this,lt).event(_),dt=_.changedTouches,bt=dt.length,At,Et,Rt,Vt;for(Ws(_),At=0;At<bt;++At)Et=dt[At],Rt=qn(Et,this),nt.touch0&&nt.touch0[2]===Et.identifier?nt.touch0[0]=Rt:nt.touch1&&nt.touch1[2]===Et.identifier&&(nt.touch1[0]=Rt);if(Et=nt.that.__zoom,nt.touch1){var ae=nt.touch0[0],re=nt.touch0[1],ve=nt.touch1[0],xe=nt.touch1[1],ge=(ge=ve[0]-ae[0])*ge+(ge=ve[1]-ae[1])*ge,Le=(Le=xe[0]-re[0])*Le+(Le=xe[1]-re[1])*Le;Et=N(Et,Math.sqrt(ge/Le)),Rt=[(ae[0]+ve[0])/2,(ae[1]+ve[1])/2],Vt=[(re[0]+xe[0])/2,(re[1]+xe[1])/2]}else if(nt.touch0)Rt=nt.touch0[0],Vt=nt.touch0[1];else return;nt.zoom("touch",n(k(Et,Rt,Vt),nt.extent,o))}}function st(_,...lt){if(this.__zooming){var nt=V(this,lt).event(_),dt=_.changedTouches,bt=dt.length,At,Et;for(pf(_),h&&clearTimeout(h),h=setTimeout(function(){h=null},v),At=0;At<bt;++At)Et=dt[At],nt.touch0&&nt.touch0[2]===Et.identifier?delete nt.touch0:nt.touch1&&nt.touch1[2]===Et.identifier&&delete nt.touch1;if(nt.touch1&&!nt.touch0&&(nt.touch0=nt.touch1,delete nt.touch1),nt.touch0)nt.touch0[1]=this.__zoom.invert(nt.touch0[0]);else if(nt.end(),nt.taps===2&&(Et=qn(Et,this),Math.hypot(d[0]-Et[0],d[1]-Et[1])<E)){var Rt=Zt(this).on("dblclick.zoom");Rt&&Rt.apply(this,arguments)}}}return w.wheelDelta=function(_){return arguments.length?(r=typeof _=="function"?_:yl(+_),w):r},w.filter=function(_){return arguments.length?(t=typeof _=="function"?_:yl(!!_),w):t},w.touchable=function(_){return arguments.length?(a=typeof _=="function"?_:yl(!!_),w):a},w.extent=function(_){return arguments.length?(e=typeof _=="function"?_:yl([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),w):e},w.scaleExtent=function(_){return arguments.length?(s[0]=+_[0],s[1]=+_[1],w):[s[0],s[1]]},w.translateExtent=function(_){return arguments.length?(o[0][0]=+_[0][0],o[1][0]=+_[1][0],o[0][1]=+_[0][1],o[1][1]=+_[1][1],w):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},w.constrain=function(_){return arguments.length?(n=_,w):n},w.duration=function(_){return arguments.length?(l=+_,w):l},w.interpolate=function(_){return arguments.length?(c=_,w):c},w.on=function(){var _=u.on.apply(u,arguments);return _===u?w:_},w.clickDistance=function(_){return arguments.length?(x=(_=+_)*_,w):Math.sqrt(x)},w.tapDistance=function(_){return arguments.length?(E=+_,w):E},w}const Hm=function(t){var e,n;const r=this.internal,{axis:a,config:s,org:o,scale:l,state:c}=r;let u;if(!a)return;const f=a.isCategorized();if(s.zoom_enabled)if(u=t,Array.isArray(u)){if(a.isTimeSeries()&&(u=u.map(h=>bn.bind(r)(h))),r.withinRange(u,r.getZoomDomain("zoom",!0),r.getZoomDomain("zoom"))){if(c.domain=u.slice(),u=r.getZoomDomainValue(u),r.api.tooltip.hide(),s.subchart_show)if(c.isCanvasMode)(e=r.setCanvasSubchartDomain)==null||e.call(r,u,!0,!1);else{const h=l.zoom||l.x;r.brush.getSelection().call(r.brush.move,u.map(h))}else{const h=f?l.x.orgScale():o.xScale||l.x;r.updateCurrentZoomTransform(h,u)}r.setZoomResetButton()}}else u=r.zoom.getDomain();return(n=c.domain)!=null?n:u};Ve(Hm,{enable(t){var e;const n=this.internal,{axis:r,config:a}=n;if(!r){a.zoom_enabled=!1;return}/^(drag|wheel)$/.test(t)&&(a.zoom_type=t),a.zoom_enabled=!!t,n.zoom?t===!1&&n.bindZoomEvent(!1):n.initZoom(),t!==!1&&(a.zoom_type==="drag"&&!n.zoomBehaviour&&((e=n.initZoomBehaviour)==null||e.call(n)),n.bindZoomEvent()),n.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_max=Xn("max",[r[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_min=Xn("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(rt(t)){const{min:n,max:r}=t;H(n)&&e.min(n),H(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var BP={zoom:Hm,unzoom(){var t;const e=this.internal,{config:n,$el:{canvas:r,eventRect:a,zoomResetBtn:s},scale:{zoom:o},state:l}=e,c=l.isCanvasMode?r:a;(o||l.isCanvasMode&&n.subchart_show&&l.domain)&&(n.subchart_show?l.isCanvasMode?(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1):e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(cr),e.updateZoom(!0),s==null||s.style("display","none"),c!=null&&c.node()&&vf(c.node())!==cr&&e.zoom.transform(c,cr),l.domain=void 0)}};function xl(t){return t.state.isCanvasMode?t.$el.canvas:t.$el.eventRect}function Xm(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return cr.translate(e.x+(e.k-1)*n.left,e.y+(e.k-1)*n.top).scale(e.k)}function Vm(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return cr.translate(e.x-(e.k-1)*n.left,e.y-(e.k-1)*n.top).scale(e.k)}function jm(t,e,n){const r=Zn(e,n);if(t.state.isCanvasMode){const{margin:a}=t.state;r[0]-=a.left,r[1]-=a.top}return r}var kP={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:r}=t,a=$P().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));a.orgScaleExtent=()=>{const s=e.zoom_extent||[1,10];return[s[0],Math.max(t.getMaxDataCount()/s[1],s[1])]},a.updateScaleExtent=function(){const s=W(t.scale.x.orgDomain())/W(t.getZoomDomain()),o=this.orgScaleExtent();return this.scaleExtent([o[0]*s,o[1]*s]),this},a.updateTransformScale=(s,o)=>{var l,c;const u=e.axis_rotated,f=Xm(t,s);(l=n.xScale)==null||l.range(r.x.range());const d=f[u?"rescaleY":"rescaleX"](n.xScale||r.x);if(d.domain().some(b=>/(Invalid Date|NaN)/.test(b.toString())))return;const h=t.trimXDomain(d.domain()),v=e.zoom_rescale;if(d.domain(h,n.xDomain),o){const b=d(r.x.domain()[0]),x=u?f.x:b,E=u?b:f.y,w=Vm(t,cr.translate(x,E).scale(s.k));(c=xl(t))==null||c.property("__zoom",w)}r.zoom=t.getCustomizedXScale(d),t.axis.x.scale(r.zoom),v?(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(h)):n.xScale&&(r.x.domain(n.xScale.domain()),n.xScale=null)},a.getDomain=()=>{const s=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(s[1]-=2),s},t.zoom=a},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,se(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){const e=this,{config:n,scale:r,state:a,org:s}=e,{sourceEvent:o}=t,l=(t==null?void 0:t.transform)===cr;if(!n.zoom_enabled||e.filterTargetsToShow(e.data.targets).length===0||!r.zoom&&(o==null?void 0:o.type.indexOf("touch"))>-1&&(o==null?void 0:o.touches.length)===1)return;t.sourceEvent&&(a.zooming=!0,a.domain=void 0);const c=(o==null?void 0:o.type)==="mousemove",u=(o==null?void 0:o.wheelDelta)<0,{transform:f}=t;!c&&u&&r.x.domain().every((b,x)=>b!==s.xDomain[x])&&r.x.domain(s.xDomain),e.zoom.updateTransformScale(f,n.zoom_type==="wheel"&&o);const d=n.transition_duration>0&&!n.subchart_show&&(a.dragging||l||!t.sourceEvent),h=o&&c&&n.zoom_type!=="wheel",v=()=>{var b;e.config&&(e.redraw({withTransition:d,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=c,!l&&se(n.zoom_onzoom,e.api,(b=e.state.domain)!=null?b:e.zoom.getDomain()))};h?Vv(e.state,v):v()},onZoomEnd(t){var e,n;const r=this,{config:a,state:s}=r,o=r.zoom;if(!o)return;let{startEvent:l}=o,c=t==null?void 0:t.sourceEvent;const u=(t==null?void 0:t.transform)===cr;(l==null?void 0:l.type.indexOf("touch"))>-1&&(l=l.changedTouches[0],c=(e=c==null?void 0:c.changedTouches)==null?void 0:e[0]),!(a.zoom_type==="drag"&&c&&l.clientX===c.clientX&&l.clientY===c.clientY)&&(s.zooming=!1,!s.isCanvasMode&&r.redrawEventRect(),r.updateZoom(),!u&&(c||s.dragging)&&se(a.zoom_onzoomend,r.api,(n=r.state.domain)!=null?n:r.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:r,zoom:a}=e.scale;if(a){const s=a.domain(),o=n.domain(),l=.015,c=e.config.axis_x_inverted?(s[0]>=o[0]||s[0]+l>=o[0])&&(o[1]>=s[1]||o[1]>=s[1]+l):(s[0]<=o[0]||s[0]-l<=o[0])&&(o[1]<=s[1]||o[1]<=s[1]-l);(t||c)&&(e.axis.x.scale(n),r.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){var n;const r=this,{config:a}=r,s=a.axis_rotated,o=[-t(e[0]),0],l=cr.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...s?o.reverse():o);(n=xl(r))==null||n.call(r.zoom.transform,Vm(r,l))},bindZoomOnEventRect(){var t,e;const n=this,{config:r,$el:{svg:a}}=n,s=xl(n),o=r.zoom_type==="drag"?n.zoomBehaviour:n.zoom;n.state.isCanvasMode&&((t=o==null?void 0:o.touchable)==null||t.call(o,()=>r.interaction_inputType_touch!==!1)),!n.state.isCanvasMode&&yt.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=yt.navigator)==null?void 0:e.userAgent)&&a.on("wheel",()=>{}),s==null||s.call(o).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,r=e.axis_rotated;let a=0,s=0,o,l;const c={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0},u=f=>{const[d,h]=l!=null?l:[0,r?n.height:n.width];return Math.min(Math.max(f,d),h)};t.zoomBehaviour=lp().touchable(()=>!n.isCanvasMode||e.interaction_inputType_touch!==!1).clickDistance(4).on("start",function(f){var d;l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),!n.isCanvasMode&&!o&&(o=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",Su.zoomBrush).attr("width",r?n.width:0).attr("height",r?0:n.height)),o==null||o.attr(r?"width":"height",r?n.width:n.height),a=u(jm(t,f,this)[c.index]),s=a,n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,a,s):o.attr(c.axis,a).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){var d;s=u(jm(t,f,this)[c.index]),n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,a,s):o.attr(c.axis,Math.min(a,s)).attr(c.attr,Math.abs(s-a))}).on("end",f=>{var d;const h=t.scale.zoom||t.scale.x;n.event=f,s=u(s),n.isCanvasMode?(d=t.clearCanvasZoomBrush)==null||d.call(t):o.attr(c.axis,0).attr(c.attr,0),a>s&&([a,s]=[s,a]),a<0&&(s+=Math.abs(a),a=0),a!==s&&t.api.zoom([a,s].map(v=>h.invert(v))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,r=e.zoom_resetButton;r&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Oe.button,!0).append("span").on("click",function(){M(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()}).classed(Su.buttonZoomReset,!0).text(r.text||"Reset Zoom"))},getZoomTransform(){const t=this,e=xl(t),n=e==null?void 0:e.node();return n?Xm(t,vf(n)):{k:1}}},zP={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let Ym=()=>(Ve(dn.prototype,kP),Ve(Gn.prototype,BP),Br.setOptions([zP]),(Ym=()=>!0)());function Km(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function Zm(t,e=!1){const n=this.internal,{config:r}=n,a=r.transition_duration&&Ps();return t?(r.regions=e?r.regions.concat(t):t,n.state.isCanvasMode?(Km(n),r.regions):(n.updateRegion(),n.redrawRegion(a),r.regions)):r.regions}const Jm=function(t){return Zm.bind(this)(t)};Ve(Jm,{add:function(t){return Zm.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:r}=e,a=t||{},s=Ce(a,"classes",[Is.region]);let o=n.regions;if(e.state.isCanvasMode)return Object.keys(a).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],Km(e),n.regions;const l=e.$el.main.select(`.${Is.regions}`).selectAll(s.map(c=>`.${c}`));return r(l).style("opacity","0").remove(),Object.keys(a).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],o}});var UP={regions:Jm},WP={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",Is.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:r}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const a=n.main.selectAll(`.${Is.region}`).data(e.regions);r(a.exit()).style("opacity","0").remove();const s=a.enter().append("g");s.append("rect").style("fill-opacity","0"),n.list=s.merge(a).attr("class",t.classRegion.bind(t)),n.list.each(function(o){var l;Zt(this).select("text").empty()&&((l=o.label)!=null&&l.text)&&Zt(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:r}=e,a=e.regionX.bind(e),s=e.regionY.bind(e),o=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=r(l,t).attr("x",a).attr("y",s).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=r(c,t).text(u=>{var f;return(f=u.label)==null?void 0:f.text}).attr("transform",({label:u})=>u.rotated?" rotate(-90)":null).attr("transform",function(u){var f;const{x:d=0,y:h=0,center:v=!1,rotated:b=!1}=(f=u.label)!=null?f:{},x=this.previousElementSibling,E={x:0,y:0};return $(v)&&["x","y"].forEach((w,N)=>{v.indexOf(w)>-1&&(E[w]=(+x.getAttribute(o[N])-en(this)[o[N]])/2)}),`translate(${a(u)+E.x+d}, ${s(u)+E.y+h})${b?" rotate(-90)":""}`}).attr("text-anchor",({label:u})=>u!=null&&u.rotated?"end":null).attr("dy","1em").style("fill",({label:u})=>{var f;return(f=u==null?void 0:u.color)!=null?f:null}),[l.style("fill-opacity",u=>L(u.opacity)?u.opacity:null).on("end",function(){Zt(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:r,scale:a,state:s}=n,o=r.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",u=!l&&n[c?"regionX":"regionY"](e);let f=l?"start":"end",d=l?0:s[t],h;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?f="start":l&&!c&&(f="end"),(c?o:!o)&&f in e&&(h=a[e.axis])):(c?!o:o)&&f in e&&(h=a.zoom||a.x),h){let v=0;d=e[f],n.axis.isTimeSeries(e.axis)?d=bn.call(n,d):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),v=n.axis.x.tickOffset()*(f==="start"?-1:1)),d=h(d)+v}return l?d:d<u?0:d-u},isRegionOnX(t){return!t.axis||t.axis==="x"}};let Qm=()=>(Ve(dn.prototype,WP),Gn.prototype.regions=UP.regions,(Qm=()=>({}))());var Bi={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?Ln.circles:$r.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return Up.call(e,t,"area_linearGradient",e.color)},updateArea(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,state:a,$el:s,$T:o}=n,l=e?s.subchart:s;r.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${Yo.areas}`).selectAll(`.${Yo.area}`).data(n.lineData.bind(n));o(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return a.orgAreaOpacity=Zt(this).style("opacity"),"0"}).merge(c),c.style("opacity",a.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{area:a}=n?this.$el.subchart:this.$el,{orgAreaOpacity:s}=r.state;return[r.$T(a,e,Vn()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",o=>String(r.isAreaRangeType(o)?s/1.75:s))]},generateDrawArea(t,e){return Rd(this,t,e)}},ki={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},mf={spline_interpolation_type:"cardinal"};function GP(t){return K(t)&&M(t.create)&&M(t.update)}function HP(t,e){var n;const r=this,a=(c,u)=>{const f=c.attributes;for(let d=0,h;h=f[d];d++)h=h.name,u.setAttribute(h,c.getAttribute(h))},o=new DOMParser().parseFromString(vt(t),"image/svg+xml").documentElement,l=Tt.createElementNS(bi.svg,o.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",a(o,l),(n=o.childNodes)!=null&&n.length){const c=Zt(l);"innerHTML"in l?c.html(vt(o.innerHTML)):Rn(o.childNodes).forEach(u=>{a(u,c.append(u.tagName).node())})}r.$el.defs.node().appendChild(l)}var Ya={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},getValidPointPattern(){const{config:t}=this,e=/^(circle|rect(angle)?)$/i.test(t.point_type)?t.point_type:"circle";return J(t.point_pattern)?t.point_pattern:[e]},generatePoint(){const t=this,{$el:e,config:n}=t,r=[],a=t.getValidPointPattern();return function(s,o,...l){return function(c){var u,f,d,h;const v=t.getTargetSelectorSuffix(c.id||((u=c.data)==null?void 0:u.id)||c),b=Zt(this);r.indexOf(v)<0&&r.push(v);let x=a[r.indexOf(v)%a.length];if(t.hasValidPointType(x))x=t[x];else if(!GP(x||n.point_type)){const E=t.getDefsPointId(v);if(e.defs.select(`#${E}`).size()<1&&HP.call(t,x,E),s==="create")return(f=t.custom)==null?void 0:f.create.bind(o)(b,E,...l);if(s==="update")return(d=t.custom)==null?void 0:d.update.bind(o)(b,...l)}return(h=x[s])==null?void 0:h.bind(o)(b,...l)}}}};function XP(t,e,n,r=!1){const a=t?[t,0]:n;for(let s=t||n.reduce((o,l)=>o+l);s<=e;)n.forEach(o=>{s+o<=e&&a.push(o),s+=o});return a.length%2!==0&&a.push(r?n[1]:0),{dash:a.join(" "),length:a.reduce((s,o)=>s+o,0)}}var VP={initLine(){Wp.call(this,{elKey:"line",className:$r.chartLines,cssRules:["pointer-events:none"]})},updateTargetsForLine(t){const e=this,{$el:{area:n,main:r}}=e,a=e.getClass("lines",!0),s=t.filter(l=>!(e.isScatterType(l)||e.isBubbleType(l))),o=ef.call(e,s,{type:"Line",elKey:"line",containerClass:$r.chartLines,itemClass:$r.chartLine,initFn:e.initLine});if(o.append("g").attr("class",a),e.hasTypeOf("Area")){const l=r.select(`.${$r.chartLines}`).selectAll(`.${$r.chartLine}`),c=(!n&&o.empty()?l:o).filter(e.isAreaType.bind(e));e.initArea(c)}e.updateTargetForCircle(s,o)},updateLine(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{format:{extraLineClasses:r},$el:a,$T:s}=n,o=e?a.subchart:a,l=o.main.selectAll(`.${$r.lines}`).selectAll(`.${$r.line}`).data(n.lineData.bind(n));s(l.exit(),t).style("opacity","0").remove(),o.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${r(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{$el:a,$T:s}=r,{line:o}=n?a.subchart:a;return[s(o,e,Vn()).attr("d",t).style("stroke",this.color).style("opacity",null)]},generateDrawLine(t,e){return Id(this,t,e)},lineWithRegions(t,e,n,r){const a=this,{config:s}=a,o=s.axis_rotated,l=a.axis.isTimeSeries(),c="2 2",u=ri(a,t,r),f=a.hasNullDataValue(t);let d,h,v,b;const x=o?it=>n(it.value):it=>e(it.x),E=o?it=>e(it.x):it=>n(it.value),w=it=>`M${it[0][0]},${it[0][1]}L${it[1][0]},${it[1][1]}`,N=l?(it,at,ot,st)=>{const _=it.x.getTime(),lt=at.x-it.x,nt=new Date(_+lt*ot),dt=new Date(_+lt*(ot+st)),bt=o?[[n(h(ot)),e(nt)],[n(h(ot+v)),e(dt)]]:[[e(nt),n(h(ot))],[e(dt),n(h(ot+v))]];return w(bt)}:(it,at,ot,st)=>{const _=e(at.x,!o),lt=n(at.value,o),nt=ot+st,dt=e(d(ot),!o),bt=n(h(ot),o);let At=e(d(nt),!o),Et=n(h(nt),o);At>_&&(At=_),it.value>at.value&&(o?Et<lt:Et>lt)&&(Et=lt);const Rt=[[dt,bt],[At,Et]];return o&&Rt.forEach(Vt=>Vt.reverse()),w(Rt)},k={x:a.axis.getAxisType("x"),y:a.axis.getAxisType("y")};let B="";if(!t.length)return B;const G=a.$el.line.filter(({id:it})=>it===t[0].id),V=G.clone().style("display","none"),Z=(it,at)=>it.attr("d",at).node().getTotalLength(),Y={dash:[],lastLength:0};let et=!1;for(let it=0,at;at=t[it];it++){const ot=t[it-1],st=ot&&L(ot.value);let _=a.isWithinRegions(at.x,u);if(L(at.value)){if(z(u)||!_||!st)B+=`${it&&st?"L":"M"}${x(at)},${E(at)}`;else if(st)if(_=((_==null?void 0:_.dasharray)||c).split(" ").map(Number),d=ma(k.x,ot.x,at.x),h=ma(k.y,ot.value,at.value),f){const lt=e(at.x)-e(ot.x),nt=n(at.value)-n(ot.value),dt=Math.sqrt(lt*lt+nt*nt);v=_[0]/dt,b=v*_[1];for(let bt=v;bt<=1;bt+=b)B+=N(ot,at,bt,v),bt+b>=1&&(B+=N(ot,at,1,0))}else{let lt;if(et=at.x===t[t.length-1].x,l){const At=+ot.x,Et=new Date(At),Rt=new Date(At+(+at.x-At));lt=[[e(Et),n(h(0))],[e(Rt),n(h(1))]]}else lt=[[e(d(0)),n(h(0))],[e(d(1)),n(h(1))]];o&<.forEach(At=>At.reverse());const nt=Z(V,B),dt=Z(V,B+=`L${lt[1].join(",")}`),bt=XP(nt-Y.lastLength,dt-Y.lastLength,_,et);Y.lastLength+=bt.length,Y.dash.push(bt.dash)}}}return Y.dash.length&&(!et&&Y.dash.push(Z(V,B)),G.attr("stroke-dasharray",Y.dash.join(" "))),V.remove(),B},isWithinRegions(t,e){return Ki(t,e)},isWithinStep(t,e){return Math.abs(e-Zn(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||q(e)&&e.indexOf(t.id)!==-1}};const zi=()=>Vn(),_m=new WeakMap;function qm(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),a=_m.get(t);if(a&&a.attrHeight===e&&a.attrWidth===n&&a.href===r)return a;const{width:s,height:o}=ba(t),l={attrHeight:e,attrWidth:n,height:o,href:r,width:s};return _m.set(t,l),l}var bl={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let r=e.point_opacity;return z(r)&&(r=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle(t){var e;const{config:n}=this;let r=n.point_opacity;return z(r)&&(r=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",r=L(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":r:"0"),r},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${Oe.chart} > .${Ln.chartCircles}`).empty()&&e.select(`.${Oe.chart}`).append("g").attr("class",Ln.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:r,data:a,$el:s}=n,o=r.interaction_enabled&&r.data_selection_enabled,l=o&&r.data_selection_isselectable,c=n.getClass("circles",!0);if(!r.point_show)return;n.initCircle();let u=t,f=e;if(!u){u=n.filterNullish(a.targets).filter(h=>this.isScatterType(h)||this.isBubbleType(h));const d=s.main.select(`.${Ln.chartCircles}`).style("pointer-events","none").selectAll(`.${Ln.circles}`).data(u);d.exit().remove(),f=d.enter()}o&&f.append("g").attr("class",d=>n.generateClass(_e.selectedCircles,d.id)),f.append("g").attr("class",c).call(d=>{n.setCssRule(!0,`.${Ln.circles}`,["cursor:pointer"],l)(d),n.setCssRule(!0,` .${Ln.circle}`,["fill","stroke"],n.color)(d)}).style("opacity",function(){return Zt(this.parentNode).classed(Ln.chartCircles)?"0":null}),o&&u.forEach(d=>{s.main.selectAll(`.${_e.selectedCircles}${n.getTargetSelectorSuffix(d.id)}`).selectAll(`${_e.selectedCircle}`).each(h=>{h.value=d.values[h.index].value})})},updateCircle(t=!1,e=!1){const n=this,{config:r,state:a,$el:s}=n,o=n.isPointFocusOnly(),l=t?s.subchart:s;if(r.point_show&&!a.toggling){r.point_radialGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${Ln.circles}`).selectAll(`.${Ln.circle}`).data(v=>{const b=n.isLineType(v)&&n.shouldDrawPointsForLine(v)||n.isBubbleType(v)||n.isRadarType(v)||n.isScatterType(v)?o?[v.values[0]]:v.values:[];return n.filterNullish(b)});c.exit().remove();const u=n.pointR.bind(n),f=n.generateUpdateCircleColor(),d=n.initialOpacityForCircle.bind(n),h=c.enter().filter(Boolean).append(n.point("create",this,u,f));l.circle=l.main.selectAll(`.${Ln.circles} .${Ln.circle}`).style("stroke",n.getStylePropValue(n.color)),(o&&e?h:l.circle).style("opacity",d)}},generateUpdateCircleColor(){const t=this,e=t.getStylePropValue(t.color);return n=>t.config.point_radialGradient?t.getGradienColortUrl(n.id):e?e(n):null},updateCircleColor(t){return this.generateUpdateCircleColor()(t)},redrawCircle(t,e,n,r,a=!1){const s=this,{state:{rendered:o},$el:l,$T:c}=s,u=a?l.subchart:l,f=u.main.selectAll(`.${_e.selectedCircle}`);if(!s.config.point_show)return[];const d=s.isCirclePoint()?"c":"",h=Vn(),v=s.opacityForCircle.bind(s),b=s.generateUpdateCircleColor();if(s.isCirclePoint()){const w=u.circle;return s.hasType("bubble")&&w.attr("r",s.pointR.bind(s)),n?(r&&w.attr("cx",t),c(w.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",b),w.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",b)):w.attr("cx",t).attr("cy",e).style("fill",b),[[c(w,n||!o,h).style("opacity",v)],c(f,n).attr("cx",t).attr("cy",e)]}const x=s.point("update",s,t,e,b,n,r,f),E=[];return u.circle.each(function(w){let N=x.bind(this)(w);N=c(N,n||!o,h).style("opacity",v),E.push(N)}),[E,c(f,n).attr(`${d}x`,t).attr(`${d}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:r,toggling:a,transiting:s},$el:o}=e;let{circle:l}=o;if(s===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),u=(n?e.radarCircleY:e.circleY).bind(e),f=a||z(t),d=e.point("update",e,c,u,e.getStylePropValue(e.color),r?!1:f);t&&(l=l.filter(function(h){var v;const b=(v=t.filter)==null?void 0:v.call(t,x=>x.id===h.id);return b.length?Zt(this).datum(b[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:v,index:b,value:x}=h;let E="hidden";L(x)&&(d.bind(this)(h),e.expandCircles(b,v),E=""),this.style.visibility=E})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},expandCircles(t,e,n){const r=this,a=r.pointExpandedR.bind(r);n&&r.unexpandCircles();const s=r.getShapeByIndex("circle",t,e).classed(Oe.EXPANDED,!0),o=a(s)/r.config.point_r,l=1-o;r.isCirclePoint()?s.attr("r",a):s.each(function(){const c=Zt(this);if(this.tagName==="circle")c.attr("r",a);else{const{width:u,height:f}=qm(this),d=l*(+c.attr("x")+u/2),h=l*(+c.attr("y")+f/2);c.attr("transform",`translate(${d} ${h}) scale(${o})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),r=e.getShapeByIndex("circle",t).filter(function(){return Zt(this).classed(Oe.EXPANDED)}).classed(Oe.EXPANDED,!1);if(r.attr("r",n),!e.isCirclePoint()){const a=n(r)/e.config.point_r;r.attr("transform",a!==1?`scale(${a})`:null)}},isWithinCircle(t,e){const{state:n}=this,r=Zn(n.event,t),a=Zt(t),s=this.isCirclePoint(t)?"c":"",o=this.getPointSensitivity(a==null?void 0:a.datum());let l=+a.attr(`${s}x`),c=+a.attr(`${s}y`);if(!(l||c)&&t.nodeType===1){const{x:d,y:h}=en(t);l=d,c=h}const u=l-r[0],f=c-r[1];return Math.sqrt(u*u+f*f)<(e||o)},updatePointClass(t){const e=this,{circle:n}=e.$el;let r=!1;return(rt(t)||n)&&(r=t===!0?n.each(function(a){let s=e.getClass("circle",!0)(a);this.getAttribute("class").indexOf(Oe.EXPANDED)>-1&&(s+=` ${Oe.EXPANDED}`),this.setAttribute("class",s)}):e.getClass("circle",!0)(t)),r},custom:{create(t,e,n){return t.append("use").attr("xlink:href",`#${e}`).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update(t,e,n,r,a,s,o){const l=this,{width:c,height:u}=qm(t.node()),f=v=>L(v.value)?e(v)-c/2:0,d=v=>L(v.value)?n(v)-u/2:0;let h=t;return a&&(s&&h.attr("x",f),h=l.$T(h,a,zi()),o&&l.$T(o,a,zi())),h.attr("x",f).attr("y",d).style("fill",r)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,r,a,s,o){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),a&&(s&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,a,zi())),o&&l.$T(o,a,zi())),c.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create(t,e,n){const r=a=>e(a)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update(t,e,n,r,a,s,o){const l=this,c=l.config.point_r,u=h=>e(h)-c,f=h=>n(h)-c;let d=t;return a&&(s&&d.attr("x",u),d=l.$T(d,a,zi()),o&&l.$T(o,a,zi())),d.attr("x",u).attr("y",f).style("fill",r)}}},Sa={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},jP={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function ty(t,e,n){const{config:r}=t,a=(s,o)=>{const l=D(o)?o:o===!1?void 0:null;l!==null&&(r[`axis_${s}_${e}`]=l)};H(n)&&(K(n)?Object.keys(n).forEach(s=>{a(s,n[s])}):(D(n)||n===!1)&&["y","y2"].forEach(s=>{a(s,n)}),t.state.dirty.data=!0,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function ey(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var YP={axis:{labels:function(t){var e;const n=this.internal;let r;return t&&(Object.keys(t).forEach(a=>{n.axis.setLabelText(a,t[a])}),n.state.isCanvasMode?(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1):n.axis.updateLabels()),["x","y","y2"].forEach(a=>{const s=n.axis.getLabelText(a);s&&(!r&&(r={}),r[a]=s)}),r},min:function(t){const e=this.internal;return L(t)||t===!1?ty(e,"min",t):ey(e,"min")},max:function(t){const e=this.internal;return L(t)||t===!1?ty(e,"max",t):ey(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;H(r)&&e.max(r),H(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},KP={groups(t){const e=this.internal,{config:n}=e;return z(t)||(n.data_groups=t,e.state.dirty.data=!0,e.redraw()),n.data_groups}},ZP={x(t){const e=this.internal,{axis:n,data:r}=e,a=n.isCustomX()&&n.isCategorized();return q(t)&&(a?this.categories(t):(e.updateTargetX(r.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),a?this.categories():r.xs},xs(t){const e=this.internal;return rt(t)&&(e.updateTargetXs(e.data.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},JP=Object.defineProperty,QP=(t,e,n)=>e in t?JP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tl=(t,e,n)=>QP(t,typeof e!="symbol"?e+"":e,n);const ny=new WeakMap;class _P{constructor(e){Tl(this,"owner"),Tl(this,"config"),Tl(this,"scale"),Tl(this,"charSize",{});const n=ma(),{config:r,params:a}=e;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!a.config.transition_duration)&&(r.withoutTransition=!0),r.range=this.scaleExtent((a.orgXScale||n).range())}getSizeFor1Char(e,n,r=!0){var a;const s={w:5.5,h:11.5};if(this.charSize[e]&&r)return this.charSize[e];const o=n.node();if(o){const l=this.owner.params.owner,c=window.getComputedStyle(o),u=[e,c.fontStyle,c.fontWeight,c.fontSize,c.fontFamily,c.letterSpacing].join(" "),f=(a=ny.get(l))!=null?a:{},d=f[u];ny.set(l,f);try{if(d)s.w=d.w,s.h=d.h;else{o.textContent="0";const{width:h,height:v}=ba(o,!0);h&&v&&(s.w=h,s.h=v,f[u]={w:h,h:v})}}finally{n.text("")}}return this.charSize[e]=s,s}getTickTransformSetter(e){const{config:n}=this,r=e==="x"?a=>`translate(${a+n.tickOffset},0)`:a=>`translate(0,${a})`;return(a,s)=>{a.attr("transform",o=>{const l=s(o);return L(o)?r(l):null})}}scaleExtent(e){const n=e[0],r=e[e.length-1];return n<r?[n,r]:[r,n]}generateTicks(e,n){const{tickStepSize:r}=this.owner.params,[a,s]=e.domain();let o=[];if(n&&r){let l=Math.round(a);for(;l<=s;)o.push(l),l+=r}else if(e.ticks){const{tickArguments:l}=this.config;if(e.type==="log"&&!l){const c=ma("_log").domain([a>0?a:1,s]).range(e.range());o=c.ticks();for(let u=s.toFixed().length;o.length>15;u--)o=c.ticks(u);o.splice(0,1,a),o.splice(o.length-1,1,s)}else o=e.ticks(...this.config.tickArguments||[])}return o}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,r=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,a=n?n(r):r;return H(a)?a:""}transitionise(e){const{config:n}=this;let r=e;if(n.withoutTransition&&!n.transition)r=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{r=e.transition(n.transition)}catch(a){}return r}}var qP=Object.defineProperty,tM=(t,e,n)=>e in t?qP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gs=(t,e,n)=>tM(t,typeof e!="symbol"?e+"":e,n);function Sl(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function eM(t){const e=Sl(t);return/^sub/.test(t)?`subchart_axis_${e}`:`axis_${e}`}class ry{constructor(e={}){Gs(this,"helper"),Gs(this,"config"),Gs(this,"params"),Gs(this,"g"),Gs(this,"generatedTicks",[]);const n={innerTickSize:tn,outerTickSize:e.outerTick?tn:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:Pd,tickOffset:0,tickPadding:Ma,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new _P(this)}canReuseTickTextOnResize(e){const{config:n,params:r}=this,{config:a,id:s,owner:o}=r,l=/^(x|subX)$/.test(s),c=Sl(s),u=/^sub/.test(s)?a[`subchart_axis_${c}_tick_format`]||a[`axis_${c}_tick_format`]:a[`axis_${c}_tick_format`],f=r.tickMultiline&&r.isCategory&&!e&&!(r.tickWidth>0);return!!(o.state.resizing&&!o.state.flowing&&!M(a.axis_evalTextSize)&&!u&&!r.tickTitle&&!(l&&a.axis_x_tick_autorotate)&&!f&&n.withoutTransition)}canReuseTickNodesOnResize(e,n,r,a){if(a.tick||!a.text||!this.canReuseTickTextOnResize(r)||e.size()!==n.length)return!1;const s=e.nodes();for(let o=0;o<n.length;o++){const l=s[o].__data__,c=n[o];if(l instanceof Date||c instanceof Date){if(+l!=+c)return!1}else if(l!==c)return!1}return!0}create(e){const n=this,{config:r,helper:a,params:s}=n,{scale:o}=a,{orient:l}=r,c=this.splitTickText.bind(n),u=/^(left|right)$/.test(l),f=/^(top|bottom)$/.test(l),d=a.getTickTransformSetter(f?"x":"y"),h=d===a.axisX?"y":"x",v=/^(top|left)$/.test(l)?-1:1,b=s.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():a.scaleExtent((s.orgXScale||o).range());const{innerTickSize:x,tickLength:E,range:w}=r,N=s.id,k=Sl(N),{isSubAxes:B}=s,G=!B&&k&&/^(x|y|y2)$/.test(k)?s.config[`axis_${k}_tick_text_position`]:{x:0,y:0},V=eM(N),Z=s.config[`${V}_show`],Y=B?{tick:!0,text:!0}:{tick:Z?s.config[`${V}_tick_show`]:!1,text:Z?s.config[`${V}_tick_text_show`]:!1},et=s.config.axis_evalTextSize;let it;e.each(function(){const at=Zt(this);let ot=this.__chart__||o,st=a.copyScale();it=at,this.__chart__=st,r.tickOffset=s.isCategory?(st(1)-st(0))/2:0;const _=at.selectAll(".domain").data([0]);if(_.enter().append("path").attr("class","domain").merge(_).attr("d",()=>{const lt=r.outerTickSize*v;return f?`M${w[0]},${lt}V0H${w[1]}V${lt}`:`M${lt},${w[0]}H0V${w[1]}H${lt}`}),Y.tick||Y.text){const lt=at.select(".domain").node(),nt=r.tickValues||a.generateTicks(st,u||s.config.axis_rotated);n.generatedTicks=nt;let dt=at.selectAll(".tick");if(n.canReuseTickNodesOnResize(dt,nt,u||s.config.axis_rotated,Y))d(dt,st);else{dt=dt.data(nt,st);const At=dt.enter().insert("g",()=>lt).attr("class","tick"),Et=dt.exit().remove();dt=At.merge(dt),Y.tick&&At.append("line"),Y.text&&At.append("text");const Rt=!At.empty()||!Et.empty(),Vt=Y.text&&!Rt&&n.canReuseTickTextOnResize(u||s.config.axis_rotated);let ae={w:0,h:0},re=dt.selectAll("text.__bb-empty");if(Y.text&&!Vt){const xe=dt.select("text"),ge=[];re=xe,M(et)&&(ae=et.bind(n.params.owner.api)(xe.node(),N),this.classList.contains(Oe.dummy)&&(this.sizeFor1Char=ae)),(!ae||ae.w===0||ae.h===0)&&(ae=n.helper.getSizeFor1Char(l,xe,!!et));let Le=xe.selectAll("tspan").data((Yt,pe)=>{let be;if(s.tickMultiline)be=c(Yt,st,nt,u,ae.w);else{const Gt=a.textFormatted(Yt);be=q(Gt)?Gt.concat():[Gt]}return ge[pe]=be.length,be.map(Gt=>({index:pe,splitted:Gt}))});Le.exit().remove(),Le=Le.enter().append("tspan").merge(Le).each(function(Yt){this.textContent!==Yt.splitted&&(this.textContent=Yt.splitted)}),Le.attr("x",f?0:E*v).attr("dx",(()=>{let Yt=0;return/(top|bottom)/.test(l)&&b&&(Yt=8*Math.sin(Math.PI*(b/180))*(l==="top"?-1:1)),Yt+(G.x||0)})()).attr("dy",(Yt,pe)=>{const be=".71em";let Gt=0;return l!=="top"&&(Gt=ae.h,pe===0&&(Gt=u?-((ge[Yt.index]-1)*(ae.h/2)-3):G.y===0?be:0)),D(Gt)&&G.y?Gt+G.y:Gt||be})}const ve=dt.select("line");if(At.select("line").attr(`${h}2`,x*v),At.select("text").attr(h,E*v),n.setTickLineTextPosition(ve,re,ae),s.tickTitle){const xe=re.select("title"),ge=s.tickTitle;(xe.empty()?re.append("title"):xe).text(Le=>ge[Number(Le)])}if(st.bandwidth){const xe=st,ge=xe.bandwidth()/2;ot=Le=>xe(Le)+ge,st=ot}else ot.bandwidth?ot=st:d(Et,st);dt=s.owner.state.flowing?a.transitionise(dt):s.owner.$T(dt),d(At,ot),d(dt.style("opacity",null),st)}}}),this.g=it}getGeneratedTicks(e){var n;const r=((n=this.generatedTicks)==null?void 0:n.length)-1;let a=this.generatedTicks;if(r>e){const s=Math.round(r/e+.1);a=this.generatedTicks.map((o,l)=>l%s===0?o:null).filter(o=>o!==null).splice(0,e)}return a}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:r}=this,{innerTickSize:a,range:s}=r,o=n(e)+(r.tickCentered?0:r.tickOffset);return s[0]<o&&o<s[1]?a:0}setTickLineTextPosition(e,n,r){const a=this.getTickXY(),{innerTickSize:s,orient:o,tickLength:l,tickOffset:c}=this.config,u=this.params.id,f=this.params.tickTextRotate,d=6,h=r.h/2-d,v=k=>{const B=["start","end"];return o==="top"&&B.reverse(),k?B[k>0?0:1]:"middle"},b=k=>k?`rotate(${k})`:null,x=k=>{const B=k/(o==="bottom"?15:23);return k?11.5-2.5*B*(k>0?1:-1):l},{config:{axis_rotated:E,axis_x_tick_text_inner:w}}=this.params.owner,N=this.params.config[`axis_${Sl(u)}_tick_inner`];switch(o){case"bottom":e.attr("x1",a.x).attr("x2",a.x).attr("y2",k=>this.getTickSize.bind(this)(k)*(N?-1:1)),n.attr("x",0).attr("y",x(f)).style("text-anchor",(k,B,{length:G})=>!E&&B===0&&(w===!0||w.first)?"start":!E&&B===G-1&&(w===!0||w.last)?"end":v(f)).attr("transform",b(f));break;case"top":e.attr("x2",0).attr("y2",N?s:-s),n.attr("x",0).attr("y",-(x(f)+h+d)).style("text-anchor",v(f)).attr("transform",b(f));break;case"left":e.attr("x2",N?s:-s).attr("y1",a.y).attr("y2",a.y),n.attr("x",-l).attr("y",c+(E?h/4:h)).style("text-anchor","end");break;case"right":e.attr("x2",N?-s:s).attr("y2",0),n.attr("x",l).attr("y",h).style("text-anchor","start")}}splitTickText(e,n,r,a,s){const{params:o}=this,l=this.helper.textFormatted(e),c=$(l)&&l.indexOf(`
|
|
59
59
|
`)>-1?l.split(`
|
|
60
|
-
`):[];if(c.length)return c;if(qe(l))return l;let u=o.tickWidth;(!u||u<=0)&&(u=i?95:o.isCategory?(o.isInverted?n(r[0])-n(r[1]):n(r[1])-n(r[0]))-12:110);function f(d,h){let m,S,E;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(S=C),m=h.substr(0,C+1),E=s*m.length,u<E)return f(d.concat(h.substr(0,S||C)),h.slice(S?S+1:C));return d.concat(h)}return f(c,String(l))}scale(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale}orient(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient}tickFormat(e){const{config:n}=this;return arguments.length?(n.tickFormat=e,this):n.tickFormat}tickCentered(e){const{config:n}=this;return arguments.length?(n.tickCentered=e,this):n.tickCentered}tickOffset(){return this.config.tickOffset}tickInterval(e){var n,r,i;const{outerTickSize:s,tickOffset:o,tickValues:l}=this.config;let c;if(this.params.isCategory){const u=(n=this.params.owner.scale.zoom)!=null?n:this.helper.scale;c=o*2||Math.abs(u(1)-u(0))}else{const u=(r=this.params.owner.scale.zoom)!=null?r:this.helper.scale;if(c=(this.g?this.g.select("path.domain").node().getTotalLength()-s*2:Math.abs(u.range()[1]-u.range()[0]))/(e||((i=this.g)==null?void 0:i.selectAll("line").size())||1),l)for(let d=0;d<l.length-1;d++){const h=u(l[d+1])-u(l[d]);h&&h<c&&(c=h)}}return c===1/0?0:c}ticks(...e){const{config:n}=this;return e.length?(n.tickArguments=Oa(e),this):n.tickArguments}tickCulling(e){const{config:n}=this;return arguments.length?(n.tickCulling=e,this):n.tickCulling}tickValues(e){const{config:n}=this;if(ie(e))n.tickValues=()=>e(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var d2=Object.defineProperty,h2=Object.defineProperties,v2=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,g2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable,yu=(t,e,n)=>e in t?d2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m2=(t,e)=>{for(var n in e||(e={}))g2.call(e,n)&&yu(t,n,e[n]);if(ep)for(var n of ep(e))p2.call(e,n)&&yu(t,n,e[n]);return t},x2=(t,e)=>h2(t,v2(e)),Ar=(t,e,n)=>yu(t,typeof e!="symbol"?e+"":e,n);function Tu(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function rl(t){return/^sub/.test(t)}function pa(t,e,n){const r=Tu(e),i=t[`subchart_axis_${r}_tick_${n}`];return rl(e)&&i!==void 0?i:t[`axis_${r}_tick_${n}`]}function y2(t){var e,n;const r=[t[0],t[t.length-1]];let i=0,s=null;for(const l of t){const c=(n=(e=l.textContent)==null?void 0:e.length)!=null?n:0;c>i&&(i=c,s=l)}s&&!r.includes(s)&&r.push(s);const o=t[Math.floor(t.length/2)];return r.includes(o)||r.push(o),r}const al=50,bu=Symbol("tickWidthFallback");function T2(t){var e,n,r;const i=t.select("line").node(),s=(n=(e=i==null?void 0:i.ownerDocument)==null?void 0:e.defaultView)!=null&&n.getComputedStyle?parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).strokeWidth):parseFloat((r=i==null?void 0:i.getAttribute)==null?void 0:r.call(i,"stroke-width"));return Number.isFinite(s)&&s>0?s:1}function b2(t,e,n){var r;const i=(r=t==null?void 0:t.scale)==null?void 0:r.call(t);if(!i||e.length<2)return!1;const s=Math.max(1,n)/2,o=e.map(c=>+i(c)).filter(Number.isFinite).sort((c,u)=>c-u);if(o.length<2)return!1;let l=o[0]+s;for(let c=1;c<o.length;c++){const u=o[c]-s,f=o[c]+s;if(u<=l+Se)return!0;l=Math.max(l,f)}return!1}function S2(t,e){if(t.length<=al)return t;const n=new Map,r=l=>{l>=0&&l<t.length&&n.set(l,t[l])};r(0),r(t.length-1),r(Math.floor(t.length/2));const i=Math.max(1,Math.floor(t.length/(al-3)));let s=-1,o=0;for(let l=0;l<t.length;l+=i){r(l);const c=t[l],u=e?e(c):c,f=Array.isArray(u)?u.join("").length:String(u!=null?u:"").length;f>s&&(s=f,o=l)}return r(o),Array.from(n.keys()).sort((l,c)=>l-c).map(l=>n.get(l))}function A2(t){return ie(t)?rp(t):!Array.isArray(t)||t.length<=al?t:{length:t.length,first:t[0],middle:t[Math.floor(t.length/2)],last:t[t.length-1]}}function Su(t){return t[bu]}function il(t,e){ae(e)?Object.defineProperty(t,bu,{configurable:!0,value:e,writable:!0}):delete t[bu]}function Au(t){t.length=0,il(t)}function E2(t,e,n){Au(t),t.length=e,il(t,n)}function C2(t){const e=[];return e.length=t.length,Object.keys(t).forEach(n=>{const r=+n;e[r]=t[r]}),il(e,Su(t)),e}function I2(t,e){Au(t),t.length=e.length,Object.keys(e).forEach(n=>{const r=+n;t[r]=e[r]}),il(t,Su(e))}function R2(t,e,n){const r=t[e];if(ae(r))return r;const i=Number(r);return Number.isFinite(i)?i:n}const np=new WeakMap;let w2=0;function rp(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=np.get(t);return e||(e=++w2,np.set(t,e)),`${typeof t}:${e}`}function Eu(t){return t instanceof Date?`date:${+t}`:Array.isArray(t)?`[${t.map(e=>Eu(e)).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(e=>`${e}:${Eu(t[e])}`).join(",")}}`:typeof t=="function"?rp(t):`${typeof t}:${String(t)}`}function Cu(t){return t instanceof Date?new Date(+t):Array.isArray(t)?t.map(e=>Cu(e)):t}function O2(t){return{width:t.width,height:t.height,ticks:t.ticks&&C2(t.ticks),clipPath:t.clipPath,domain:Cu(t.domain)}}function P2(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=Cu(e.domain),t.ticks&&e.ticks&&I2(t.ticks,e.ticks),t}var M2={getAxisInstance:function(){return this.axis||new L2(this)}};class L2{constructor(e){Ar(this,"owner"),Ar(this,"x"),Ar(this,"subX"),Ar(this,"subY"),Ar(this,"subY2"),Ar(this,"y"),Ar(this,"y2"),Ar(this,"axesList",{}),Ar(this,"tick",{x:null,y:null,y2:null}),Ar(this,"xs",[]),Ar(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom",subY:"left",subY2:"right"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${Rn.axis} ${Rn[`axis${Ln(e)}`]}`}isHorizontal(e,n){const r=e.config.axis_rotated;return n?r:!r}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||vn(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:r}=e;let i=n.axis_x_extent;if(i){if(ie(i))i=i.bind(e.api)(e.getXDomain(e.data.targets),r.subX);else if(this.isTimeSeries()&&i.every(isNaN)){const s=Wn.bind(e);i=i.map(o=>r.subX(s(o)))}}return i}init(){const e=this.owner,{config:n,$el:{main:r,axis:i},state:{clip:s}}=e,o=["x","y"];n.axis_y2_show&&o.push("y2"),o.forEach(l=>{const c=this.getAxisClassName(l);i[l]=r.append("g").attr("class",c).attr("clip-path",()=>{let u=null;return l==="x"?u=s.pathXAxis:l==="y"&&(u=s.pathYAxis),u}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:r,axis_y2_inner:i}=e.config;this.orient={x:n?"left":"bottom",y:n?r?"top":"bottom":r?"right":"left",y2:n?i?"bottom":"top":i?"left":"right",subX:n?"left":"bottom",subY:n?r?"top":"bottom":r?"right":"left",subY2:n?i?"bottom":"top":i?"left":"right"}}generateAxes(e){const n=this.owner,{config:r}=n,i=[],s=r[`axis_${e}_axes`],o=r.axis_rotated;let l;e==="x"?l=o?"left":"bottom":e==="y"?l=o?"bottom":"left":e==="y2"&&(l=o?"top":"right"),s.length&&s.forEach(c=>{const u=c.tick||{},f=n.scale[e].copy();c.domain&&f.domain(c.domain);const d=new tp({outerTick:u.outer!==!1,noTransition:!1,config:r,id:e,isSubAxes:!0,owner:n}).scale(f).orient(l).tickFormat(ie(u.format)?u.format.bind(n.api):(h=>h));Ge(u.count)&&d.ticks(u.count),u.values&&d.tickValues(u.values),i.push(d)}),this.axesList[e]=i}updateAxes(){const e=this.owner,{config:n,$el:{main:r},$T:i}=e;Object.keys(this.axesList).forEach(s=>{const o=n[`axis_${s}_axes`],l=e.scale[s].copy(),c=l.range();this.axesList[s].forEach((u,f)=>{const d=u.scale().range();c.every((S,E)=>S===d[E])||u.scale().range(c);const h=`${this.getAxisClassName(s)}-${f+1}`;let m=r.select(`.${h.replace(/\s/,".")}`);m.empty()?(m=r.append("g").attr("class",h).style("visibility",n[`axis_${s}_show`]?null:"hidden"),u.create(m)):(o[f].domain&&l.domain(o[f].domain),u.scale(l).create(i(m))),m.attr("transform",e.getTranslate(s,f+1))})})}setAxis(e,n,r,i){const s=this.owner,o=Tu(e);rl(e)||(this.tick[o]=this.getTickValues(o)),this[e]=this.getAxis(e,n,r,e==="x"&&(s.scale.zoom||s.config.subchart_show||s.state.resizing)?!0:i)}getAxis(e,n,r,i,s){const o=this.owner,{config:l}=o,c=/^(x|subX)$/.test(e),u=Tu(e),f=c&&this.isCategorized(),d=this.orient[e],h=s?0:o.getAxisTickRotate(u);let m;if(c)m=e==="subX"?o.format.subXAxisTick:o.format.xAxisTick;else{const $=rl(e)?l[`subchart_axis_${u}_tick_format`]||l[`axis_${u}_tick_format`]:l[`axis_${u}_tick_format`];ie($)&&(m=$.bind(o.api))}let S=rl(e)?this.getTickValues(u,!0):this.tick[u];const E=Xr({outerTick:r,noTransition:i,config:l,id:e,tickTextRotate:h,owner:o},c&&{isCategory:f,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:f&&l.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});c||(E.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new tp(E).scale(c&&o.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&S&&!ie(S)){const $=Wn.bind(o);S=S.map(z=>$(z))}else!c&&this.isTimeSeriesY()&&(C.ticks(l.axis_y_tick_time_value),S=null);S&&C.tickValues(S),C.tickFormat(m||!c&&o.isStackNormalized()&&o.hasAxisGroupedData(u)&&($=>`${$}%`)),f&&(C.tickCentered(l.axis_x_tick_centered),lr(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const w=pa(l,e,"count");return w&&C.ticks(w),C}updateXAxisTickValues(e,n){var r;const i=this.owner,{config:s}=i,o=s.axis_x_tick_fit,l=(u=s.axis_x_tick_count)=>{let f=u,d;return o&&(d=i.mapTargetsToUniqueXs(e),this.isCategorized()&&f>d.length&&(f=d.length),d=this.generateTickValues(d,f,this.isTimeSeries())),d},c=l();if(n)n.tickValues(c);else if(this.x){const u=this.getTickValues("x",!0),f=pa(s,"subX","count"),d=u!=null?u:f!==s.axis_x_tick_count?l(f):c;this.x.tickValues(c),(r=this.subX)==null||r.tickValues(d)}return c}getId(e){const{config:n,scale:r}=this.owner;let i=n.data_axes[e];return(!i||!r[i])&&(i="y"),i}getXAxisTickFormat(e){const n=this.owner,{config:r,format:i}=n,s=e&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,o=this.isTimeSeries(),l=this.isCategorized();let c;return s?ie(s)?c=s.bind(n.api):o&&(c=u=>u?i.axisTime(s)(u):""):c=o?i.defaultAxisTime:l?n.categoryName:u=>u<0?u.toFixed(0):u,ie(c)?u=>c.apply(n,l?[u,n.categoryName(u)]:[u]):c}getTickValues(e,n=!1){const r=this.owner,i=n?pa(r.config,`sub${Ln(e)}`,"values"):r.config[`axis_${e}_tick_values`],s=ie(i)?i.call(r.api):i,o=r[`${e}Axis`];return n?s!=null?s:void 0:s||(o?o.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return je(n)?n:n?n.text:null}setLabelText(e,n){const r=this.owner,{config:i}=r,s=this.getLabelOptionByAxisId(e);je(s)?i[`axis_${e}_label`]=n:s&&(s.text=n)}getLabelPosition(e,n){const r=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(e),s=Kn(i)&&i.position?i.position:n[+!r],o=l=>!!~s.indexOf(l);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}xForAxisLabel(e){const n=this.owner,{state:{width:r,height:i}}=n,s=this.getAxisLabelPosition(e);let o=s.isMiddle?-i/2:0;return this.isHorizontal(n,e!=="x")?o=s.isLeft?0:s.isCenter?r/2:r:s.isBottom&&(o=-i),o}textAnchorForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"start":r.isCenter?"middle":"end":r.isBottom&&(i="start"),i}dxForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"0.5em":r.isRight?"-0.5em":"0":r.isTop&&(i="-0.5em"),i}dyForAxisLabel(e){const n=this.owner,{config:r}=n,i=r.axis_rotated,s=this.getAxisLabelPosition(e).isInner,o=r[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const u=r.axis_x_height;i?c=s?"1.2em":-25-l:s?c="-0.5em":u?c=u-10:o?c=o-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],i?s?c=c[0]:o?c=o*(e==="y2"?-1:1)-c[1]:c=c[2]:c=s?c[3]:(c[4]+(r[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getTickFormatCacheValue(e){const n=this.owner,{config:r}=n;return e==="x"?{format:r.axis_x_tick_format,type:r.axis_x_type,localtime:r.axis_x_localtime,categories:r.axis_x_categories}:{format:r[`axis_${e}_tick_format`],normalized:n.isStackNormalized(),grouped:n.hasAxisGroupedData(e),type:r[`axis_${e}_type`]}}getMaxTickSizeFingerprint(e,n,r,i,s,o){var l;const c=this.owner,{config:u,state:f}=c,d=e==="x",h=d?"axis_x":`axis_${e}`,m=i.tickValues();return Eu({id:e,withoutRecompute:!!o,dataGeneration:f.dataGeneration,size:[f.current.width,f.current.height],range:(l=n.range)==null?void 0:l.call(n),domain:r,type:n.type,orient:this.orient[e],axisRotated:u.axis_rotated,evalTextSize:u.axis_evalTextSize,format:this.getTickFormatCacheValue(e),ticks:{values:A2(m),rawValues:u[`${h}_tick_values`],arguments:i.ticks(),count:u[`${h}_tick_count`],rotate:s,show:u[`${h}_tick_show`],textShow:u[`${h}_tick_text_show`],textPosition:u[`${h}_tick_text_position`],inner:u[`${h}_tick_inner`],culling:u[`${h}_tick_culling`],cullingMax:u[`${h}_tick_culling_max`],cullingLines:u[`${h}_tick_culling_lines`],cullingReverse:u[`${h}_tick_culling_reverse`],stepSize:!d&&u[`${h}_tick_stepSize`],timeValue:!d&&u[`${h}_tick_time_value`],fit:d&&u.axis_x_tick_fit,autorotate:d&&u.axis_x_tick_autorotate,centered:d&&u.axis_x_tick_centered,inverted:d&&u.axis_x_inverted,multiline:d&&u.axis_x_tick_multiline,width:d&&u.axis_x_tick_width}})}getMaxTickSize(e,n){var r;const i=this.owner,{config:s,state:o,$el:{svg:l,chart:c}}=i,{current:u,resizing:f}=o,d=u.maxTickSize[e],h=`${Oe.maxTickSize}_${e}_${!!n}`,m=i.cache.get(h);if(m&&m.generation===o.redrawGeneration)return d;const S=`axis_${e}`,E={width:0,height:0};let C;if(f||n||!s[`${S}_show`]||d.width>0&&i.filterTargetsToShow().length===0)return d;if((l||s.render_mode==="canvas")&&((r=i.scale[e])!=null&&r.copy)){const w=/^y2?$/.test(e),$=i.getTargetsToShow(),z=i.scale[e].copy().domain(i[`get${w?"Y":"X"}Domain`]($,e)),B=z.domain(),W=B[0]===B[1]&&B.every(St=>St>0),H=qe(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(St=>St>0);if(W||H)return d;d.domain=B,w||Au(d.ticks);const Q=this.getAxis(e,z,!1,!1,!0),q=s[`${S}_tick_rotate`],st=s[`${S}_tick_count`];if(!s[`${S}_tick_values`]&&st&&Q.tickValues(this.generateTickValues(B,st,w?this.isTimeSeriesY():this.isTimeSeries())),!w&&this.updateXAxisTickValues($,Q),C=this.getMaxTickSizeFingerprint(e,z,B,Q,q,n),(m==null?void 0:m.fingerprint)===C)return i.cache.add(h,x2(m2({},m),{generation:o.redrawGeneration})),P2(d,m.value);const ot=Q.tickValues(),ct=!w&&Array.isArray(ot)&&ot.length>al;ct&&Q.tickValues(S2(ot,Q.tickFormat()));const gt=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),tt=gt.append("g").attr("class",`${Rn[`axis${Ln(e)}`]} ${ze.dummy}`);Q.create(tt);const{sizeFor1Char:ft}=tt.node(),lt=gt.selectAll("text").attr("transform",ae(q)?`rotate(${q})`:null),bt=ct?ot.length:lt.size();if(ft)lt.each(function(St,Mt){const Ot=this.textContent.length*ft.w,Kt=ft.h;E.width=Math.max(E.width,Ot),E.height=Math.max(E.height,Kt),w||(d.ticks[Mt]=Ot)});else{const St=[];if(lt.each(function(){St.push(this)}),(St.length<=5?St:y2(St)).map(Ot=>ln(Ot,!0)).forEach(Ot=>{E.width=Math.max(E.width,Ot.width),E.height=Math.max(E.height,Ot.height)}),!w)for(let Ot=0;Ot<St.length;Ot++)d.ticks[Ot]=E.width}!w&&ct&&E2(d.ticks,bt,E.width),gt.remove()}return Object.keys(E).forEach(w=>{E[w]>0&&(d[w]=E[w])}),i.cache.add(h,{fingerprint:C,generation:o.redrawGeneration,value:O2(d)}),d}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:r,config:i,state:{current:s,isLegendRight:o,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),u=c>0&&c<90;if((r.isCategorized()||r.isTimeSeries())&&i.axis_x_tick_fit&&(!i.axis_x_tick_culling||lr(i.axis_x_tick_culling))&&!i.axis_x_tick_multiline&&u){const f=i.axis_y2_show&&s.maxTickSize.y2.width||0,d=o&&l||0,h=s.width-n.getCurrentPaddingByDirection("left"),m=this.getXAxisTickMaxOverflow(c,h-e)-f-d,S=Math.max(0,m)+e;return Math.min(S,h/2)}return 0}getXAxisTickMaxOverflow(e,n){var r;const i=this.owner,{axis:s,config:o,state:l}=i,c=s.isTimeSeries(),u=l.current.maxTickSize.x.ticks,f=u.length,d=(r=Su(u))!=null?r:l.current.maxTickSize.x.width,{left:h,right:m}=l.axis.x.padding;let S=0;const E=f-(c&&o.axis_x_tick_fit?.5:0);for(let $=0;$<f;$++){const z=$+1,B=Math.cos(Math.PI*e/180)*R2(u,$,d),W=z-(c?1:.5)+h;if(W<=0)continue;const Q=(n-B)/W,q=E-z,st=m*Q,it=q*Q+st,ot=B-Q/2-it;S=Math.max(S,ot)}const C=i.getTargetsToShow();let w=0;if(!c&&o.axis_x_tick_count<=C.length&&C[0].values.length){const $=sa(i.axis.getAxisType("x"),0,n-S).domain([h*-1,i.getXDomainMax(i.data.targets)+1+m]);w=($(1)-$(0))/2}return S+w}updateLabels(e){const n=this.owner,{config:r,$el:{main:i},$T:s}=n,o=r.axis_rotated;["x","y","y2"].forEach(l=>{const c=this.getLabelText(l),u=`axis${Ln(l)}`,f=Rn[`${u}Label`];if(c){let d=i.select(`text.${f}`);d.empty()&&(d=i.select(`g.${Rn[u]}`).insert("text",":first-child").attr("class",f).attr("transform",["rotate(-90)",null][l==="x"?+!o:+o]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),s(d,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,r,i){const s=ae(e)?e:e[n];return Ge(s)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",s,i):r}generateTickValues(e,n,r){let i=e;if(n){const s=ie(n)?n():n;if(s===1)i=[e[0]];else if(s===2)i=[e[0],e[e.length-1]];else if(s>2){const o=this.isCategorized(),l=s-2,c=e[0],u=e[e.length-1],f=(u-c)/(l+1);let d;i=[c];for(let h=0;h<l;h++)d=+c+f*(h+1),i.push(r?new Date(d):o?Math.round(d):d);i.push(u)}}return r||(i=i.sort((s,o)=>s-o)),i}generateTransitions(e){const n=this.owner,{$el:{axis:r},$T:i}=n,[s,o,l,c,u,f]=["x","y","y2","subX","subY","subY2"].map(d=>i(r[d],e));return{axisX:s,axisY:o,axisY2:l,axisSubX:c,axisSubY:u,axisSubY2:f}}redraw(e,n,r){const i=this.owner,{config:s,state:o,$el:l}=i,c=n?"0":null;["x","y","y2","subX","subY","subY2"].forEach(u=>{const f=this[u],d=l.axis[u];f&&d&&(!r&&!s.transition_duration&&(f.config.withoutTransition=!0),d.style("opacity",c),f.create(e[`axis${Ln(u)}`]))}),this.updateAxes(),!o.rendered&&s.axis_tooltip&&this.setAxisTooltip()}syncAxisDomains(e,n,r){var i;const s=this.owner,{config:o,scale:l,$el:c}=s,u=!!l.zoom;let f;if(!u&&this.isCategorized()&&e.length===0&&c.axis.x&&l.x.domain([0,c.axis.x.selectAll(".tick").size()]),l.x&&e.length?(!u&&s.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),o.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(i=this.subX)==null||i.tickValues([])),o.zoom_rescale&&!r&&(f=l.x.orgDomain()),["y","y2"].forEach(d=>{const h=`axis_${d}_`,m=l[d];if(m){const S=o[`${h}tick_values`],E=o[`${h}tick_count`];if(m.domain(s.getYDomain(e,d,f)),!S&&E){const C=s.axis[d],w=m.domain();C.tickValues(this.generateTickValues(w,w.every($=>$===0)?1:E,this.isTimeSeriesY()))}}}),n.Y){const d=()=>{var h,m;(h=l.subY)==null||h.domain(s.getYDomain(e,"y")),(m=l.subY2)==null||m.domain(s.getYDomain(e,"y2")),["y","y2"].forEach(S=>{const E=S==="y2"?"subY2":"subY",C=l[E],w=s.axis[E],$=this.getTickValues(S,!0),z=pa(o,E,"count");if(!C||!w||$||!z)return;const B=C.domain();w.tickValues(this.generateTickValues(B,B.every(W=>W===0)?1:z,this.isTimeSeriesY()))})};o.subchart_show?s.withSubchartTypeContext(d):d()}}redrawAxis(e,n,r,i,s){const o=this.owner;this.syncAxisDomains(e,n,i),this.redraw(r,o.hasArcType(),s),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling()}setCulling(){const e=this.owner,{config:n,state:{clip:r,current:i},$el:s}=e;["subX","x","y","y2","subY","subY2"].forEach(o=>{const l=s.axis[o],c=pa(n,o,"culling");if(l&&c){const u=l.selectAll(".tick"),f=ti(u.data(),!pa(n,o,"culling_reverse")),d=f.length,h=pa(n,o,"culling_max"),S=!pa(n,o,"culling_lines")||b2(this[o],f,T2(u));let E;if(d){for(let w=1;w<d;w++)if(d/w<h){E=w;break}E=E!=null?E:d;const C=new Map;for(let w=0;w<f.length;w++)C.set(f[w],w);u.each(function(w){var $;const z=S?this:this.querySelector("text");z&&(z.style.display=(($=C.get(w))!=null?$:0)%E?"none":null)})}else u.style("display",null);if(o==="x"){const C=i.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;s.svg.selectAll(`.${Rn.axisX} .tick text`).attr("clip-path",C)}}})}setAxisTooltip(){var e;const n=this.owner,{config:{axis_rotated:r,axis_tooltip:i},$el:{axis:s,axisTooltip:o}}=n,l=(e=i.backgroundColor)!=null?e:"black";n.generateTextBGColorFilter(l,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(c=>{var u,f,d;if(je(l)||l[c])if(o[c]=(u=s[c])==null?void 0:u.append("text").classed(Rn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),r){const h=c==="x"?"x":"y",m=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(f=o[c])==null||f.attr(h,m).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const h=c==="x"?"y":"x",m=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(d=o[c])==null||d.attr(h,m).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var ap=Math.pow,D2={initEventRect(){this.$el.main.select(`.${ze.chart}`).append("g").attr("class",Zr.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:r,$el:i}=e,s=e.isMultipleX(),o=n.axis_x_inverted;if(i.eventRect)e.updateEventRect(i.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${Zr.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(Zr.eventRectsMultiple,s).classed(Zr.eventRectsSingle,!s).selectAll(`.${Zr.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),i.eventRect=c,e.state.inputType==="touch"&&!i.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),r.rendered&&e.updateEventRect(i.eventRect,!0)}if(!s){const l=e.getMaxDataCountTarget();(!n.data_xSort||o)&&l.sort((c,u)=>o?u.x-c.x:c.x-u.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),r.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:r,svg:i}}=t,s=m=>{if(t.isMultipleX())t.selectRectForMultipleXs(m);else{const S=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(S),S===-1?t.unselectRect():t.selectRectForSingle(m,S)}},o=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=Ra(l)&&l||!1,u=!isNaN(l)&&l||null;let f;const d=!c&&u===null,h=m=>{const S=m.type,C=m.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];S==="touchstart"?c?m.preventDefault():u!==null&&(f=C):S==="touchmove"&&(c||f===!0||u!==null&&Math.abs(f-C)>=u)&&(f=!0,m.preventDefault())};r.on("touchstart",m=>{n.event=m,t.updateEventRect()},{passive:d}).on("touchstart.eventRect touchmove.eventRect",m=>{if(n.event=m,!r.empty()&&r.classed(Zr.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||m.touches.length>1)return;h(m),s(r.node())}else o()},{passive:d}).on("touchend.eventRect",m=>{n.event=m,!r.empty()&&r.classed(Zr.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},{passive:d}),i.on("touchstart",m=>{n.event=m;const{target:S}=m;S&&S!==r.node()&&o()},{passive:d})},updateEventRect(t,e=!1){const n=this,{state:r,$el:i}=n,{eventReceiver:s,width:o,height:l,rendered:c,resizing:u}=r,f=t||i.eventRect,d=()=>{if(s){const h=Oh(i.chart.node());s.rect=ln(f.node(),!0).toJSON(),s.rect.top+=h.y,s.rect.left+=h.x}};(!c||u||e)&&(f.attr("x",0).attr("y",0).attr("width",o).attr("height",l),(!c||e)&&f.classed(Zr.eventRect,!0)),d()},updateEventType(t){const e=this,n=Ra(t),r=n?e.$el.eventRect:t,i=n?t!==(r==null?void 0:r.datum().multipleX):!1;r&&(i&&(r==null||r.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(r):e.generateEventRectsForSingleX(r))},updateEventRectData(){const t=this,{config:e,scale:n,state:r}=t,i=n.zoom||n.x,s=e.axis_rotated,o=t.isMultipleX(),l=i==null?void 0:i.domain(),c=l?`${l[0]}_${l[1]}_${r.width}_${r.height}_${t.data.targets.length}_${r.dataGeneration}_${[...r.hiddenTargetIds].join(",")}`:null;if(c&&c===r._eventRectFingerprint)return;r._eventRectFingerprint=c;let u,f,d,h;if(t.updateEventType(o),o)u=0,f=0,d=r.width,h=r.height;else{let E,C;if(t.axis.isCategorized())E=t.getEventRectWidth(),C=w=>i(w.x)-E/2;else{const w=({index:$})=>({prev:t.getPrevX($),next:t.getNextX($)});E=$=>{const z=w($),B=i.domain();let W;return z.prev===null&&z.next===null?W=s?r.height:r.width:z.prev===null?W=(i(z.next)+i($.x))/2:z.next===null?W=i(B[1])-(i(z.prev)+i($.x))/2:W=Math.max(0,(i(z.next)-i(z.prev))/2),W},C=$=>{const z=w($);let B;return z.prev===null&&z.next===null?B=0:z.prev===null?B=i(i.domain()[0]):B=(i($.x)+i(z.prev))/2,B}}u=s?0:C,f=s?C:0,d=s?r.width:E,h=s?E:r.height}const{eventReceiver:m}=r,S=(E,C)=>ie(E)?E(C):E;m.coords.splice(m.data.length),m.data.forEach((E,C)=>{m.coords[C]={x:S(u,E),y:S(f,E),w:S(d,E),h:S(h,E)}})},selectRectForSingle(t,e){var n,r,i,s,o,l,c;const u=this,{config:f,state:d,$el:{main:h,circle:m}}=u,S=f.data_selection_enabled,E=f.data_selection_grouped,C=f.data_selection_isselectable,w=f.tooltip_grouped,$=u.getAllValuesOnIndex(e);if(w&&(u.showTooltip($,t),(n=u.showGridFocus)==null||n.call(u,$),(r=u.showSubchartGridFocus)==null||r.call(u,$),!S||E))return;!m&&h.selectAll(`.${ze.EXPANDED}:not(.${Tn.shape}-${e})`).classed(ze.EXPANDED,!1);const z=h.selectAll(`.${Tn.shape}-${e}`).classed(ze.EXPANDED,!0).style("cursor",C?"pointer":null).filter(function(B){return u.isWithinShape(this,B)});if(z.call(B=>{var W,H,Q;const q=B.data();S&&(E||C!=null&&C.bind(u.api)(q))&&(t.style.cursor="pointer"),w||(u.showTooltip(q,t),(W=u.showGridFocus)==null||W.call(u,q),(H=u.showSubchartGridFocus)==null||H.call(u,q),(Q=u.unexpandCircles)==null||Q.call(u),B.each(st=>u.setExpand(e,st.id)))}),!w&&z.empty()){const B=Jn(d.event,t),W=$.filter(H=>u.isTargetToShow(H.id)?u.dist(H,B)<u.getPointSensitivity(H):!1);if(W.length>0){let H=W[0],Q=u.dist(H,B);for(let q=1;q<W.length;q++){const st=W[q],it=u.dist(st,B);it<Q&&(Q=it,H=st)}u.showTooltip([H],t),(i=u.showGridFocus)==null||i.call(u,[H]),(s=u.showSubchartGridFocus)==null||s.call(u,[H]),(o=u.unexpandCircles)==null||o.call(u),u.setExpand(e,H.id,!0),S&&(E||C!=null&&C.bind(u.api)(H))&&(t.style.cursor="pointer")}else f.interaction_onout&&((l=u.hideGridFocus)==null||l.call(u),(c=u.hideSubchartGridFocus)==null||c.call(u),u.hideTooltip(),!E&&u.setExpand(e))}},selectRectForMultipleXs(t,e=!0){var n,r;const i=this,{config:s,state:o}=i,l=i.getTargetsToShow();if(o.dragging||i.hasArcType(l))return;const c=Jn(o.event,t),u=i.findClosestFromTargets(l,c);if(e&&o.mouseover&&(!u||u.id!==o.mouseover.id)&&(s.data_onout.call(i.api,o.mouseover),o.mouseover=void 0),!u){i.unselectRect();return}const d=(i.isBubbleType(u)||i.isScatterType(u)||!s.tooltip_grouped?[u]:i.filterByX(l,u.x)).map(m=>i.addName(m));i.showTooltip(d,t),i.setExpand(u.index,u.id,!0),(n=i.showGridFocus)==null||n.call(i,d),(r=i.showSubchartGridFocus)==null||r.call(i,d);const h=i.dist(u,c);(i.isBarType(u.id)||h<i.getPointSensitivity(u))&&(i.$el.eventRect.style("cursor","pointer"),e&&(!o.mouseover||o.mouseover.x!==u.x||o.mouseover.id!==u.id)&&(s.data_onover.call(i.api,u),o.mouseover=u))},unselectRect(){var t,e,n,r;const i=this,{state:s,$el:{circle:o,tooltip:l}}=i;if(s._lastTooltipMouse=null,s.isCanvasMode){(t=i.clearCanvasFocus)==null||t.call(i),l&&i.hideTooltip();return}(e=i.$el.eventRect)==null||e.style("cursor",null),(n=i.hideGridFocus)==null||n.call(i),(r=i.hideSubchartGridFocus)==null||r.call(i),l&&(i.hideTooltip(),i._handleLinkedCharts(!1)),o&&!i.isPointFocusOnly()&&i.unexpandCircles(),i.expandBarTypeShapes(!1)},generateEventRectsForSingleX(t){const e=this,{config:n,state:r}=e,{eventReceiver:i}=r,s=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(o){r.event=o;const{currentIdx:l,data:c}=i,u=c[l===-1?e.getDataIndexFromEvent(o):l];e.clickHandlerForSingleX.bind(this)(u,e)}).datum({multipleX:!1});if(r.inputType==="mouse"){const o=l=>{const c=l?e.getDataIndexFromEvent(l):i.currentIdx;return c>-1?i.data[c]:null};s.on("mouseover",l=>{r.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){var c;const u=o(l);if(r.event=l,!u)return;let{index:f}=u;const d=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(d)){const m=e.scale.zoom||e.scale.x,S=e.axis.xs[f],E=m.invert(Jn(l,this)[0]);d==="step-after"&&E<S?f-=1:d==="step-before"&&E>S&&(f+=1)}(c=e.showAxisGridFocus)==null||c.call(e);const h=n.tooltip_grouped&&f===i.currentIdx;if(r.dragging||r.flowing||e.hasArcType()||h){if(n.tooltip_show&&h){const[m,S]=Jn(l,this),E=r._lastTooltipMouse;(!E||ap(m-E[0],2)+ap(S-E[1],2)>=9)&&(r._lastTooltipMouse=[m,S],e.setTooltipPosition())}return}f!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=f),f===-1?e.unselectRect():e.selectRectForSingle(this,f),e.setOverOut(f!==-1,f)}).on("mouseout",l=>{var c;r.event=l,!(!e.config||e.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&((c=e.hideAxisGridFocus)==null||c.call(e),e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return s},clickHandlerForSingleX(t,e){const n=e,{config:r,state:i,$el:{main:s}}=n;if(!t||n.hasArcType()||i.cancelClick){i.cancelClick&&(i.cancelClick=!1);return}const{index:o}=t;s.selectAll(`.${Tn.shape}-${o}`).each(function(l){var c;(r.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,o),r.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:r}=e;t.on("click",function(i){r.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),r.inputType==="mouse"&&t.on("mouseover mousemove",function(i){r.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",i=>{r.event=i,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:r}=e,i=e.getTargetsToShow();if(e.hasArcType(i))return;const s=Jn(r.event,this),o=e.findClosestFromTargets(i,s);if(!o)return;const l=e.getPointSensitivity(o);(e.isBarType(o.id)||e.dist(o,s)<l)&&e.$el.main.selectAll(`.${Tn.shapes}${e.getTargetSelectorSuffix(o.id)}`).selectAll(`.${Tn.shape}-${o.index}`).each(function(){var c;(n.data_selection_grouped||e.isWithinShape(this,o))&&((c=e.toggleShape)==null||c.call(e,this,o,o.index),n.data_onclick.bind(e.api)(o,this))})}},F2={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?0:20),c=(o?r.top+s+10:r.bottom)+20,u=o?-(1+l):-(l-1),f=-15,d=o?r.left+20:i+10+l;t.attr("x",u).attr("y",f).attr("width",d).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?20:0),c=n.axis_y_inner,u=c&&!o?n.axis_y_label.text?-20:-1:o?-(1+l):-(l-1),f=-(o?20:r.top),d=(o?i+15+l:r.left+20)+(c?20:0),h=(o?r.bottom+10:r.top+s)+10;t.attr("x",u).attr("y",f).attr("width",d).attr("height",h)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:r},$el:{defs:i}}=t,s=t.getHorizontalAxisHeight("x");if(i&&!n.idXAxisTickTexts){const o=`${n.id}-xaxisticktexts`;t.appendClip(i,o),n.idXAxisTickTexts=o,n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts)}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){const i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:r}}=t;r&&r.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},N2={getAxisSize(t){const e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId(t,e){var n,r;const i=this;if(i.axis){const s=(n=i.axis)==null?void 0:n.getAxisLabelPosition(t),{width:o}=i.axis.getMaxTickSize(t,e),l=o===0?.5:0;return o+(((r=i.config.padding)==null?void 0:r.mode)==="fit"?s.isInner?10+l:10:s.isInner?20+l:40)}else return 40},getHorizontalAxisHeight(t){var e,n;const r=this,{config:i,state:s}=r,{rotatedPadding:o,isLegendRight:l,isLegendInset:c}=s,u=i.axis_rotated,f=((e=i.padding)==null?void 0:e.mode)==="fit",d=i[`axis_${t}_inner`],h=i[`axis_${t}_label`].text,m=13;let S=((n=i.padding)==null?void 0:n.mode)==="fit"?d&&!h?t==="y"?1:0:20:30;if(t==="x"&&!i.axis_x_show)return 8;if(t==="x"&&ae(i.axis_x_height))return i.axis_x_height;if(t==="y"&&!i.axis_y_show)return i.legend_show&&!l&&!c?10:1;if(t==="y2"&&!i.axis_y2_show)return f?0:o.top;const E=r.axis.getMaxTickSize(t),C=Math.abs(i.axis_x_tick_rotate)>0&&(!i.axis_x_tick_autorotate||r.needToRotateXAxisTickTexts());return(i.axis_x_tick_multiline||C)&&E.height>m&&(S+=E.height-m),S+(r.axis.getAxisLabelPosition(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,r=e.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,r?Math.abs(i):i)},getAxisTickRotate(t){const e=this,{axis:n,config:r,state:i,$el:s}=e;let o=r[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&l){const c=r.axis_x_tick_count,u=i.current.maxTickSize.x.ticks.length;let f=0;if(c?f=c>u?u:c:u&&(f=u),f!==i.axis.x.tickCount){const{targets:d}=e.data;i.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(d,"min"),e.getXDomainMinMax(d,"max")],f)}i.axis.x.tickCount=f}(s.svg||i.isCanvasMode)&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&l&&(o=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:r,legendItemWidth:i}}=t,s=r&&i,o=n.width-s-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),u=l?o/l:0;return c>u}},$2={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},B2={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},z2={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},U2=Object.defineProperty,ip=Object.getOwnPropertySymbols,k2=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable,sp=(t,e,n)=>e in t?U2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iu=(t,e)=>{for(var n in e||(e={}))k2.call(e,n)&&sp(t,n,e[n]);if(ip)for(var n of ip(e))G2.call(e,n)&&sp(t,n,e[n]);return t},X2=Iu(Iu(Iu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},$2),B2),z2),W2={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const V2=[r2,a2,i2],op={axis:M2,clip:F2,eventrect:D2,sizeAxis:N2},lp={optDataAxis:W2,optAxis:X2};function cp(t){return Object.keys(t).map(e=>t[e])}function up(t=[],e=[]){xn(Sr.prototype,cp(op).concat(t)),xn(jn.prototype,V2),$a.setOptions(cp(lp).concat(e))}function Ts(t=[],e=[]){up(t,e)}function ea(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];up([Ti,tl,e2].concat(n),[ka,n2].concat(e))}let fp=()=>(ea(xi,[yi]),(fp=()=>qt.AREA)()),dp=()=>(ea(xi,[yi]),(dp=()=>qt.AREA_LINE_RANGE)()),hp=()=>(ea(xi,[yi]),(hp=()=>qt.AREA_STEP_RANGE)()),vp=()=>(ea(xi,[yi,xu]),(vp=()=>qt.AREA_SPLINE)()),gp=()=>(ea(xi,[yi,xu]),(gp=()=>qt.AREA_SPLINE_RANGE)()),pp=()=>(ea(xi,[yi]),(pp=()=>qt.AREA_STEP)());function Ru(t){const e=this.config.bar_connectLine,n=(e==null?void 0:e[t])||e;return/^(start|end)\-(start|end)$/.test(n)?n:null}var j2={initBar(){const{$el:t,config:e,state:{clip:n}}=this;t.bar=t.main.select(`.${ze.chart}`),t.bar=e.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",rr.chartBars).call(this.setCssRule(!1,`.${rr.chartBars}`,["pointer-events:none"])),e.clipPath===!1&&(e.bar_radius||e.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,`#${n.id}`))},updateTargetsForBar(t){const e=this,{config:n}=e,r=e.getClass("bars",!0),i=n.interaction_enabled&&n.data_selection_isselectable;su.call(e,t,{type:"Bar",elKey:"bar",containerClass:rr.chartBars,itemClass:rr.chartBar,initFn:e.initBar}).append("g").attr("class",r).style("cursor",o=>{var l;return(l=i==null?void 0:i.bind)!=null&&l.call(i,e.api)(o)?"pointer":null}).call(o=>{e.setCssRule(!0,` .${rr.bar}`,["fill"],e.color)(o),o.each(function(l){Ru.call(e,l.id)&&Yt(this).append("path").attr("class",rr.barConnectLine)})})},updateBar(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,$el:i,$T:s}=n,o=e?i.subchart:i,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();const u=o.main.selectAll(`.${rr.bars}`).selectAll(`.${rr.bar}`).data(n.labelishData.bind(n));s(u.exit(),t).style("opacity","0").remove(),o.bar=u.enter().append("path").attr("class",l).style("fill",n.generateUpdateBarColor()).merge(u).style("opacity",c),n.setRatioForGroupedData(o.bar.data())},generateUpdateBarColor(){const t=this,e=t.getStylePropValue(t.color)||(()=>null);return n=>Yv.call(t,n,"bar_linearGradient",e)},updateBarColor(t){return this.generateUpdateBarColor()(t)},redrawBar(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{bar:i}=n?r.$el.subchart:r.$el,s=[],o=new Map,l=uo(r),c=r.generateUpdateBarColor(),u=function(d,h,m){var S;const C=ae(d.value)||r.isBarRangeType(d)||((S=r.isSubchartCandlestickBarValue)==null?void 0:S.call(r,d,n))?t(d,h):[""];let w=o.get(d.id);if(w===void 0&&(w=Ru.call(r,d.id),o.set(d.id,w)),C.length>1&&s.push(C[1]),h===m.length-1&&s.length){const $=r.$T(Yt(this.parentNode.querySelector(`.${rr.barConnectLine}`)),e,Ir());r.updateConnectLine($,w,s),s.splice(0)}return C[0]},f=r.$T(i,e,Ir());return l&&typeof f.attrTween=="function"?f.attrTween("d",function(d,h,m){var S;const E=u.call(this,d,h,m);return k0((S=this.getAttribute("d"))!=null?S:"",E)}):f.attr("d",u),[f.style("fill",d=>{var h;return((h=r.getSubchartCandlestickBarColor)==null?void 0:h.call(r,d,n))||c(d)}).style("clip-path",d=>d.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:r}=n,i=n.generateGetBarPoints(t,e),s=uo(n),o=s?ic(n):new Set,l=new Map;return(c,u)=>{const f=i(c,u),{indexX:d,indexY:h,isNegative:m,pos:S,radius:E,clipPath:C}=sc(n,c,f,s,o,n.isStackingRadiusData.bind(n)),w=["",""];if(c.clipPath=C,s){const W=`a${E} ${E} ${m?"1 0 0":"0 0 1"} `;w[h]=`${W}${E},${E}`,w[d]=`${W}${[-E,E][r.axis_rotated?"sort":"reverse"]()}`,m&&w.reverse()}const $=r.axis_rotated?`H${S} ${w[0]}V${f[2][h]-E} ${w[1]}H${f[3][d]}`:`V${S} ${w[0]}H${f[2][d]-E} ${w[1]}V${f[3][h]}`,z=[`M${f[0][d]},${f[0][h]}${$}z`];let B=l.get(c.id);return B===void 0&&(B=Ru.call(n,c.id),l.set(c.id,B)),B&&z.push(r.axis_rotated?{x:f[0][d],y:f[0][h],width:f[0][d]-S,height:f[2][h]-f[0][h]}:{x:f[0][d],y:S,width:f[2][d]-f[0][d],height:f[3][h]-S}),z}},isStackingRadiusData(t){const e=this,{$el:n,config:r,data:i,state:s}=e,{id:o,index:l,value:c}=t;if(s.hiddenTargetIds.has(o)){const h=n.bar.filter(m=>m.id===o&&m.value===c);return!h.empty()&&/a\d+/i.test(h.attr("d"))}const u=r.data_groups.find(h=>h.indexOf(o)>-1),d=e.orderTargets(e.filterTargetsToShow(i.targets.filter(e.isBarType,e))).filter(h=>u.indexOf(h.id)>-1).map(h=>{const m=h.values[l];if(m&&(ae(c)&&c>0?m.value>0:m.value<0))return m}).filter(Boolean).map(h=>h.id);return c!==0&&d.indexOf(o)===d.length-1},updateConnectLine(t,e,n){const r=n.map((i,s,o)=>{const l=this.config.axis_rotated,c=/^start-(start|end)$/.test(e),u=/^end-(start|end)$/.test(e),f=[],d=l?u?i.x-i.width:i.x:i.x+i.width,h=l||c?i.y+i.height:i.y;return s===0?f.push(`${d},${h}`):(f.push(l?`L${i.x-(/\w+-end$/.test(e)?i.width:0)},${i.y}`:`L${i.x},${i.y+(/\w+-start$/.test(e)?i.height:0)}`),s<o.length-1&&f.push(`M${d},${h}`)),f.join(" ")});t.attr("d",`M${r.join("")}z`)}},H2={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0};let mp=()=>(Ts([j2,Ti],[H2,ka]),(mp=()=>qt.BAR)());var Y2={initBubble(){const t=this,{config:e}=t;t.hasType("bubble")&&(e.point_show=!0,e.point_type="circle")},getBaseLength(){const t=this,{width:e,height:n}=t.state,r=Oe.bubbleBaseLength;let i=t.cache.get(r);return i||t.cache.add(r,i=mr("min",[e,n])),i},getBubbleR(t){const e=this;let n=e.config.bubble_maxR;ie(n)?n=n.bind(e.api)(t):ae(n)||(n=e.getBaseLength()/(e.getMaxDataCount()*2)+12);const r=Oe.bubbleMaxValue;let i=e.cache.get(r);i===null&&e.cache.add(r,i=mr("max",e.getMinMaxData().max.map(l=>e.isBubbleZType(l)?e.getBubbleZData(l.value,"y"):He(l.value)?l.value.mid:l.value)));const s=n*n*Math.PI,o=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(s/i);return Math.sqrt(o/Math.PI)},getBubbleZData(t,e){return He(t)?t[e]:t[e==="y"?0:1]}},K2=Y2,Z2={bubble_maxR:35,bubble_zerobased:!1};let xp=()=>(Ts([Ti,tl,K2],[Z2,ka]),(xp=()=>qt.BUBBLE)());var J2=Object.defineProperty,yp=Object.getOwnPropertySymbols,Q2=Object.prototype.hasOwnProperty,_2=Object.prototype.propertyIsEnumerable,Tp=(t,e,n)=>e in t?J2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q2=(t,e)=>{for(var n in e||(e={}))Q2.call(e,n)&&Tp(t,n,e[n]);if(yp)for(var n of yp(e))_2.call(e,n)&&Tp(t,n,e[n]);return t},tI={generateGetCandlestickPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,i=n.getIndicesMax(t)+1,s=n.getBarW("candlestick",r,i),o=n.getShapeX(s,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isCandlestickType,t,!!e),u=n.getYScaleById.bind(n);return(f,d)=>{const h=u.call(n,f.id,e)(n.getShapeYMin(f.id,e)),m=c(f,d)||h,S=ae(s)?s:s[f.id]||s._$width,E=n.getCandlestickData(f);let C;if(E&&ae(E.open)&&ae(E.close)){const w={start:o(f),end:0};w.end=w.start+S;const $={start:l(E.open),end:l(E.close)},z={x:w.start+S/2,high:l(E.high),low:l(E.low)},B=h-m;$.start-=B,$.end-=B,z.high-=B,z.low-=B,C=[[w.start,$.start],[w.end,$.end],[z.x,z.low,z.high]]}else C=[[0,0],[0,0],[0,0,0]];return C}},getCandlestickData({value:t}){let e;if(qe(t)){const[n,r,i,s,o=!1]=t;e={open:n,high:r,low:i,close:s},o!==!1&&(e.volume=o)}else He(t)&&(e=q2({},t));return e&&(e._isUp=e.close>=e.open),e||null}},eI=Object.defineProperty,nI=Object.defineProperties,rI=Object.getOwnPropertyDescriptors,bp=Object.getOwnPropertySymbols,aI=Object.prototype.hasOwnProperty,iI=Object.prototype.propertyIsEnumerable,Sp=(t,e,n)=>e in t?eI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sI=(t,e)=>{for(var n in e||(e={}))aI.call(e,n)&&Sp(t,n,e[n]);if(bp)for(var n of bp(e))iI.call(e,n)&&Sp(t,n,e[n]);return t},oI=(t,e)=>nI(t,rI(e)),lI=oI(sI({},tI),{initCandlestick(){Kv.call(this,{elKey:"candlestick",className:Kr.chartCandlesticks})},updateTargetsForCandlestick(t){su.call(this,t,{type:"Candlestick",elKey:"candlestick",containerClass:Kr.chartCandlesticks,itemClass:Kr.chartCandlestick,initFn:this.initCandlestick,withFocus:!1,withStyles:!1}).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:r,$T:i}=n,s=e?r.subchart:r,o=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=s.main.selectAll(`.${Kr.chartCandlestick}`).selectAll(`.${Kr.candlestick}`).data(n.labelishData.bind(n));i(c.exit(),t).style("opacity","0").remove();const u=c.enter().filter(f=>f.value).append("g").attr("class",o);u.append("line"),u.append("path"),s.candlestick=c.merge(u).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:r}=n,i=n.generateGetCandlestickPoints(t,e),s=r.axis_rotated,o=r.candlestick_color_down;return(l,c,u)=>{const f=i(l,c),d=n.getCandlestickData(l),h=d==null?void 0:d._isUp,m=+s,S=+!m;u.classed&&u.classed(Kr[h?"valueUp":"valueDown"],!0);const E=s?`H${f[1][1]} V${f[1][0]} H${f[0][1]}`:`V${f[1][1]} H${f[1][0]} V${f[0][1]}`;u.select("path").attr("d",`M${f[0][m]},${f[0][S]}${E}z`).style("fill",$=>(h?n.color($):He(o)?o[$.id]:o)||n.color($));const C=u.select("line"),w=s?{x1:f[2][1],x2:f[2][2],y1:f[2][0],y2:f[2][0]}:{x1:f[2][0],x2:f[2][0],y1:f[2][1],y2:f[2][2]};for(const $ in w)C.attr($,w[$])}},redrawCandlestick(t,e,n=!1){const r=this,{$el:i,$T:s}=r,{candlestick:o}=n?i.subchart:i,l=Ir(!0);return[o.each(function(c,u){const f=s(Yt(this),e,l);t(c,u,f)}).style("opacity",null)]}}),cI={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let Ap=()=>(Ts([lI,Ti],[cI,ka]),(Ap=()=>qt.CANDLESTICK)());var sl={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},uI={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0};function fI(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function dI(t){return t}function hI(){var t=dI,e=fI,n=null,r=Je(0),i=Je(Wo),s=Je(0);function o(l){var c,u=(l=oc(l)).length,f,d,h=0,m=new Array(u),S=new Array(u),E=+r.apply(this,arguments),C=Math.min(Wo,Math.max(-Wo,i.apply(this,arguments)-E)),w,$=Math.min(Math.abs(C)/u,s.apply(this,arguments)),z=$*(C<0?-1:1),B;for(c=0;c<u;++c)(B=S[m[c]=c]=+t(l[c],c,l))>0&&(h+=B);for(e!=null?m.sort(function(W,H){return e(S[W],S[H])}):n!=null&&m.sort(function(W,H){return n(l[W],l[H])}),c=0,d=h?(C-u*z)/h:0;c<u;++c,E=w)f=m[c],B=S[f],w=E+(B>0?B*d:0)+z,S[f]={data:l[f],index:c,value:B,startAngle:E,endAngle:w,padAngle:$};return S}return o.value=function(l){return arguments.length?(t=typeof l=="function"?l:Je(+l),o):t},o.sortValues=function(l){return arguments.length?(e=l,n=null,o):e},o.sort=function(l){return arguments.length?(n=l,e=null,o):n},o.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:Je(+l),o):r},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Je(+l),o):i},o.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Je(+l),o):s},o}function vI(t){return t.innerRadius}function gI(t){return t.outerRadius}function pI(t){return t.startAngle}function mI(t){return t.endAngle}function xI(t){return t&&t.padAngle}function yI(t,e,n,r,i,s,o,l){var c=n-t,u=r-e,f=o-i,d=l-s,h=d*c-f*u;if(!(h*h<kn))return h=(f*(e-s)-d*(t-i))/h,[t+h*c,e+h*u]}function ol(t,e,n,r,i,s,o){var l=t-n,c=e-r,u=(o?s:-s)/gi(l*l+c*c),f=u*c,d=-u*l,h=t+f,m=e+d,S=n+f,E=r+d,C=(h+S)/2,w=(m+E)/2,$=S-h,z=E-m,B=$*$+z*z,W=i-s,H=h*E-S*m,Q=(z<0?-1:1)*gi(jA(0,W*W*B-H*H)),q=(H*z-$*Q)/B,st=(-H*$-z*Q)/B,it=(H*z+$*Q)/B,ot=(-H*$+z*Q)/B,ct=q-C,gt=st-w,tt=it-C,ft=ot-w;return ct*ct+gt*gt>tt*tt+ft*ft&&(q=it,st=ot),{cx:q,cy:st,x01:-f,y01:-d,x11:q*(i/W-1),y11:st*(i/W-1)}}function Ep(){var t=vI,e=gI,n=Je(0),r=null,i=pI,s=mI,o=xI,l=null,c=uc(u);function u(){var f,d,h=+t.apply(this,arguments),m=+e.apply(this,arguments),S=i.apply(this,arguments)-Xo,E=s.apply(this,arguments)-Xo,C=Lv(E-S),w=E>S;if(l||(l=f=c()),m<h&&(d=m,m=h,h=d),!(m>kn))l.moveTo(0,0);else if(C>Wo-kn)l.moveTo(m*Ua(S),m*Nr(S)),l.arc(0,0,m,S,E,!w),h>kn&&(l.moveTo(h*Ua(E),h*Nr(E)),l.arc(0,0,h,E,S,w));else{var $=S,z=E,B=S,W=E,H=C,Q=C,q=o.apply(this,arguments)/2,st=q>kn&&(r?+r.apply(this,arguments):gi(h*h+m*m)),it=eu(Lv(m-h)/2,+n.apply(this,arguments)),ot=it,ct=it,gt,tt;if(st>kn){var ft=Dv(st/h*Nr(q)),lt=Dv(st/m*Nr(q));(H-=ft*2)>kn?(ft*=w?1:-1,B+=ft,W-=ft):(H=0,B=W=(S+E)/2),(Q-=lt*2)>kn?(lt*=w?1:-1,$+=lt,z-=lt):(Q=0,$=z=(S+E)/2)}var bt=m*Ua($),St=m*Nr($),Mt=h*Ua(W),Ot=h*Nr(W);if(it>kn){var Kt=m*Ua(z),ee=m*Nr(z),Ae=h*Ua(B),Ee=h*Nr(B),Te;if(C<gs)if(Te=yI(bt,St,Ae,Ee,Kt,ee,Mt,Ot)){var De=bt-Te[0],me=St-Te[1],Pe=Kt-Te[0],Zt=ee-Te[1],he=1/Nr(HA((De*Pe+me*Zt)/(gi(De*De+me*me)*gi(Pe*Pe+Zt*Zt)))/2),ge=gi(Te[0]*Te[0]+Te[1]*Te[1]);ot=eu(it,(h-ge)/(he-1)),ct=eu(it,(m-ge)/(he+1))}else ot=ct=0}Q>kn?ct>kn?(gt=ol(Ae,Ee,bt,St,m,ct,w),tt=ol(Kt,ee,Mt,Ot,m,ct,w),l.moveTo(gt.cx+gt.x01,gt.cy+gt.y01),ct<it?l.arc(gt.cx,gt.cy,ct,Un(gt.y01,gt.x01),Un(tt.y01,tt.x01),!w):(l.arc(gt.cx,gt.cy,ct,Un(gt.y01,gt.x01),Un(gt.y11,gt.x11),!w),l.arc(0,0,m,Un(gt.cy+gt.y11,gt.cx+gt.x11),Un(tt.cy+tt.y11,tt.cx+tt.x11),!w),l.arc(tt.cx,tt.cy,ct,Un(tt.y11,tt.x11),Un(tt.y01,tt.x01),!w))):(l.moveTo(bt,St),l.arc(0,0,m,$,z,!w)):l.moveTo(bt,St),!(h>kn)||!(H>kn)?l.lineTo(Mt,Ot):ot>kn?(gt=ol(Mt,Ot,Kt,ee,h,-ot,w),tt=ol(bt,St,Ae,Ee,h,-ot,w),l.lineTo(gt.cx+gt.x01,gt.cy+gt.y01),ot<it?l.arc(gt.cx,gt.cy,ot,Un(gt.y01,gt.x01),Un(tt.y01,tt.x01),!w):(l.arc(gt.cx,gt.cy,ot,Un(gt.y01,gt.x01),Un(gt.y11,gt.x11),!w),l.arc(0,0,h,Un(gt.cy+gt.y11,gt.cx+gt.x11),Un(tt.cy+tt.y11,tt.cx+tt.x11),w),l.arc(tt.cx,tt.cy,ot,Un(tt.y11,tt.x11),Un(tt.y01,tt.x01),!w))):l.arc(0,0,h,W,B,w)}if(l.closePath(),f)return l=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-gs/2;return[Ua(d)*f,Nr(d)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Je(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Je(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:Je(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Je(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:Je(+f),u):i},u.endAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Je(+f),u):s},u.padAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Je(+f),u):o},u.context=function(f){return arguments.length?(l=f==null?null:f,u):l},u}const TI=15,Cp=20,Ip=.35;function bI(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function Rp(){const t=this,{config:e}=t,n=bI.call(t,!0),r=n&&e[`${n}_label_line`],i=Kn(r),s=(c,u,f)=>f,o={show:r===!0||i&&(r==null?void 0:r.show)!==!1,distance:i&&(r==null?void 0:r.distance)||Cp};if(r===!0)return{chartType:n,line:o,text:{formatter:s}};if(!i)return{chartType:n,line:{show:!1,distance:Cp},text:{formatter:null}};let l=s;return ie(r.text)?l=r.text:r.text===!1&&(l=null),{chartType:n,line:o,text:{formatter:l}}}function SI(t,e){const n=this,{state:r}=n,i=n.updateAngle(t);if(!i)return null;let{outerRadius:s}=n.getRadius(t),o=s;n.hasType("polar")&&(o=n.getPolarOuterRadius(t,s),s=r.radius);let l=(i.startAngle+i.endAngle)/2;Math.abs(i.endAngle-i.startAngle-2*Math.PI)<.01&&(l=Math.PI/2);const u=Math.sin(l),f=-Math.cos(l),d={x:u*o,y:f*o},h=s+TI,m={x:u*h,y:f*h},S=u>=0,E={x:m.x+e*(S?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:E,isRight:S,midAngle:l}}function wp(){return Rp.call(this).line.show}function AI(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:i,text:s}=Rp.call(e),o=i.distance;let l=null;n.selectAll(`.${Ze.chartArc}`).each(function(c){var u,f,d;const h=Yt(this),m=SI.call(e,c,o),{ratio:S,meetsThreshold:E,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const w=e.isTargetToShow(c.data.id)&&E,{startPoint:$,breakPoint:z,endPoint:B,isRight:W}=m,H=`${$.x},${$.y} ${z.x},${z.y} ${B.x},${B.y}`;if(i.show){let q=h.select(`.${Ze.arcLabelLine}`);q.empty()&&(q=h.append("polyline").attr("class",Ze.arcLabelLine)),r(q,t).attr("points",H).style("stroke",e.color(c.data)).style("opacity",w?null:"0")}let Q=h.select(`.${Ze.arcLabelLineText}`);if(Q.empty()&&(Q=h.append("text").attr("class",Ze.arcLabelLineText).style("pointer-events","none")),w){const{value:q}=C,{id:st}=c.data,it=((d=(f=s.formatter)!=null?f:e.getArcLabelConfig("format"))!=null?d:e.defaultArcValueFormat)(q,S,st).toString();ci(Q,it,[-1,1],!1);const ot={x:B.x+5*(W?1:-1),y:B.y};Q.style("text-anchor",W?"start":"end");const ct=Q.node(),gt=ct==null?void 0:ct.querySelectorAll("tspan");if(l===null&&(l=parseFloat(se.getComputedStyle(ct).fontSize)||12),gt&>.length>1){const ft=(gt.length-3)/2;ot.y+=(-ft+Ip)*l}else ot.y+=Ip*l;r(Q,t).attr("transform",`translate(${ot.x},${ot.y})`).style("opacity",null).style("fill",e.updateTextColor.bind(e)(c))}else r(Q,t).style("opacity","0")})}var EI=Object.defineProperty,CI=Object.defineProperties,II=Object.getOwnPropertyDescriptors,Op=Object.getOwnPropertySymbols,RI=Object.prototype.hasOwnProperty,wI=Object.prototype.propertyIsEnumerable,Pp=(t,e,n)=>e in t?EI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OI=(t,e)=>{for(var n in e||(e={}))RI.call(e,n)&&Pp(t,n,e[n]);if(Op)for(var n of Op(e))wI.call(e,n)&&Pp(t,n,e[n]);return t},PI=(t,e)=>CI(t,II(e));const wu=["donut","gauge","pie","polar"];function MI(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function LI(t,e,n,r){var i,s;const{config:o,state:{radiusExpanded:l}}=t,c=n.endAngle-Math.PI/2,u=Math.sin(c),f={x:Math.cos(c)*(l+(r?5:25)),y:u*(l+15-Math.abs(u*10))+3};if(r){const d=o.arc_rangeText_position;if(d){const h=o.arc_rangeText_values,m=ie(d)?d(h[e.index]):d;f.x+=(i=m==null?void 0:m.x)!=null?i:0,f.y+=(s=m==null?void 0:m.y)!=null?s:0}}return f}function DI(t,e,n,r){const{config:i}=t,s=MI(t);let o=s?i[`${s}_label_ratio`]:void 0;if(o)o=ie(o)?o.bind(t.api)(e,n,r):o;else{const d=36/n,h=d>.375;o=n&&r?(h?1.175-d:.8)*n/r:0}return o}function FI(t,e,n){let{outerRadius:r}=t.getRadius(e);t.hasType("polar")&&(r=t.getPolarOuterRadius(e,r));const[i,s]=t.svgArc.centroid(n).map(c=>isNaN(c)?0:c),o=Math.sqrt(i*i+s*s),l=DI(t,e,r,o);return{pos:{x:i,y:s},ratio:l}}function Mp(t=0){const e=this,{config:n,state:r}=e,i=e.hasMultiArcGauge(),s=r.gaugeArcWidth/e.getTargetsToShow().length,o=t?Math.min(r.radiusExpanded*t-r.radius,s*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return i?r.radius-s*(l.index+1):ae(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let u;if(i)u=r.radius-s*l.index+o;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(l,c);else if(u=c,t){let{radiusExpanded:f}=r;r.radius!==c&&(f-=Math.abs(r.radius-c)),u=f*t}return u},corner(l,c){const{arc_cornerRadius_ratio:u=0,arc_cornerRadius:f=0}=n,{data:{id:d},value:h}=l;let m;return u?m=u*c:m=ae(f)?f:f.call(e.api,d,h,c),m}}}function Ou(t){return function(e){const n=({startAngle:i=0,endAngle:s=0,padAngle:o=0})=>({startAngle:i,endAngle:s,padAngle:o}),r=Ya(n(this._current),n(e));return this._current=e,function(i){const s=r(i),{data:o,index:l,value:c}=e;return t(PI(OI({},s),{data:o,index:l,value:c}))}}}var NI={initPie(){const t=this,{config:e}=t,n=e.data_type,r=e[`${n}_padding`],i=e[`${n}_startingAngle`]||0,s=(r?r*.01:e[`${n}_padAngle`])||0;t.pie=hI().startAngle(i).endAngle(i+2*Math.PI).padAngle(s).value(o=>{var l,c;return(c=(l=o.values)==null?void 0:l.reduce((u,f)=>u+f.value,0))!=null?c:o}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,r=e.data_type,i=e[`${r}_padding`],s=e.gauge_width||e.donut_width,o=t.getTargetsToShow().length*e.gauge_arcs_minWidth,l=.85,c=wp.call(t)?l:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?l:c),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=s?(n.radius-s)/n.radius:.6,n.gaugeArcWidth=s||(o<=n.radius-n.innerRadius?n.radius-n.innerRadius:o<=n.radius?o:n.radius);const u=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:u},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:r,outerRadius:i}=e.state;return!ae(r)&&n&&(r=r[n.id]||0),He(i)&&n&&n.id in i?i=i[n.id]:ae(i)||(i=e.state.radius),{innerRadius:r,outerRadius:i}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let r=2*(n/360);return n<-360?r=-2:n>360&&(r=2),r*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,r=t.hasType("gauge")?e.gauge_fullCircle:!1,i=-1*Math.PI/2,s=Math.PI/2;let o=e[`${n}_startingAngle`]||0;return!r&&o<=i?o=i:!r&&o>=s?o=s:(o>Math.PI||o<-1*Math.PI)&&(o=Math.PI),o},updateAngle(t,e=!1){var n;const r=this,{config:i,state:s}=r,o=e&&r.hasType("gauge");let{pie:l}=r,c=t,u=!1;if(!i)return null;const f=r.getStartingAngle(),d=i.gauge_fullCircle||e&&!o?r.getArcLength():f*-2,h=c.data&&r.isGaugeType(c.data)&&!r.hasMultiArcGauge();if(h){const{gauge_min:m,gauge_max:S}=i,E=r.getTotalDataSum(s.rendered),C=d*((E-m)/(S-m));l=l.startAngle(f).endAngle(C+f)}if(e===!1){let m;if(h)m=l(r.filterTargetsToShow());else{const S="$arcPieLayout";let E=r.cache.get(S);(!E||E.generation!==s.redrawGeneration)&&(E={generation:s.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(S,E)),m=E.layout}m.forEach((S,E)=>{var C;!u&&S.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=S,c.index=E)})}if(isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(i.gauge_enforceMinMax||r.hasMultiArcGauge())){const{gauge_min:m,gauge_max:S}=i,E=e&&!o?r.getTotalDataSum(s.rendered):S,C=d/(E-m),w=(n=c.value)!=null?n:0,$=w<m?0:w<E?w-m:E-m;c.startAngle=f,c.endAngle=f+C*$}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Mp.call(t),i=Ep().innerRadius(e).outerRadius(n),s=function(o,l){var c;let u="M 0 0";if(o.value||o.data){const f=l?o:(c=t.updateAngle(o))!=null?c:null;f&&(u=i.cornerRadius(r(f,n(f)))(f))}return u};return s.centroid=i.centroid,s},getSvgArcExpanded(t=1){const e=this,{inner:n,outer:r,corner:i}=Mp.call(e,t),s=Ep().innerRadius(n).outerRadius(r);return o=>{const l=e.updateAngle(o),c=r(l);let u=0;return l&&(u=i(l,c)),l&&s.cornerRadius(u)(l)||"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:r,$T:i}=t,s=e.arc_rangeText_format,o=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",u=t.getTotalDataSum(r.rendered);c&&(l=l.map(h=>u/100*h));const f=t.pie(l).map((h,m)=>(h.index=m,h));let d=n.selectAll(`.${Ze.arcRange}`).data(l);d.exit().remove(),d=i(d.enter().append("text").attr("class",Ze.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(h=>{const m=c?h/u*100:h;return ie(s)?s(m):`${m}${c?"%":""}`}).merge(d)),(!r.rendered||r.rendered&&!o)&&u>0&&d.attr("transform",function(h,m){return t.transformForArcLabel(this,f[m],!0)}),d.style("opacity",h=>!o&&(h>u||u===0)?"0":null)}},transformForArcLabel(t,e,n=!1){const r=this,i=r.updateAngle(e,n);if(!i)return"";let s,o=1;if(n||r.hasMultiArcGauge())s=LI(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=FI(r,e,i);s=l.pos,o=l.ratio}else return"";return Rv.call(r,t,s),`translate(${s.x*o},${s.y*o})`},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){var e;const n=this,r=n.hasType("gauge"),i=(e=wu.filter(n.hasType.bind(n)))==null?void 0:e[0];n.shouldShowArcLabel()&&t.style("fill",n.updateTextColor.bind(n)).attr("filter",s=>n.updateTextBGColor.bind(n)(s,n.config.data_labels_backgroundColors)).each(function(s){const o=Yt(this),l=n.updateAngle(s),c=n.getRatio("arc",l),u=Qc.call(n,c,i);if(s._cache={updated:l,ratio:c,meetsThreshold:u},u){const{value:f}=l||s,d=(n.getArcLabelConfig("format")||n.defaultArcValueFormat)(f,c,s.data.id).toString();ci(o,d,[-1,1],r)}else o.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:r}=e;if(n){const s=setInterval(()=>{e.state.transiting||(clearInterval(s),r.legend.selectAll(`.${nn.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const i=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(i,`.${Ze.chartArc}`)).each(function(s){if(!e.shouldExpand(s.data.id))return;const o=e.getExpandConfig(s.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(s.data.id,"rate"));Yt(this).selectAll("path").transition().duration(o).attrTween("d",Ou(e.svgArcExpanded.bind(e))).transition().duration(o*2).attrTween("d",Ou(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:r}}=e;if(n)return;const i=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(i,`.${Ze.chartArc}`)).selectAll("path").transition().duration(s=>e.getExpandConfig(s.data.id,"duration")).attrTween("d",Ou(e.svgArc.bind(e))),r.selectAll(`${Ze.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:r}=n,i={duration:50,rate:.98};let s;return n.isDonutType(t)?s="donut":n.isGaugeType(t)?s="gauge":n.isPieType(t)&&(s="pie"),s?r[`${s}_expand_${e}`]:i[e]},shouldExpand(t){const e=this,{config:n}=e,r=e.isDonutType(t)?"donut":e.isGaugeType(t)?"gauge":e.isPieType(t)?"pie":null;return r?!!n[`${r}_expand`]:!1},shouldShowArcLabel(){const t=this,{config:e}=t;return wu.some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelConfig(t="format"){const e=this,{config:n}=e;let r=i=>i;return wu.filter(e.hasType.bind(e)).forEach(i=>{r=n[`${i}_label_${t}`]}),t==="format"&&ie(r)?r.bind(e.api):r},updateTargetsForArc(t){const e=this,{$el:n}=e,r=e.hasType("gauge"),i=e.getChartClass("Arc"),s=e.getClass("arcs",!0),o=e.classFocus.bind(e),l=n.main.select(`.${Ze.chartArcs}`),c=l.selectAll(`.${Ze.chartArc}`).data(e.pie(t)).attr("class",f=>i(f)+o(f.data)),u=c.enter().append("g").attr("class",i).call(this.setCssRule(!1,`.${Ze.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",s).merge(c),u.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${ze.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${ze.chart}`).append("g").attr("class",Ze.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),r=e.hasType("gauge");if(n){const i=r?ar.chartArcsGaugeTitle:Ze.chartArcsTitle;let s=e.$el.arcs.select(`.${i}`);s.empty()&&(s=e.$el.arcs.append("text").attr("class",i).style("text-anchor","middle")),r&&s.attr("dy","-0.3em"),ci(s,n,r?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,r=t.getArcTitle();if(r&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){let i=n.current.needle;return ae(i)||(i=e.arc_needle_value),Pa(r,{NEEDLE_VALUE:~~i})}return!1},redrawArc(t,e,n){const r=this,{config:i,state:s,$el:{main:o}}=r,l=i.interaction_enabled,c=l&&i.data_selection_isselectable;let u=o.selectAll(`.${Ze.arcs}`).selectAll(`.${Ze.arc}`).data(r.arcData.bind(r));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",f=>r.color(f.data)).style("cursor",f=>{var d;return(d=c==null?void 0:c.bind)!=null&&d.call(c,r.api)(f)?"pointer":null}).style("opacity","0").each(function(f){r.isGaugeType(f.data)&&(f.startAngle=i.gauge_startingAngle,f.endAngle=i.gauge_startingAngle),this._current=f}).merge(u),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),u.attr("transform",f=>!r.isGaugeType(f.data)&&n?"scale(0)":"").style("opacity",function(f){return f===this._current?"0":null}).each(()=>{s.transiting=!0}).transition().duration(t).attrTween("d",function(f){const d=r.updateAngle(f);if(!d)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const h=Ya(this._current,d);return this._current=h(0),function(m){const S=h(m);return S.data=f.data,r.getArc(S,!0)}}).attr("transform",n?"scale(1)":"").style("fill",f=>{let d;return r.levelColor?(d=r.levelColor(f.data.values[0].value),i.data_colors[f.data.id]=d):d=r.color(f.data),d}).style("opacity",null).call(eo,function(){if(r.levelColor){const f=Yt(this),d=f.datum(this._current);r.updateLegendItemColor(d.data.id,f.style("fill"))}s.transiting=!1,s.redrawing&&(s.redrawing=!1,s._targetsToShow=null,s._cachedDrawShape=null),Ne(i.onrendered,r.api)}),l&&r.bindArcEvent(u),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),i.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t),r.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:r,radius:i}}=t,s=(i-1)/100*n.arc_needle_length,o=r.size!==t.data.targets.length;let l=t.$el.arcs.select(`.${Ze.needle}`);const c=n.arc_needle_path,u=n.arc_needle_bottom_width/2,f=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,h=n.arc_needle_top_ry,m=n.arc_needle_bottom_len,S=n.arc_needle_bottom_rx,E=n.arc_needle_bottom_ry,C=t.getNeedleAngle(),w=()=>{const $=t.getArcTitleWithNeedleValue();$&&t.setArcTitle($)};if(w(),l.empty()&&(l=e.arcs.append("path").classed(Ze.needle,!0),e.needle=l,e.needle.updateHelper=($,z=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle($)}deg)`).call(eo,()=>{z&&(n.arc_needle_value=$),w()})}),o){const $=ie(c)?c.call(t,s):`M-${u} ${m} A${S} ${E} 0 0 0 ${u} ${m} L${f} -${s} A${d} ${h} 0 0 0 -${f} -${s} L-${u} ${m} Z`;t.$T(l).attr("d",$).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${C}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:r}=e,i=e.getArcLength(),s=e.hasType("gauge"),o=e.getTotalDataSum(!0);let l=sn(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,u;if(ae(l)||(l=s&&e.data.targets.length===1?o:0),r.current.needle=l,s){c=e.getStartingAngle();const f=n.gauge_fullCircle?i:c*-2,{gauge_min:d,gauge_max:h}=n;u=f*((l-d)/(h-d))}else u=o?i*(l/o):0;return(c+u)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,r=t.hasMultiArcGauge(),i=e.gauge_fullCircle,s=t.getTargetsToShow().length===0&&!!e.data_empty_label_text,o=t.getStartingAngle(),l=i?o+t.getArcLength():o*-1;let c=t.$el.arcs.select(`${r?"g":""}.${Ze.chartArcsBackground}`);if(r){let u=0;c=c.selectAll(`path.${Ze.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(f,d)=>`${Ze.chartArcsBackground} ${Ze.chartArcsBackground}-${d}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:f})=>{if(s||n.hiddenTargetIds.has(f))return"M 0 0";const d={data:[{value:e.gauge_max}],startAngle:o,endAngle:l,index:u++};return t.getArc(d,!0,!0)}),c.exit().remove()}else c.attr("d",s?"M 0 0":()=>{const u={data:[{value:e.gauge_max}],startAngle:o,endAngle:l};return t.getArc(u,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:r}=e,i=r.inputType==="touch",s=r.inputType==="mouse",o=u=>{const f=e.updateAngle(u);return f?e.convertToArcData(f):null};function l(u,f,d){e.expandArc(d),e.api.focus(d),e.toggleFocusLegend(d,!0),e.showTooltip([f],u)}function c(u){const f=(u==null?void 0:u.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,f,d){var h;const m=o(f);m&&((h=e.toggleShape)==null||h.call(e,this,m,d),n.data_onclick.bind(e.api)(m,this))}),s&&t.on("mouseover",function(u,f){if(r.transiting)return;r.event=u;const d=o(f),h=(d==null?void 0:d.id)||void 0;l(this,d,h),e.setOverOut(!0,d)}).on("mouseout",(u,f)=>{if(r.transiting||!n.interaction_onout)return;r.event=u;const d=o(f);c(),e.setOverOut(!1,d)}).on("mousemove",function(u,f){const d=o(f);r.event=u,e.showTooltip([d],this)}),i&&e.hasArcType()&&!e.radars){const u=f=>{var d,h;const{clientX:m,clientY:S}=(h=(d=f.changedTouches)==null?void 0:d[0])!=null?h:{clientX:0,clientY:0};return Yt(Ye.elementFromPoint(m,S))};e.$el.svg.on("touchstart touchmove",function(f){if(r.transiting)return;r.event=f;const h=u(f).datum(),m=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,S=m?e.convertToArcData(m):null,E=(S==null?void 0:S.id)||void 0;e.callOverOutForTouch(S),mn(E)?c():l(this,S,E)},{passive:!0})}},redrawArcText(t){const e=this,{config:n,state:r,$el:{main:i,arcs:s}}=e,o=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(o&&e.data.targets.length===1&&n.gauge_title||(c=i.selectAll(`.${Ze.chartArc}`).select("text").style("opacity","0").attr("class",u=>e.isGaugeType(u.data)?ar.gaugeValue:null).call(e.textForArcLabel.bind(e)).style("font-size",u=>e.isGaugeType(u.data)&&e.data.targets.length===1&&!l?`${Math.round(r.radius/5)}px`:null),Iv.call(e),c.attr("transform",function(u){return e.transformForArcLabel.bind(e)(this,u)}).transition().duration(t).style("opacity",u=>e.isTargetToShow(u.data.id)&&e.isArcType(u.data)?null:"0"),l&&c.attr("dy","-.1em")),i.select(`.${Ze.chartArcsTitle}`).style("opacity",e.hasType("donut")||o?null:"0"),o){const u=n.gauge_fullCircle;u&&(c==null||c.attr("dy",`${l?0:Math.round(r.radius/14)}`)),n.gauge_label_show&&(s.select(`.${ar.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),s.select(`.${ar.chartArcsGaugeMin}`).attr("dx",`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!u&&s.select(`.${ar.chartArcsGaugeMax}`).attr("dx",`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}wp.call(e)&&AI.call(e,t)},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,r=ae(t)?i=>i.index===t:i=>i.data.id===t;return n==null?void 0:n.selectAll(`.${ze.target} path`).filter(r)}};function Si(t,e){xn(Sr.prototype,[NI,Ti].concat(t||[])),$a.setOptions([ka].concat(e||[]))}let Lp=()=>(Si(void 0,[sl,uI]),(Lp=()=>qt.DONUT)());var $I=Object.defineProperty,Dp=Object.getOwnPropertySymbols,BI=Object.prototype.hasOwnProperty,zI=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UI=(t,e)=>{for(var n in e||(e={}))BI.call(e,n)&&Fp(t,n,e[n]);if(Dp)for(var n of Dp(e))zI.call(e,n)&&Fp(t,n,e[n]);return t};function Ai(t=!1){const e=this,{config:n,state:{current:{width:r,height:i}}}=e,s=e.getCurrentPadding(),o=UI({width:r-s.left-s.right,height:i-(n.legend_show?e.getLegendHeight()+10:0)-s.top-s.bottom},s);if(t){const l=Pu.call(e,o),c=n.funnel_rotated;o.width=Math.max(o.width,c?l.height:l.width),o.height=Math.max(o.height,c?l.width:l.height)}return o}function Pu(t){const e=this,{config:n}=e,r=n.funnel_rotated,[i,s]=[n.funnel_neck_width,n.funnel_neck_height].map((o,l)=>He(o)?t[r!==!l?"width":"height"]*o.ratio:o);return{width:i,height:s}}function kI(t){const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),s=[];return t.forEach((o,l)=>{const{ratio:c=0}=o,u=l>0?s[l-1][2][n?0:1]:0,f=c+u;s.push(o.coords=n?[[u,0],[f,0],[f,i],[u,i],[u,0]]:[[0,u],[r,u],[r,f],[0,f],[0,u]])}),s}function GI(){const t=this,e=t.config.funnel_rotated,{width:n,height:r}=Ai.call(t,!0),i=Pu.call(t,{width:n,height:r});let s;if(e){const o=(r-i.width)/2,l=n-i.height;s=[[l,o],[n,o],[n,r-o],[l,r-o],[0,r]]}else{const o=(n-i.width)/2,l=r-i.height;s=[[n,0],[n-o,l],[n-o,r],[o,r],[o,l]]}return`M${[[0,0],...s,[0,0]].join("L")}z`}function XI(t){const e=this,{config:n}=e,r=t.map(i=>({id:i.id,value:i.values.reduce((s,o)=>s+o.value,0)}));return n.data_order&&r.sort(e.getSortCompareFn.bind(e)(!0)),Np.call(e,r)}function Np(t){const e=this,{width:n,height:r}=Ai.call(e),i=e.getTotalDataSum(!0),s=e.config.funnel_rotated?n:r;return t.forEach(o=>{o.ratio=o.value/i*s}),t}function WI(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function $p(t,e,n,r,i){const s=[];for(let l=0;l<=20;l++){const c=l/20,u=t+(e-t)*c,f=n+(r-n)*WI(c);s.push(i?[u,f]:[f,u])}return s}function VI(){var t;const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),s=Pu.call(e,{width:r,height:i}),o=fc().x(m=>m[0]).y(m=>m[1]).curve(ho),l=(n?i-s.width:r-s.width)/2,c=n?r-s.height:i-s.height,u=$p(0,c,n?0:r,n?l:r-l,n),f=[];if(s.height>0&&(u.push(n?[r,l]:[r-l,i]),f.push(n?[r,i-l]:[l,i])),f.push(...$p(c,0,n?i-l:l,n?i:0,n)),u.length>1){const[m,S]=n?[1,0]:[0,1];u.splice(1,0,[u[m][0],u[S][1]]);const E=f.length-1;E>0&&f.splice(E,0,[f[E-m][0],f[E-S][1]])}const d=o(u)||"",h=((t=o(f))==null?void 0:t.replace(/^M/,"L"))||"";return n?`${d}${h}z`:`M0,0${d.replace(/^M/,"L")}${h}z`}var jI={initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${ze.chart}`).append("g").classed(is.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(is.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const i=o=>{var l;const c=o.isTrusted?o.target:(l=r.eventReceiver.rect)==null?void 0:l.node();if(c&&/^path$/i.test(c.tagName))return r.event=o,Yt(c).datum()},s=r.inputType==="touch";e.on(s?"touchstart":"mouseover mousemove",o=>{const l=i(o);l&&(t.showTooltip([l],o.target),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=i(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e;n||e.initFunnel();const r=e.getChartClass("Funnel"),i=e.getClass("funnel",!0),s=XI.call(e,t.filter(e.isFunnelType.bind(e))),o=e.filterNullish(s),l=n.selectAll(`.${is.chartFunnel}`).data(o);l.exit().remove();const c=l.enter().insert("g",`.${is.funnelBackground}`);c.append("path"),n.path=c.merge(l).attr("class",r).select("path").attr("class",i).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,r=t.map(({id:i})=>i);n.path=n.path.filter(i=>r.includes(i.id))},generateGetFunnelPoints(){const t=this,{config:e,$el:{funnel:n}}=t,r=e.funnel_rotated,i=t.filterTargetsToShow(n.path),{top:s,left:o,width:l,height:c}=Ai.call(t),u={};let f=0;return i.each(d=>{const h=f,{ratio:m}=d;f+=m;const S=r?o:s,E=S+h,C=S+f,w=(E+C)/2,$=r?s+c/2:o+l/2;u[d.id]=r?[[E,$],[C,$],[w,$]]:[[$,E],[$,C],[$,w]]}),d=>u[d.id]},redrawFunnel(){const t=this,{config:e,$T:n,$el:{funnel:r}}=t,i=t.filterTargetsToShow(r.path),s=kI.call(t,Np.call(t,i.data())),{top:o,left:l}=Ai.call(t),c=(e.funnel_spline?VI:GI).call(t);r.attr("transform",`translate(${l}, ${o})`).attr("clip-path",`path('${c}')`),r.background.attr("d",c),n(i).attr("d",(u,f)=>`M${s[f].join("L")}z`).style("opacity","1"),r.selectAll("g").style("opacity",null)}},HI={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let Bp=()=>(Si([jI],[HI]),(Bp=()=>qt.FUNNEL)());var YI={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,r=(i=null,s="")=>{n.append("text").attr("class",i).style("text-anchor","middle").style("pointer-events","none").text(s)};if(t.hasType("gauge")){const i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",Ze.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(ar.chartArcsGaugeUnit),e.gauge_label_show&&(r(ar.chartArcsGaugeMin),!e.gauge_fullCircle&&r(ar.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:r}=t,{hiddenTargetIds:i}=t.state,s=r.main.selectAll(`.${Ze.arcs}`).selectAll(`.${Ze.arcLabelLine}`).data(t.arcData.bind(t));s.enter().append("rect").attr("class",l=>`${Ze.arcLabelLine} ${ze.target} ${ze.target}-${l.data.id}`).merge(s).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const u=2;let f=0,d=0,h="";if(!i.has(l.data.id)){const m=t.updateAngle(l),S=n.gaugeArcWidth/t.getTargetsToShow().length*(m.index+1),E=m.endAngle-Math.PI/2,C=n.radius-S,w=E-(C===0?0:1/C);c=n.radiusExpanded-n.radius+S,f=Math.cos(w)*C,d=Math.sin(w)*C,h=`rotate(${E*180/Math.PI}, ${f}, ${d})`}Yt(this).attr("x",f).attr("y",d).attr("width",c).attr("height",u).attr("transform",h).style("stroke-dasharray",`0, ${c+u}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:r}=n,i=r.gauge_label_extents;return ie(i)?i.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){return this.getGaugeLabelHeight()*2}},KI={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50};let zp=()=>(Si([YI],[sl,KI]),(zp=()=>qt.GAUGE)()),Up=()=>(ea(),(Up=()=>qt.LINE)()),kp=()=>(ea(void 0,[xu]),(kp=()=>qt.SPLINE)()),Gp=()=>(ea(),(Gp=()=>qt.STEP)());var ZI={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};let Xp=()=>(Si(void 0,[sl,ZI]),(Xp=()=>qt.PIE)());function Wp(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var JI={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,r=n.polar_level_text_show,i=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Jr.levels),r&&i&&t.generateTextBGColorFilter(i)},getPolarOuterRadius(t,e){var n;const r=Wp(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/r*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:r}}}=t,i=e.polar_level_depth,s=Wp(t),o=no(0,i),l=n.radius,c=o.map(h=>l*((h+1)/i)),u=(e.polar_level_text_format||function(){}).bind(t.api),f=r.selectAll(`.${Jr.level}`).data(o);f.exit().remove();const d=f.enter().append("g").attr("class",(h,m)=>`${Jr.level} ${Jr.level}-${m}`);if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",h=>c[h]),e.polar_level_text_show){const h=e.polar_level_text_backgroundColor,m=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(h)}`;d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",S=>-c[S]+5).attr("filter",h?`url(${m})`:null).text(S=>u(s/o.length*(S+1)))}}},QI={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0};let Vp=()=>(Si([JI],[sl,QI]),(Vp=()=>qt.POLAR)());function _I(t,e,n,r,i,s){const o=t&&r>0?n-r:r,l=2*Math.PI;return i*(1-s*(e==="x"?Math.sin:Math.cos)(o*l/n))}const Ei=Oe.radarPoints,jp=Oe.radarTextWidth;var qI={initRadar(){const t=this,{config:e,state:{current:n},$el:r}=t;t.hasType("radar")&&(r.radar=r.main.select(`.${ze.chart}`).append("g").attr("class",yh.chartRadars),r.radar.levels=r.radar.append("g").attr("class",Jr.levels),r.radar.axes=r.radar.append("g").attr("class",Rn.axis),r.radar.shapes=r.radar.append("g").attr("class",Tn.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:r}}=t,i=e.axis_x_categories.length<4?-20:10,s=(Math.min(n,r)-i)/2;return[s,s]},updateTargetsForRadar(t){const e=this,{config:n}=e;lr(n.axis_x_categories)&&(n.axis_x_categories=no(0,mr("max",t.map(r=>r.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,r){const i=this,{config:s}=i,[o,l]=i.getRadarSize(),c=s.axis_x_categories.length,u=s.radar_direction_clockwise,f=Oa(t).map(d=>_I(u,d,c,e,sn(n)?n:t==="x"?o:l,ae(r)?r:s.radar_size_ratio));return f.length===1?f[0]:f},generateRadarPoints(){const t=this,e=t.data.targets,[n,r]=t.getRadarSize(),i=t.cache.get(Ei)||{},s=i._size;(!s||s.width!==n&&s.height!==r)&&(e.forEach(o=>{i[o.id]=o.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),i._size={width:n,height:r},t.cache.add(Ei,i))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,r=t.getTranslate("radar");r&&(e.attr("transform",r),n.select(`.${En.chartTexts}`).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(Ei);return(e,n)=>{const r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:r}}=t,[i,s]=t.getRadarSize(),o=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,u=r.levels,f=no(0,o),d=e.radar_size_ratio*Math.min(i,s),h=f.map(w=>d*((w+1)/o)),m=(e.radar_level_text_format||function(){}).bind(t.api),S=f.map(w=>{const $=h[w];return no(0,l).map(B=>t.getRadarPosition(["x","y"],B,$,1).join(",")).join(" ")}),E=u.selectAll(`.${Jr.level}`).data(f);E.exit().remove();const C=E.enter().append("g").attr("class",(w,$)=>`${Jr.level} ${Jr.level}-${$}`);C.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>m(0)),C.append("text").attr("dx","-.5em").style("text-anchor","end").text(w=>m(n.current.dataMax/f.length*(w+1)))),C.merge(E).attr("transform",w=>`translate(${i-h[w]}, ${s-h[w]})`).selectAll("polygon").attr("points",w=>S[w]),c&&u.selectAll("text").attr("x",w=>mn(w)?i:S[w].split(",")[0]).attr("y",w=>mn(w)?s:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[r,i]=t.getRadarSize(),s=e.axis_x_categories;let o=n.axes.selectAll("g").data(s);o.exit().remove();const l=o.enter().append("g").attr("class",(c,u)=>`${Rn.axis}-${u}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),o=l.merge(o),e.radar_axis_line_show&&o.select("line").attr("x1",r).attr("y1",i).attr("x2",(c,u)=>t.getRadarPosition("x",u)).attr("y2",(c,u)=>t.getRadarPosition("y",u)),e.radar_axis_text_show){const{x:c=0,y:u=0}=e.radar_axis_text_position,f=t.cache.get(jp)||0;if(o.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){ci(Yt(this),String(h),[-.6,1.2])})}).datum((d,h)=>({index:h})).attr("transform",function(d){mn(this.width)&&(this.width=ln(this,!0).width/2);let h=t.getRadarPosition("x",d.index,void 0,1),m=Math.round(t.getRadarPosition("y",d.index,void 0,1));return h>r?h+=this.width+c:Math.round(h)<r&&(h-=this.width+c),m>i?(m/2===i&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),m+=u):m<i&&(m-=u),`translate(${h} ${m})`}),!f){const d=[n.axes,n.levels].map(h=>wh(h.node()).width);d.every(h=>h>0)&&t.cache.add(jp,d[0]-d[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:r,svg:i}}=t,s=t.isPointFocusOnly(),{inputType:o,transiting:l}=n,c=o==="mouse",u=f=>{if(n.event=f,!e.interaction_onout)return;const d=t.getDataIndexFromEvent(f),h=mn(d);(c||h)&&(t.hideTooltip(),s?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,d):h&&t.callOverOutForTouch())};r.axes.on(c?"mouseover ":"touchstart",f=>{if(l)return;n.event=f;const d=t.getDataIndexFromEvent(f);t.selectRectForSingle(i.node(),d),c?t.setOverOut(!0,d):t.callOverOutForTouch(d)},c?void 0:{passive:!0}).on("mouseout",c?u:null),c||i.on("touchstart",u,{passive:!0})},updateRadarShape(){const t=this,e=t.data.targets.filter(s=>t.isRadarType(s)),n=t.cache.get(Ei),r=t.$el.radar.shapes.selectAll("polygon").data(t.filterNullish(e)),i=r.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(r.exit()).remove(),i.append("polygon").merge(r).style("fill",t.color).style("stroke",t.color).attr("points",s=>n[s.id].join(" ")),t.updateTargetForCircle(e,i)},radarCircleX(t){return this.cache.get(Ei)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(Ei)[t.id][t.index][1]}},tR={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};let Hp=()=>(Si([op.eventrect,tl,qI],[ka,tR,{axis_x_categories:lp.optAxis.axis_x_categories}]),(Hp=()=>qt.RADAR)());var eR={scatter_zerobased:!1};let Yp=()=>(Ts([Ti,tl],[ka,eR]),(Yp=()=>qt.SCATTER)());function nR(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 ll(t,e,n,r,i){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(r-e)/t.value;++l<c;)o=s[l],o.y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function cl(t,e,n,r,i){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(i-n)/t.value;++l<c;)o=s[l],o.x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}var Kp=(1+Math.sqrt(5))/2;function Zp(t,e,n,r,i,s){for(var o=[],l=e.children,c,u,f=0,d=0,h=l.length,m,S,E=e.value,C,w,$,z,B,W,H;f<h;){m=i-n,S=s-r;do C=l[d++].value;while(!C&&d<h);for(w=$=C,W=Math.max(S/m,m/S)/(E*t),H=C*C*W,B=Math.max($/H,H/w);d<h;++d){if(C+=u=l[d].value,u<w&&(w=u),u>$&&($=u),H=C*C*W,z=Math.max($/H,H/w),z>B){C-=u;break}B=z}o.push(c={value:C,dice:m<S,children:l.slice(f,d)}),c.dice?ll(c,n,r,i,E?r+=S*C/E:s):cl(c,n,r,E?n+=m*C/E:i,s),E-=C,f=d}return o}var Jp=(function t(e){function n(r,i,s,o,l){Zp(e,r,i,s,o,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Kp);function Dw(t){return t==null?null:Qp(t)}function Qp(t){if(typeof t!="function")throw new Error;return t}function bs(){return 0}function Ss(t){return function(){return t}}function rR(){var t=Jp,e=!1,n=1,r=1,i=[0],s=bs,o=bs,l=bs,c=bs,u=bs;function f(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],e&&h.eachBefore(nR),h}function d(h){var m=i[h.depth],S=h.x0+m,E=h.y0+m,C=h.x1-m,w=h.y1-m;C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),h.x0=S,h.y0=E,h.x1=C,h.y1=w,h.children&&(m=i[h.depth+1]=s(h)/2,S+=u(h)-m,E+=o(h)-m,C-=l(h)-m,w-=c(h)-m,C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),t(h,S,E,C,w))}return f.round=function(h){return arguments.length?(e=!!h,f):e},f.size=function(h){return arguments.length?(n=+h[0],r=+h[1],f):[n,r]},f.tile=function(h){return arguments.length?(t=Qp(h),f):t},f.padding=function(h){return arguments.length?f.paddingInner(h).paddingOuter(h):f.paddingInner()},f.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:Ss(+h),f):s},f.paddingOuter=function(h){return arguments.length?f.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):f.paddingTop()},f.paddingTop=function(h){return arguments.length?(o=typeof h=="function"?h:Ss(+h),f):o},f.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:Ss(+h),f):l},f.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:Ss(+h),f):c},f.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:Ss(+h),f):u},f}function _p(t,e,n,r,i){var s=t.children,o,l=s.length,c,u=new Array(l+1);for(u[0]=c=o=0;o<l;++o)u[o+1]=c+=s[o].value;f(0,l,t.value,e,n,r,i);function f(d,h,m,S,E,C,w){if(d>=h-1){var $=s[d];$.x0=S,$.y0=E,$.x1=C,$.y1=w;return}for(var z=u[d],B=m/2+z,W=d+1,H=h-1;W<H;){var Q=W+H>>>1;u[Q]<B?W=Q+1:H=Q}B-u[W-1]<u[W]-B&&d+1<W&&--W;var q=u[W]-z,st=m-q;if(C-S>w-E){var it=m?(S*st+C*q)/m:C;f(d,W,q,S,E,it,w),f(W,h,st,it,E,C,w)}else{var ot=m?(E*st+w*q)/m:w;f(d,W,q,S,E,C,ot),f(W,h,st,S,ot,C,w)}}}function aR(t,e,n,r,i){(t.depth&1?cl:ll)(t,e,n,r,i)}var iR=(function t(e){function n(r,i,s,o,l){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,d,h=-1,m,S=c.length,E=r.value;++h<S;){for(u=c[h],f=u.children,d=u.value=0,m=f.length;d<m;++d)u.value+=f[d].value;u.dice?ll(u,i,s,o,E?s+=(l-s)*u.value/E:l):cl(u,i,s,E?i+=(o-i)*u.value/E:o,l),E-=u.value}else r._squarify=c=Zp(e,r,i,s,o,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Kp);function sR(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function oR(){return this.eachAfter(sR)}function lR(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function cR(t,e){for(var n=this,r=[n],i,s,o=-1;n=r.pop();)if(t.call(e,n,++o,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function uR(t,e){for(var n=this,r=[n],i=[],s,o,l,c=-1;n=r.pop();)if(i.push(n),s=n.children)for(o=0,l=s.length;o<l;++o)r.push(s[o]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function fR(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function dR(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})}function hR(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function vR(t){for(var e=this,n=gR(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}function gR(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function pR(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function mR(){return Array.from(this)}function xR(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function yR(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*TR(){var t=this,e,n=[t],r,i,s;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function Mu(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=AR)):e===void 0&&(e=SR);for(var n=new ul(t),r,i=[n],s,o,l,c;r=i.pop();)if((o=e(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,l=c-1;l>=0;--l)i.push(s=o[l]=new ul(o[l])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(CR)}function bR(){return Mu(this).eachBefore(ER)}function SR(t){return t.children}function AR(t){return Array.isArray(t)?t[1]:null}function ER(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function CR(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ul(t){this.data=t,this.depth=this.height=0,this.parent=null}ul.prototype=Mu.prototype={constructor:ul,count:oR,each:lR,eachAfter:uR,eachBefore:cR,find:fR,sum:dR,sort:hR,path:vR,ancestors:pR,descendants:mR,leaves:xR,links:yR,copy:bR,[Symbol.iterator]:TR};function IR(t){const e=this;return t.map(n=>{const{id:r,values:i}=n,{value:s}=i[0];return{name:r,id:r,value:s,ratio:e.getRatio("treemap",i[0])}})}var RR={initTreemapLayout(){this.treemap=rR().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:i,height:s}}}=n,o=(e={binary:_p,dice:ll,slice:cl,sliceDice:aR,squarify:Jp,resquarify:iR}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:_p;return(l,c,u,f,d)=>{o(l,0,0,i,s);for(const h of l.children)h.x0=c+h.x0/i*(f-c),h.x1=c+h.x1/i*(f-c),h.y0=u+h.y0/s*(d-u),h.y1=u+h.y1/s*(d-u)}},getTreemapData(t){const e=this;return{name:"root",children:IR.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},getTreemapRoot(t){const e=this,n=e.getTreemapData(t!=null?t:e.data.targets),r=Mu(n).sum(s=>s.value),i=e.getSortCompareFn(!0);return e.treemap||e.initTreemapLayout(),e.treemap(i?r.sort(i):r)}},wR=Object.defineProperty,OR=Object.defineProperties,PR=Object.getOwnPropertyDescriptors,qp=Object.getOwnPropertySymbols,MR=Object.prototype.hasOwnProperty,LR=Object.prototype.propertyIsEnumerable,tm=(t,e,n)=>e in t?wR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DR=(t,e)=>{for(var n in e||(e={}))MR.call(e,n)&&tm(t,n,e[n]);if(qp)for(var n of qp(e))LR.call(e,n)&&tm(t,n,e[n]);return t},FR=(t,e)=>OR(t,PR(e));function NR(t,e){const n=this;t.selectAll("g").attr("transform",r=>{const i=ai(n,r,e);return`translate(${i.x},${i.y})`}).select("rect").attr("width",r=>ai(n,r,e).w).attr("height",r=>ai(n,r,e).h)}var $R=FR(DR({},RR),{initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:r},clip:i,datetimeId:s}}=t;i.id=`${s}-clip`,t.initTreemapLayout(),e.defs.append("clipPath").attr("id",i.id).append("rect").attr("width",n).attr("height",r),e.treemap=e.main.select(`.${ze.chart}`).attr("clip-path",`url(#${i.id})`).append("g").classed(bh.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:r}=t,i=s=>{var o;const l=s.isTrusted?s.target:(o=r.eventReceiver.rect)==null?void 0:o.node();let c;return l&&/^rect$/i.test(l.tagName)&&(r.event=s,c=Yt(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const s=r.inputType==="touch";e.treemap.on(s?"touchstart":"mouseover mousemove",o=>{const l=i(o);l&&(t.showTooltip([l],o.currentTarget),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=i(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,r=[e.getTreemapRoot(t!=null?t:e.data.targets)];n.data(e.filterNullish(r))},updateTreemap(t){const e=this,{$el:n,$T:r}=e,i=n.treemap.datum(),s=e.getChartClass("Treemap"),o=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(i.children);r(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",s).select("rect").attr("class",o).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e}=t,n={};return e.treemap.selectAll("g").each(r=>{const i=ai(t,r);n[r.data.name]=[[i.x,i.y],[i.x+i.w,i.y+i.h]]}),r=>n[r.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:r,height:i}}}=e;return n.defs.select("rect").attr("width",r).attr("height",i),[e.$T(n.treemap,t,Ir()).call(NR.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{$el:{treemap:n},config:r,scale:{x:i,y:s}}=e,{id:o,value:l}=t,c=r.treemap_label_format,u=e.getRatio("treemap",t),f=(u*100).toFixed(2),d=r.treemap_label_show&&Qc.call(e,u,"treemap")?null:"0",h=n.selectAll("g").filter(E=>E.data.id===o).datum();let m=0,S=0;if(h){const{x0:E,x1:C,y0:w,y1:$}=h;m=i(C)-i(E),S=s($)-s(w)}return function(E){return E.style("opacity",d),ie(c)?c.bind(e.api)(l,u,o,{width:m,height:S}):`${o}
|
|
61
|
-
${f}%`}}}),
|
|
60
|
+
`):[];if(c.length)return c;if(q(l))return l;let u=o.tickWidth;(!u||u<=0)&&(u=a?95:o.isCategory?(o.isInverted?n(r[0])-n(r[1]):n(r[1])-n(r[0]))-12:110);const f=String(l),d=[];let h=0;for(;;){let v,b=-1;for(let x=1;h+x<f.length;x++)if(f.charAt(h+x)===" "&&(v=x),u<s*(x+1)){b=x;break}if(b===-1)return d.push(f.slice(h)),d;d.push(f.substr(h,v||b)),h+=v?v+1:b}}scale(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale}orient(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient}tickFormat(e){const{config:n}=this;return arguments.length?(n.tickFormat=e,this):n.tickFormat}tickCentered(e){const{config:n}=this;return arguments.length?(n.tickCentered=e,this):n.tickCentered}tickOffset(){return this.config.tickOffset}tickInterval(e){var n,r,a;const{outerTickSize:s,tickOffset:o,tickValues:l}=this.config;let c;if(this.params.isCategory){const u=(n=this.params.owner.scale.zoom)!=null?n:this.helper.scale;c=o*2||Math.abs(u(1)-u(0))}else{const u=(r=this.params.owner.scale.zoom)!=null?r:this.helper.scale;if(c=(this.g?this.g.select("path.domain").node().getTotalLength()-s*2:Math.abs(u.range()[1]-u.range()[0]))/(e||((a=this.g)==null?void 0:a.selectAll("line").size())||1),l)for(let d=0;d<l.length-1;d++){const h=u(l[d+1])-u(l[d]);h&&h<c&&(c=h)}}return c===1/0?0:c}ticks(...e){const{config:n}=this;return e.length?(n.tickArguments=Rn(e),this):n.tickArguments}tickCulling(e){const{config:n}=this;return arguments.length?(n.tickCulling=e,this):n.tickCulling}tickValues(e){const{config:n}=this;if(M(e))n.tickValues=()=>e(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var nM=Object.defineProperty,rM=Object.defineProperties,aM=Object.getOwnPropertyDescriptors,ay=Object.getOwnPropertySymbols,iM=Object.prototype.hasOwnProperty,sM=Object.prototype.propertyIsEnumerable,yf=(t,e,n)=>e in t?nM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oM=(t,e)=>{for(var n in e||(e={}))iM.call(e,n)&&yf(t,n,e[n]);if(ay)for(var n of ay(e))sM.call(e,n)&&yf(t,n,e[n]);return t},lM=(t,e)=>rM(t,aM(e)),Er=(t,e,n)=>yf(t,typeof e!="symbol"?e+"":e,n);function xf(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function Al(t){return/^sub/.test(t)}function Aa(t,e,n){const r=xf(e),a=t[`subchart_axis_${r}_tick_${n}`];return Al(e)&&a!==void 0?a:t[`axis_${r}_tick_${n}`]}function cM(t){var e,n;const r=[t[0],t[t.length-1]];let a=0,s=null;for(const l of t){const c=(n=(e=l.textContent)==null?void 0:e.length)!=null?n:0;c>a&&(a=c,s=l)}s&&!r.includes(s)&&r.push(s);const o=t[Math.floor(t.length/2)];return r.includes(o)||r.push(o),r}const El=50,bf=Symbol("tickWidthFallback");function uM(t){var e,n,r;const a=t.select("line").node(),s=(n=(e=a==null?void 0:a.ownerDocument)==null?void 0:e.defaultView)!=null&&n.getComputedStyle?parseFloat(a.ownerDocument.defaultView.getComputedStyle(a).strokeWidth):parseFloat((r=a==null?void 0:a.getAttribute)==null?void 0:r.call(a,"stroke-width"));return Number.isFinite(s)&&s>0?s:1}function fM(t,e,n){var r;const a=(r=t==null?void 0:t.scale)==null?void 0:r.call(t);if(!a||e.length<2)return!1;const s=Math.max(1,n)/2,o=e.map(c=>+a(c)).filter(Number.isFinite).sort((c,u)=>c-u);if(o.length<2)return!1;let l=o[0]+s;for(let c=1;c<o.length;c++){const u=o[c]-s,f=o[c]+s;if(u<=l+Md)return!0;l=Math.max(l,f)}return!1}function dM(t,e){if(t.length<=El)return t;const n=new Map,r=l=>{l>=0&&l<t.length&&n.set(l,t[l])};r(0),r(t.length-1),r(Math.floor(t.length/2));const a=Math.max(1,Math.floor(t.length/(El-3)));let s=-1,o=0;for(let l=0;l<t.length;l+=a){r(l);const c=t[l],u=e?e(c):c,f=Array.isArray(u)?u.join("").length:String(u!=null?u:"").length;f>s&&(s=f,o=l)}return r(o),Array.from(n.keys()).sort((l,c)=>l-c).map(l=>n.get(l))}function hM(t){return M(t)?sy(t):!Array.isArray(t)||t.length<=El?t:{length:t.length,first:t[0],middle:t[Math.floor(t.length/2)],last:t[t.length-1]}}function Tf(t){return t[bf]}function Cl(t,e){D(e)?Object.defineProperty(t,bf,{configurable:!0,value:e,writable:!0}):delete t[bf]}function Sf(t){t.length=0,Cl(t)}function gM(t,e,n){Sf(t),t.length=e,Cl(t,n)}function vM(t){const e=[];return e.length=t.length,Object.keys(t).forEach(n=>{const r=+n;e[r]=t[r]}),Cl(e,Tf(t)),e}function pM(t,e){Sf(t),t.length=e.length,Object.keys(e).forEach(n=>{const r=+n;t[r]=e[r]}),Cl(t,Tf(e))}function mM(t,e,n){const r=t[e];if(D(r))return r;const a=Number(r);return Number.isFinite(a)?a:n}const iy=new WeakMap;let yM=0;function sy(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=iy.get(t);return e||(e=++yM,iy.set(t,e)),`${typeof t}:${e}`}function Af(t){return t instanceof Date?`date:${+t}`:Array.isArray(t)?`[${t.map(e=>Af(e)).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(e=>`${e}:${Af(t[e])}`).join(",")}}`:typeof t=="function"?sy(t):`${typeof t}:${String(t)}`}function Ef(t){return t instanceof Date?new Date(+t):Array.isArray(t)?t.map(e=>Ef(e)):t}function xM(t){return{width:t.width,height:t.height,ticks:t.ticks&&vM(t.ticks),clipPath:t.clipPath,domain:Ef(t.domain)}}function bM(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=Ef(e.domain),t.ticks&&e.ticks&&pM(t.ticks,e.ticks),t}var TM={getAxisInstance:function(){return this.axis||new SM(this)}};class SM{constructor(e){Er(this,"owner"),Er(this,"x"),Er(this,"subX"),Er(this,"subY"),Er(this,"subY2"),Er(this,"y"),Er(this,"y2"),Er(this,"axesList",{}),Er(this,"tick",{x:null,y:null,y2:null}),Er(this,"xs",[]),Er(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom",subY:"left",subY2:"right"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${yn.axis} ${yn[`axis${Ze(e)}`]}`}isHorizontal(e,n){const r=e.config.axis_rotated;return n?r:!r}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||J(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:r}=e;let a=n.axis_x_extent;if(a){if(M(a))a=a.bind(e.api)(e.getXDomain(e.data.targets),r.subX);else if(this.isTimeSeries()&&a.every(isNaN)){const s=bn.bind(e);a=a.map(o=>r.subX(s(o)))}}return a}init(){const e=this.owner,{config:n,$el:{main:r,axis:a},state:{clip:s}}=e,o=["x","y"];n.axis_y2_show&&o.push("y2"),o.forEach(l=>{const c=this.getAxisClassName(l);a[l]=r.append("g").attr("class",c).attr("clip-path",()=>{let u=null;return l==="x"?u=s.pathXAxis:l==="y"&&(u=s.pathYAxis),u}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:r,axis_y2_inner:a}=e.config;this.orient={x:n?"left":"bottom",y:n?r?"top":"bottom":r?"right":"left",y2:n?a?"bottom":"top":a?"left":"right",subX:n?"left":"bottom",subY:n?r?"top":"bottom":r?"right":"left",subY2:n?a?"bottom":"top":a?"left":"right"}}generateAxes(e){const n=this.owner,{config:r}=n,a=[],s=r[`axis_${e}_axes`],o=r.axis_rotated;let l;e==="x"?l=o?"left":"bottom":e==="y"?l=o?"bottom":"left":e==="y2"&&(l=o?"top":"right"),s.length&&s.forEach(c=>{const u=c.tick||{},f=n.scale[e].copy();c.domain&&f.domain(c.domain);const d=new ry({outerTick:u.outer!==!1,noTransition:!1,config:r,id:e,isSubAxes:!0,owner:n}).scale(f).orient(l).tickFormat(M(u.format)?u.format.bind(n.api):(h=>h));L(u.count)&&d.ticks(u.count),u.values&&d.tickValues(u.values),a.push(d)}),this.axesList[e]=a}updateAxes(){const e=this.owner,{config:n,$el:{main:r},$T:a}=e;Object.keys(this.axesList).forEach(s=>{const o=n[`axis_${s}_axes`],l=e.scale[s].copy(),c=l.range();this.axesList[s].forEach((u,f)=>{const d=u.scale().range();c.every((b,x)=>b===d[x])||u.scale().range(c);const h=`${this.getAxisClassName(s)}-${f+1}`;let v=r.select(`.${h.replace(/\s/,".")}`);v.empty()?(v=r.append("g").attr("class",h).style("visibility",n[`axis_${s}_show`]?null:"hidden"),u.create(v)):(o[f].domain&&l.domain(o[f].domain),u.scale(l).create(a(v))),v.attr("transform",e.getTranslate(s,f+1))})})}setAxis(e,n,r,a){const s=this.owner,o=xf(e);Al(e)||(this.tick[o]=this.getTickValues(o)),this[e]=this.getAxis(e,n,r,e==="x"&&(s.scale.zoom||s.config.subchart_show||s.state.resizing)?!0:a)}getAxis(e,n,r,a,s){const o=this.owner,{config:l}=o,c=/^(x|subX)$/.test(e),u=xf(e),f=c&&this.isCategorized(),d=this.orient[e],h=s?0:o.getAxisTickRotate(u);let v;if(c)v=e==="subX"?o.format.subXAxisTick:o.format.xAxisTick;else{const N=Al(e)?l[`subchart_axis_${u}_tick_format`]||l[`axis_${u}_tick_format`]:l[`axis_${u}_tick_format`];M(N)&&(v=N.bind(o.api))}let b=Al(e)?this.getTickValues(u,!0):this.tick[u];const x=dr({outerTick:r,noTransition:a,config:l,id:e,tickTextRotate:h,owner:o},c&&{isCategory:f,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:f&&l.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});c||(x.tickStepSize=l[`axis_${u}_tick_stepSize`]);const E=new ry(x).scale(c&&o.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&b&&!M(b)){const N=bn.bind(o);b=b.map(k=>N(k))}else!c&&this.isTimeSeriesY()&&(E.ticks(l.axis_y_tick_time_value),b=null);b&&E.tickValues(b),E.tickFormat(v||!c&&o.isStackNormalized()&&o.hasAxisGroupedData(u)&&(N=>`${N}%`)),f&&(E.tickCentered(l.axis_x_tick_centered),tt(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const w=Aa(l,e,"count");return w&&E.ticks(w),E}updateXAxisTickValues(e,n){var r;const a=this.owner,{config:s}=a,o=s.axis_x_tick_fit,l=(u=s.axis_x_tick_count)=>{let f=u,d;return o&&(d=a.mapTargetsToUniqueXs(e),this.isCategorized()&&f>d.length&&(f=d.length),d=this.generateTickValues(d,f,this.isTimeSeries())),d},c=l();if(n)n.tickValues(c);else if(this.x){const u=this.getTickValues("x",!0),f=Aa(s,"subX","count"),d=u!=null?u:f!==s.axis_x_tick_count?l(f):c;this.x.tickValues(c),(r=this.subX)==null||r.tickValues(d)}return c}getId(e){const{config:n,scale:r}=this.owner;let a=n.data_axes[e];return(!a||!r[a])&&(a="y"),a}getXAxisTickFormat(e){const n=this.owner,{config:r,format:a}=n,s=e&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,o=this.isTimeSeries(),l=this.isCategorized();let c;return s?M(s)?c=s.bind(n.api):o&&(c=u=>u?a.axisTime(s)(u):""):c=o?a.defaultAxisTime:l?n.categoryName:u=>u<0?u.toFixed(0):u,M(c)?u=>c.apply(n,l?[u,n.categoryName(u)]:[u]):c}getTickValues(e,n=!1){const r=this.owner,a=n?Aa(r.config,`sub${Ze(e)}`,"values"):r.config[`axis_${e}_tick_values`],s=M(a)?a.call(r.api):a,o=r[`${e}Axis`];return n?s!=null?s:void 0:s||(o?o.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return $(n)?n:n?n.text:null}setLabelText(e,n){const r=this.owner,{config:a}=r,s=this.getLabelOptionByAxisId(e);$(s)?a[`axis_${e}_label`]=n:s&&(s.text=n)}getLabelPosition(e,n){const r=this.owner.config.axis_rotated,a=this.getLabelOptionByAxisId(e),s=K(a)&&a.position?a.position:n[+!r],o=l=>!!~s.indexOf(l);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}xForAxisLabel(e){const n=this.owner,{state:{width:r,height:a}}=n,s=this.getAxisLabelPosition(e);let o=s.isMiddle?-a/2:0;return this.isHorizontal(n,e!=="x")?o=s.isLeft?0:s.isCenter?r/2:r:s.isBottom&&(o=-a),o}textAnchorForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let a=r.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?a=r.isLeft?"start":r.isCenter?"middle":"end":r.isBottom&&(a="start"),a}dxForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let a=r.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?a=r.isLeft?"0.5em":r.isRight?"-0.5em":"0":r.isTop&&(a="-0.5em"),a}dyForAxisLabel(e){const n=this.owner,{config:r}=n,a=r.axis_rotated,s=this.getAxisLabelPosition(e).isInner,o=r[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const u=r.axis_x_height;a?c=s?"1.2em":-25-l:s?c="-0.5em":u?c=u-10:o?c=o-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],a?s?c=c[0]:o?c=o*(e==="y2"?-1:1)-c[1]:c=c[2]:c=s?c[3]:(c[4]+(r[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getTickFormatCacheValue(e){const n=this.owner,{config:r}=n;return e==="x"?{format:r.axis_x_tick_format,type:r.axis_x_type,localtime:r.axis_x_localtime,categories:r.axis_x_categories}:{format:r[`axis_${e}_tick_format`],normalized:n.isStackNormalized(),grouped:n.hasAxisGroupedData(e),type:r[`axis_${e}_type`]}}getMaxTickSizeFingerprint(e,n,r,a,s,o){var l;const c=this.owner,{config:u,state:f}=c,d=e==="x",h=d?"axis_x":`axis_${e}`,v=a.tickValues();return Af({id:e,withoutRecompute:!!o,dataGeneration:f.dataGeneration,size:[f.current.width,f.current.height],range:(l=n.range)==null?void 0:l.call(n),domain:r,type:n.type,orient:this.orient[e],axisRotated:u.axis_rotated,evalTextSize:u.axis_evalTextSize,format:this.getTickFormatCacheValue(e),ticks:{values:hM(v),rawValues:u[`${h}_tick_values`],arguments:a.ticks(),count:u[`${h}_tick_count`],rotate:s,show:u[`${h}_tick_show`],textShow:u[`${h}_tick_text_show`],textPosition:u[`${h}_tick_text_position`],inner:u[`${h}_tick_inner`],culling:u[`${h}_tick_culling`],cullingMax:u[`${h}_tick_culling_max`],cullingLines:u[`${h}_tick_culling_lines`],cullingReverse:u[`${h}_tick_culling_reverse`],stepSize:!d&&u[`${h}_tick_stepSize`],timeValue:!d&&u[`${h}_tick_time_value`],fit:d&&u.axis_x_tick_fit,autorotate:d&&u.axis_x_tick_autorotate,centered:d&&u.axis_x_tick_centered,inverted:d&&u.axis_x_inverted,multiline:d&&u.axis_x_tick_multiline,width:d&&u.axis_x_tick_width}})}getMaxTickSize(e,n){var r;const a=this.owner,{config:s,state:o,$el:{svg:l,chart:c}}=a,{current:u,resizing:f}=o,d=u.maxTickSize[e],h=`${Me.maxTickSize}_${e}_${!!n}`,v=a.cache.get(h);if(v&&v.generation===o.redrawGeneration)return d;const b=`axis_${e}`,x={width:0,height:0};let E;if(f||n||!s[`${b}_show`]||d.width>0&&a.filterTargetsToShow().length===0)return d;if((l||s.render_mode==="canvas")&&((r=a.scale[e])!=null&&r.copy)){const w=/^y2?$/.test(e),N=a.getTargetsToShow(),k=a.scale[e].copy().domain(a[`get${w?"Y":"X"}Domain`](N,e)),B=k.domain(),G=B[0]===B[1]&&B.every(bt=>bt>0),V=q(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(bt=>bt>0);if(G||V)return d;d.domain=B,w||Sf(d.ticks);const Z=this.getAxis(e,k,!1,!1,!0),Y=s[`${b}_tick_rotate`],et=s[`${b}_tick_count`];if(!s[`${b}_tick_values`]&&et&&Z.tickValues(this.generateTickValues(B,et,w?this.isTimeSeriesY():this.isTimeSeries())),!w&&this.updateXAxisTickValues(N,Z),E=this.getMaxTickSizeFingerprint(e,k,B,Z,Y,n),(v==null?void 0:v.fingerprint)===E)return a.cache.add(h,lM(oM({},v),{generation:o.redrawGeneration})),bM(d,v.value);const at=Z.tickValues(),ot=!w&&Array.isArray(at)&&at.length>El;ot&&Z.tickValues(dM(at,Z.tickFormat()));const st=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),_=st.append("g").attr("class",`${yn[`axis${Ze(e)}`]} ${Oe.dummy}`);Z.create(_);const{sizeFor1Char:lt}=_.node(),nt=st.selectAll("text").attr("transform",D(Y)?`rotate(${Y})`:null),dt=ot?at.length:nt.size();if(lt)nt.each(function(bt,At){const Et=this.textContent.length*lt.w,Rt=lt.h;x.width=Math.max(x.width,Et),x.height=Math.max(x.height,Rt),w||(d.ticks[At]=Et)});else{const bt=[];if(nt.each(function(){bt.push(this)}),(bt.length<=5?bt:cM(bt)).map(Et=>en(Et,!0)).forEach(Et=>{x.width=Math.max(x.width,Et.width),x.height=Math.max(x.height,Et.height)}),!w)for(let Et=0;Et<bt.length;Et++)d.ticks[Et]=x.width}!w&&ot&&gM(d.ticks,dt,x.width),st.remove()}return Object.keys(x).forEach(w=>{x[w]>0&&(d[w]=x[w])}),a.cache.add(h,{fingerprint:E,generation:o.redrawGeneration,value:xM(d)}),d}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:r,config:a,state:{current:s,isLegendRight:o,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),u=c>0&&c<90;if((r.isCategorized()||r.isTimeSeries())&&a.axis_x_tick_fit&&(!a.axis_x_tick_culling||tt(a.axis_x_tick_culling))&&!a.axis_x_tick_multiline&&u){const f=a.axis_y2_show&&s.maxTickSize.y2.width||0,d=o&&l||0,h=s.width-n.getCurrentPaddingByDirection("left"),v=this.getXAxisTickMaxOverflow(c,h-e)-f-d,b=Math.max(0,v)+e;return Math.min(b,h/2)}return 0}getXAxisTickMaxOverflow(e,n){var r;const a=this.owner,{axis:s,config:o,state:l}=a,c=s.isTimeSeries(),u=l.current.maxTickSize.x.ticks,f=u.length,d=(r=Tf(u))!=null?r:l.current.maxTickSize.x.width,{left:h,right:v}=l.axis.x.padding;let b=0;const x=f-(c&&o.axis_x_tick_fit?.5:0);for(let N=0;N<f;N++){const k=N+1,B=Math.cos(Math.PI*e/180)*mM(u,N,d),G=k-(c?1:.5)+h;if(G<=0)continue;const Z=(n-B)/G,Y=x-k,et=v*Z,it=Y*Z+et,at=B-Z/2-it;b=Math.max(b,at)}const E=a.getTargetsToShow();let w=0;if(!c&&o.axis_x_tick_count<=E.length&&E[0].values.length){const N=ma(a.axis.getAxisType("x"),0,n-b).domain([h*-1,a.getXDomainMax(a.data.targets)+1+v]);w=(N(1)-N(0))/2}return b+w}updateLabels(e){const n=this.owner,{config:r,$el:{main:a},$T:s}=n,o=r.axis_rotated;["x","y","y2"].forEach(l=>{const c=this.getLabelText(l),u=`axis${Ze(l)}`,f=yn[`${u}Label`];if(c){let d=a.select(`text.${f}`);d.empty()&&(d=a.select(`g.${yn[u]}`).insert("text",":first-child").attr("class",f).attr("transform",["rotate(-90)",null][l==="x"?+!o:+o]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),s(d,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,r,a){const s=D(e)?e:e[n];return L(s)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",s,a):r}generateTickValues(e,n,r){let a=e;if(n){const s=M(n)?n():n;if(s===1)a=[e[0]];else if(s===2)a=[e[0],e[e.length-1]];else if(s>2){const o=this.isCategorized(),l=s-2,c=e[0],u=e[e.length-1],f=(u-c)/(l+1);let d;a=[c];for(let h=0;h<l;h++)d=+c+f*(h+1),a.push(r?new Date(d):o?Math.round(d):d);a.push(u)}}return r||(a=a.sort((s,o)=>s-o)),a}generateTransitions(e){const n=this.owner,{$el:{axis:r},$T:a}=n,[s,o,l,c,u,f]=["x","y","y2","subX","subY","subY2"].map(d=>a(r[d],e));return{axisX:s,axisY:o,axisY2:l,axisSubX:c,axisSubY:u,axisSubY2:f}}redraw(e,n,r){const a=this.owner,{config:s,state:o,$el:l}=a,c=n?"0":null;["x","y","y2","subX","subY","subY2"].forEach(u=>{const f=this[u],d=l.axis[u];f&&d&&(!r&&!s.transition_duration&&(f.config.withoutTransition=!0),d.style("opacity",c),f.create(e[`axis${Ze(u)}`]))}),this.updateAxes(),!o.rendered&&s.axis_tooltip&&this.setAxisTooltip()}syncAxisDomains(e,n,r){var a;const s=this.owner,{config:o,scale:l,$el:c}=s,u=!!l.zoom;let f;if(!u&&this.isCategorized()&&e.length===0&&c.axis.x&&l.x.domain([0,c.axis.x.selectAll(".tick").size()]),l.x&&e.length?(!u&&s.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),o.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(a=this.subX)==null||a.tickValues([])),o.zoom_rescale&&!r&&(f=l.x.orgDomain()),["y","y2"].forEach(d=>{const h=`axis_${d}_`,v=l[d];if(v){const b=o[`${h}tick_values`],x=o[`${h}tick_count`];if(v.domain(s.getYDomain(e,d,f)),!b&&x){const E=s.axis[d],w=v.domain();E.tickValues(this.generateTickValues(w,w.every(N=>N===0)?1:x,this.isTimeSeriesY()))}}}),n.Y){const d=()=>{var h,v;(h=l.subY)==null||h.domain(s.getYDomain(e,"y")),(v=l.subY2)==null||v.domain(s.getYDomain(e,"y2")),["y","y2"].forEach(b=>{const x=b==="y2"?"subY2":"subY",E=l[x],w=s.axis[x],N=this.getTickValues(b,!0),k=Aa(o,x,"count");if(!E||!w||N||!k)return;const B=E.domain();w.tickValues(this.generateTickValues(B,B.every(G=>G===0)?1:k,this.isTimeSeriesY()))})};o.subchart_show?s.withSubchartTypeContext(d):d()}}redrawAxis(e,n,r,a,s){const o=this.owner;this.syncAxisDomains(e,n,a),this.redraw(r,o.hasArcType(),s),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling()}setCulling(){const e=this.owner,{config:n,state:{clip:r,current:a},$el:s}=e;["subX","x","y","y2","subY","subY2"].forEach(o=>{const l=s.axis[o],c=Aa(n,o,"culling");if(l&&c){const u=l.selectAll(".tick"),f=wr(u.data(),!Aa(n,o,"culling_reverse")),d=f.length,h=Aa(n,o,"culling_max"),b=!Aa(n,o,"culling_lines")||fM(this[o],f,uM(u));let x;if(d){for(let w=1;w<d;w++)if(d/w<h){x=w;break}x=x!=null?x:d;const E=new Map;for(let w=0;w<f.length;w++)E.set(f[w],w);u.each(function(w){var N;const k=b?this:this.querySelector("text");k&&(k.style.display=((N=E.get(w))!=null?N:0)%x?"none":null)})}else u.style("display",null);if(o==="x"){const E=a.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;s.svg.selectAll(`.${yn.axisX} .tick text`).attr("clip-path",E)}}})}setAxisTooltip(){var e;const n=this.owner,{config:{axis_rotated:r,axis_tooltip:a},$el:{axis:s,axisTooltip:o}}=n,l=(e=a.backgroundColor)!=null?e:"black";n.generateTextBGColorFilter(l,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(c=>{var u,f,d;if($(l)||l[c])if(o[c]=(u=s[c])==null?void 0:u.append("text").classed(yn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),r){const h=c==="x"?"x":"y",v=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(f=o[c])==null||f.attr(h,v).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const h=c==="x"?"y":"x",v=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(d=o[c])==null||d.attr(h,v).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var oy=Math.pow,AM={initEventRect(){this.$el.main.select(`.${Oe.chart}`).append("g").attr("class",_r.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:r,$el:a}=e,s=e.isMultipleX(),o=n.axis_x_inverted;if(a.eventRect)e.updateEventRect(a.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${_r.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(_r.eventRectsMultiple,s).classed(_r.eventRectsSingle,!s).selectAll(`.${_r.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),a.eventRect=c,e.state.inputType==="touch"&&!a.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),r.rendered&&e.updateEventRect(a.eventRect,!0)}if(!s){const l=e.getMaxDataCountTarget();(!n.data_xSort||o)&&l.sort((c,u)=>o?u.x-c.x:c.x-u.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),r.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:r,svg:a}}=t,s=v=>{if(t.isMultipleX())t.selectRectForMultipleXs(v);else{const b=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(b),b===-1?t.unselectRect():t.selectRectForSingle(v,b)}},o=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=X(l)&&l||!1,u=!isNaN(l)&&l||null;let f;const d=!c&&u===null,h=v=>{const b=v.type,E=v.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];b==="touchstart"?c?v.preventDefault():u!==null&&(f=E):b==="touchmove"&&(c||f===!0||u!==null&&Math.abs(f-E)>=u)&&(f=!0,v.preventDefault())};r.on("touchstart",v=>{n.event=v,t.updateEventRect()},{passive:d}).on("touchstart.eventRect touchmove.eventRect",v=>{if(n.event=v,!r.empty()&&r.classed(_r.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||v.touches.length>1)return;h(v),s(r.node())}else o()},{passive:d}).on("touchend.eventRect",v=>{n.event=v,!r.empty()&&r.classed(_r.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},{passive:d}),a.on("touchstart",v=>{n.event=v;const{target:b}=v;b&&b!==r.node()&&o()},{passive:d})},updateEventRect(t,e=!1){const n=this,{state:r,$el:a}=n,{eventReceiver:s,width:o,height:l,rendered:c,resizing:u}=r,f=t||a.eventRect,d=()=>{if(s){const h=Xv(a.chart.node());s.rect=en(f.node(),!0).toJSON(),s.rect.top+=h.y,s.rect.left+=h.x}};(!c||u||e)&&(f.attr("x",0).attr("y",0).attr("width",o).attr("height",l),(!c||e)&&f.classed(_r.eventRect,!0)),d()},updateEventType(t){const e=this,n=X(t),r=n?e.$el.eventRect:t,a=n?t!==(r==null?void 0:r.datum().multipleX):!1;r&&(a&&(r==null||r.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(r):e.generateEventRectsForSingleX(r))},updateEventRectData(){const t=this,{config:e,scale:n,state:r}=t,a=n.zoom||n.x,s=e.axis_rotated,o=t.isMultipleX(),l=a==null?void 0:a.domain(),c=l?`${l[0]}_${l[1]}_${r.width}_${r.height}_${t.data.targets.length}_${r.dataGeneration}_${[...r.hiddenTargetIds].join(",")}`:null;if(c&&c===r._eventRectFingerprint)return;r._eventRectFingerprint=c;let u,f,d,h;if(t.updateEventType(o),o)u=0,f=0,d=r.width,h=r.height;else{let x,E;if(t.axis.isCategorized())x=t.getEventRectWidth(),E=w=>a(w.x)-x/2;else{const w=({index:N})=>({prev:t.getPrevX(N),next:t.getNextX(N)});x=N=>{const k=w(N),B=a.domain();let G;return k.prev===null&&k.next===null?G=s?r.height:r.width:k.prev===null?G=(a(k.next)+a(N.x))/2:k.next===null?G=a(B[1])-(a(k.prev)+a(N.x))/2:G=Math.max(0,(a(k.next)-a(k.prev))/2),G},E=N=>{const k=w(N);let B;return k.prev===null&&k.next===null?B=0:k.prev===null?B=a(a.domain()[0]):B=(a(N.x)+a(k.prev))/2,B}}u=s?0:E,f=s?E:0,d=s?r.width:x,h=s?x:r.height}const{eventReceiver:v}=r,b=(x,E)=>M(x)?x(E):x;v.coords.splice(v.data.length),v.data.forEach((x,E)=>{v.coords[E]={x:b(u,x),y:b(f,x),w:b(d,x),h:b(h,x)}})},selectRectForSingle(t,e){var n,r,a,s,o,l,c;const u=this,{config:f,state:d,$el:{main:h,circle:v}}=u,b=f.data_selection_enabled,x=f.data_selection_grouped,E=f.data_selection_isselectable,w=f.tooltip_grouped,N=u.getAllValuesOnIndex(e);if(w&&(u.showTooltip(N,t),(n=u.showGridFocus)==null||n.call(u,N),(r=u.showSubchartGridFocus)==null||r.call(u,N),!b||x))return;!v&&h.selectAll(`.${Oe.EXPANDED}:not(.${nn.shape}-${e})`).classed(Oe.EXPANDED,!1);const k=h.selectAll(`.${nn.shape}-${e}`).classed(Oe.EXPANDED,!0).style("cursor",E?"pointer":null).filter(function(B){return u.isWithinShape(this,B)});if(k.call(B=>{var G,V,Z;const Y=B.data();b&&(x||E!=null&&E.bind(u.api)(Y))&&(t.style.cursor="pointer"),w||(u.showTooltip(Y,t),(G=u.showGridFocus)==null||G.call(u,Y),(V=u.showSubchartGridFocus)==null||V.call(u,Y),(Z=u.unexpandCircles)==null||Z.call(u),B.each(et=>u.setExpand(e,et.id)))}),!w&&k.empty()){const B=Zn(d.event,t),G=N.filter(V=>u.isTargetToShow(V.id)?u.dist(V,B)<u.getPointSensitivity(V):!1);if(G.length>0){let V=G[0],Z=u.dist(V,B);for(let Y=1;Y<G.length;Y++){const et=G[Y],it=u.dist(et,B);it<Z&&(Z=it,V=et)}u.showTooltip([V],t),(a=u.showGridFocus)==null||a.call(u,[V]),(s=u.showSubchartGridFocus)==null||s.call(u,[V]),(o=u.unexpandCircles)==null||o.call(u),u.setExpand(e,V.id,!0),b&&(x||E!=null&&E.bind(u.api)(V))&&(t.style.cursor="pointer")}else f.interaction_onout&&((l=u.hideGridFocus)==null||l.call(u),(c=u.hideSubchartGridFocus)==null||c.call(u),u.hideTooltip(),!x&&u.setExpand(e))}},selectRectForMultipleXs(t,e=!0){var n,r;const a=this,{config:s,state:o}=a,l=a.getTargetsToShow();if(o.dragging||a.hasArcType(l))return;const c=Zn(o.event,t),u=a.findClosestFromTargets(l,c);if(e&&o.mouseover&&(!u||u.id!==o.mouseover.id)&&(s.data_onout.call(a.api,o.mouseover),o.mouseover=void 0),!u){a.unselectRect();return}const d=(a.isBubbleType(u)||a.isScatterType(u)||!s.tooltip_grouped?[u]:a.filterByX(l,u.x)).map(v=>a.addName(v));a.showTooltip(d,t),a.setExpand(u.index,u.id,!0),(n=a.showGridFocus)==null||n.call(a,d),(r=a.showSubchartGridFocus)==null||r.call(a,d);const h=a.dist(u,c);(a.isBarType(u.id)||h<a.getPointSensitivity(u))&&(a.$el.eventRect.style("cursor","pointer"),e&&(!o.mouseover||o.mouseover.x!==u.x||o.mouseover.id!==u.id)&&(s.data_onover.call(a.api,u),o.mouseover=u))},unselectRect(){var t,e,n,r;const a=this,{state:s,$el:{circle:o,tooltip:l}}=a;if(s._lastTooltipMouse=null,s.isCanvasMode){(t=a.clearCanvasFocus)==null||t.call(a),l&&a.hideTooltip();return}(e=a.$el.eventRect)==null||e.style("cursor",null),(n=a.hideGridFocus)==null||n.call(a),(r=a.hideSubchartGridFocus)==null||r.call(a),l&&(a.hideTooltip(),a._handleLinkedCharts(!1)),o&&!a.isPointFocusOnly()&&a.unexpandCircles(),a.expandBarTypeShapes(!1)},generateEventRectsForSingleX(t){const e=this,{config:n,state:r}=e,{eventReceiver:a}=r,s=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(o){r.event=o;const{currentIdx:l,data:c}=a,u=c[l===-1?e.getDataIndexFromEvent(o):l];e.clickHandlerForSingleX.bind(this)(u,e)}).datum({multipleX:!1});if(r.inputType==="mouse"){const o=l=>{const c=l?e.getDataIndexFromEvent(l):a.currentIdx;return c>-1?a.data[c]:null};s.on("mouseover",l=>{r.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){var c;const u=o(l);if(r.event=l,!u)return;let{index:f}=u;const d=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(d)){const v=e.scale.zoom||e.scale.x,b=e.axis.xs[f],x=v.invert(Zn(l,this)[0]);d==="step-after"&&x<b?f-=1:d==="step-before"&&x>b&&(f+=1)}(c=e.showAxisGridFocus)==null||c.call(e);const h=n.tooltip_grouped&&f===a.currentIdx;if(r.dragging||r.flowing||e.hasArcType()||h){if(n.tooltip_show&&h){const[v,b]=Zn(l,this),x=r._lastTooltipMouse;(!x||oy(v-x[0],2)+oy(b-x[1],2)>=9)&&(r._lastTooltipMouse=[v,b],e.setTooltipPosition())}return}f!==a.currentIdx&&(e.setOverOut(!1,a.currentIdx),a.currentIdx=f),f===-1?e.unselectRect():e.selectRectForSingle(this,f),e.setOverOut(f!==-1,f)}).on("mouseout",l=>{var c;r.event=l,!(!e.config||e.hasArcType()||a.currentIdx===-1||!n.interaction_onout)&&((c=e.hideAxisGridFocus)==null||c.call(e),e.unselectRect(),e.setOverOut(!1,a.currentIdx),a.currentIdx=-1)})}return s},clickHandlerForSingleX(t,e){const n=e,{config:r,state:a,$el:{main:s}}=n;if(!t||n.hasArcType()||a.cancelClick){a.cancelClick&&(a.cancelClick=!1);return}const{index:o}=t;s.selectAll(`.${nn.shape}-${o}`).each(function(l){var c;(r.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,o),r.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:r}=e;t.on("click",function(a){r.event=a,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),r.inputType==="mouse"&&t.on("mouseover mousemove",function(a){r.event=a,e.selectRectForMultipleXs(this)}).on("mouseout",a=>{r.event=a,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:r}=e,a=e.getTargetsToShow();if(e.hasArcType(a))return;const s=Zn(r.event,this),o=e.findClosestFromTargets(a,s);if(!o)return;const l=e.getPointSensitivity(o);(e.isBarType(o.id)||e.dist(o,s)<l)&&e.$el.main.selectAll(`.${nn.shapes}${e.getTargetSelectorSuffix(o.id)}`).selectAll(`.${nn.shape}-${o.index}`).each(function(){var c;(n.data_selection_grouped||e.isWithinShape(this,o))&&((c=e.toggleShape)==null||c.call(e,this,o,o.index),n.data_onclick.bind(e.api)(o,this))})}},EM={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:a,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?0:20),c=(o?r.top+s+10:r.bottom)+20,u=o?-(1+l):-(l-1),f=-15,d=o?r.left+20:a+10+l;t.attr("x",u).attr("y",f).attr("width",d).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:a,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?20:0),c=n.axis_y_inner,u=c&&!o?n.axis_y_label.text?-20:-1:o?-(1+l):-(l-1),f=-(o?20:r.top),d=(o?a+15+l:r.left+20)+(c?20:0),h=(o?r.bottom+10:r.top+s)+10;t.attr("x",u).attr("y",f).attr("width",d).attr("height",h)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:r},$el:{defs:a}}=t,s=t.getHorizontalAxisHeight("x");if(a&&!n.idXAxisTickTexts){const o=`${n.id}-xaxisticktexts`;t.appendClip(a,o),n.idXAxisTickTexts=o,n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts)}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){const a=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/a}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:r}}=t;r&&r.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},CM={getAxisSize(t){const e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId(t,e){var n,r;const a=this;if(a.axis){const s=(n=a.axis)==null?void 0:n.getAxisLabelPosition(t),{width:o}=a.axis.getMaxTickSize(t,e),l=o===0?.5:0;return o+(((r=a.config.padding)==null?void 0:r.mode)==="fit"?s.isInner?10+l:10:s.isInner?20+l:40)}else return 40},getHorizontalAxisHeight(t){var e,n;const r=this,{config:a,state:s}=r,{rotatedPadding:o,isLegendRight:l,isLegendInset:c}=s,u=a.axis_rotated,f=((e=a.padding)==null?void 0:e.mode)==="fit",d=a[`axis_${t}_inner`],h=a[`axis_${t}_label`].text,v=13;let b=((n=a.padding)==null?void 0:n.mode)==="fit"?d&&!h?t==="y"?1:0:20:30;if(t==="x"&&!a.axis_x_show)return 8;if(t==="x"&&D(a.axis_x_height))return a.axis_x_height;if(t==="y"&&!a.axis_y_show)return a.legend_show&&!l&&!c?10:1;if(t==="y2"&&!a.axis_y2_show)return f?0:o.top;const x=r.axis.getMaxTickSize(t),E=Math.abs(a.axis_x_tick_rotate)>0&&(!a.axis_x_tick_autorotate||r.needToRotateXAxisTickTexts());return(a.axis_x_tick_multiline||E)&&x.height>v&&(b+=x.height-v),b+(r.axis.getAxisLabelPosition(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,r=e.axis_x_inverted,a=n.x.tickInterval();return Math.max(0,r?Math.abs(a):a)},getAxisTickRotate(t){const e=this,{axis:n,config:r,state:a,$el:s}=e;let o=r[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&l){const c=r.axis_x_tick_count,u=a.current.maxTickSize.x.ticks.length;let f=0;if(c?f=c>u?u:c:u&&(f=u),f!==a.axis.x.tickCount){const{targets:d}=e.data;a.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(d,"min"),e.getXDomainMinMax(d,"max")],f)}a.axis.x.tickCount=f}(s.svg||a.isCanvasMode)&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&l&&(o=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:r,legendItemWidth:a}}=t,s=r&&a,o=n.width-s-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),u=l?o/l:0;return c>u}},wM={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},IM={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},RM={axis_y2_clipPath:!0,axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},OM=Object.defineProperty,ly=Object.getOwnPropertySymbols,PM=Object.prototype.hasOwnProperty,MM=Object.prototype.propertyIsEnumerable,cy=(t,e,n)=>e in t?OM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cf=(t,e)=>{for(var n in e||(e={}))PM.call(e,n)&&cy(t,n,e[n]);if(ly)for(var n of ly(e))MM.call(e,n)&&cy(t,n,e[n]);return t},LM=Cf(Cf(Cf({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},wM),IM),RM),DM={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const FM=[YP,KP,ZP],uy={axis:TM,clip:EM,eventrect:AM,sizeAxis:CM},fy={optDataAxis:DM,optAxis:LM};function dy(t){return Object.keys(t).map(e=>t[e])}function hy(t=[],e=[]){Ve(dn.prototype,dy(uy).concat(t)),Ve(Gn.prototype,FM),Br.setOptions(dy(fy).concat(e))}function Ui(t=[],e=[]){hy(t,e)}function ra(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];hy([Ya,bl,VP].concat(n),[Sa,jP].concat(e))}let gy=()=>(ra(Bi,[ki]),(gy=()=>ne.AREA)()),vy=()=>(ra(Bi,[ki]),(vy=()=>ne.AREA_LINE_RANGE)()),py=()=>(ra(Bi,[ki]),(py=()=>ne.AREA_STEP_RANGE)()),my=()=>(ra(Bi,[ki,mf]),(my=()=>ne.AREA_SPLINE)()),yy=()=>(ra(Bi,[ki,mf]),(yy=()=>ne.AREA_SPLINE_RANGE)()),xy=()=>(ra(Bi,[ki]),(xy=()=>ne.AREA_STEP)());function wf(t){const e=this.config.bar_connectLine,n=(e==null?void 0:e[t])||e;return/^(start|end)\-(start|end)$/.test(n)?n:null}var NM={initBar(){const{$el:t,config:e,state:{clip:n}}=this;t.bar=t.main.select(`.${Oe.chart}`),t.bar=e.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",tr.chartBars).call(this.setCssRule(!1,`.${tr.chartBars}`,["pointer-events:none"])),e.clipPath===!1&&(e.bar_radius||e.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,`#${n.id}`))},updateTargetsForBar(t){const e=this,{config:n}=e,r=e.getClass("bars",!0),a=n.interaction_enabled&&n.data_selection_isselectable;ef.call(e,t,{type:"Bar",elKey:"bar",containerClass:tr.chartBars,itemClass:tr.chartBar,initFn:e.initBar}).append("g").attr("class",r).style("cursor",o=>{var l;return(l=a==null?void 0:a.bind)!=null&&l.call(a,e.api)(o)?"pointer":null}).call(o=>{e.setCssRule(!0,` .${tr.bar}`,["fill"],e.color)(o),o.each(function(l){wf.call(e,l.id)&&Zt(this).append("path").attr("class",tr.barConnectLine)})})},updateBar(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,$el:a,$T:s}=n,o=e?a.subchart:a,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();const u=o.main.selectAll(`.${tr.bars}`).selectAll(`.${tr.bar}`).data(n.labelishData.bind(n));s(u.exit(),t).style("opacity","0").remove(),o.bar=u.enter().append("path").attr("class",l).style("fill",n.generateUpdateBarColor()).merge(u).style("opacity",c),n.setRatioForGroupedData(o.bar.data())},generateUpdateBarColor(){const t=this,e=t.getStylePropValue(t.color)||(()=>null);return n=>Up.call(t,n,"bar_linearGradient",e)},updateBarColor(t){return this.generateUpdateBarColor()(t)},redrawBar(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{bar:a}=n?r.$el.subchart:r.$el,s=[],o=new Map,l=pt(r),c=r.generateUpdateBarColor(),u=function(d,h,v){var b;const E=D(d.value)||r.isBarRangeType(d)||((b=r.isSubchartCandlestickBarValue)==null?void 0:b.call(r,d,n))?t(d,h):[""];let w=o.get(d.id);if(w===void 0&&(w=wf.call(r,d.id),o.set(d.id,w)),E.length>1&&s.push(E[1]),h===v.length-1&&s.length){const N=r.$T(Zt(this.parentNode.querySelector(`.${tr.barConnectLine}`)),e,Vn());r.updateConnectLine(N,w,s),s.splice(0)}return E[0]},f=r.$T(a,e,Vn());return l&&typeof f.attrTween=="function"?f.attrTween("d",function(d,h,v){var b;const x=u.call(this,d,h,v);return gt((b=this.getAttribute("d"))!=null?b:"",x)}):f.attr("d",u),[f.style("fill",d=>{var h;return((h=r.getSubchartCandlestickBarColor)==null?void 0:h.call(r,d,n))||c(d)}).style("clip-path",d=>d.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:r}=n,a=n.generateGetBarPoints(t,e),s=pt(n),o=s?mt(n):new Set,l=new Map;return(c,u)=>{const f=a(c,u),{indexX:d,indexY:h,isNegative:v,pos:b,radius:x,clipPath:E}=wt(n,c,f,s,o,n.isStackingRadiusData.bind(n)),w=["",""];if(c.clipPath=E,s){const G=`a${x} ${x} ${v?"1 0 0":"0 0 1"} `;w[h]=`${G}${x},${x}`,w[d]=`${G}${[-x,x][r.axis_rotated?"sort":"reverse"]()}`,v&&w.reverse()}const N=r.axis_rotated?`H${b} ${w[0]}V${f[2][h]-x} ${w[1]}H${f[3][d]}`:`V${b} ${w[0]}H${f[2][d]-x} ${w[1]}V${f[3][h]}`,k=[`M${f[0][d]},${f[0][h]}${N}z`];let B=l.get(c.id);return B===void 0&&(B=wf.call(n,c.id),l.set(c.id,B)),B&&k.push(r.axis_rotated?{x:f[0][d],y:f[0][h],width:f[0][d]-b,height:f[2][h]-f[0][h]}:{x:f[0][d],y:b,width:f[2][d]-f[0][d],height:f[3][h]-b}),k}},isStackingRadiusData(t){const e=this,{$el:n,config:r,data:a,state:s}=e,{id:o,index:l,value:c}=t;if(s.hiddenTargetIds.has(o)){const h=n.bar.filter(v=>v.id===o&&v.value===c);return!h.empty()&&/a\d+/i.test(h.attr("d"))}const u=r.data_groups.find(h=>h.indexOf(o)>-1),d=e.orderTargets(e.filterTargetsToShow(a.targets.filter(e.isBarType,e))).filter(h=>u.indexOf(h.id)>-1).map(h=>{const v=h.values[l];if(v&&(D(c)&&c>0?v.value>0:v.value<0))return v}).filter(Boolean).map(h=>h.id);return c!==0&&d.indexOf(o)===d.length-1},updateConnectLine(t,e,n){const r=n.map((a,s,o)=>{const l=this.config.axis_rotated,c=/^start-(start|end)$/.test(e),u=/^end-(start|end)$/.test(e),f=[],d=l?u?a.x-a.width:a.x:a.x+a.width,h=l||c?a.y+a.height:a.y;return s===0?f.push(`${d},${h}`):(f.push(l?`L${a.x-(/\w+-end$/.test(e)?a.width:0)},${a.y}`:`L${a.x},${a.y+(/\w+-start$/.test(e)?a.height:0)}`),s<o.length-1&&f.push(`M${d},${h}`)),f.join(" ")});t.attr("d",`M${r.join("")}z`)}},$M={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0};let by=()=>(Ui([NM,Ya],[$M,Sa]),(by=()=>ne.BAR)());const fn={boxplot:"bb-boxplot",boxplotBox:"bb-boxplot-box",boxplotMean:"bb-boxplot-mean",boxplotMedian:"bb-boxplot-median",boxplotOutlier:"bb-boxplot-outlier",boxplotWhisker:"bb-boxplot-whisker",chartBoxplot:"bb-chart-boxplot",chartBoxplots:"bb-chart-boxplots"};function If(t,e){const n=(t.length-1)*e,r=Math.floor(n),a=n-r;return t[r]+(a&&t[r+1]!==void 0?a*(t[r+1]-t[r]):0)}function BM(t,e){const n=t.filter(D).sort((l,c)=>l-c);if(!n.length)return null;const r=If(n,.25),a=If(n,.75),s=(a-r)*e,o=n.filter(l=>l>=r-s&&l<=a+s);return{min:o[0],q1:r,median:If(n,.5),q3:a,max:o[o.length-1],outliers:n.filter(l=>l<r-s||l>a+s),mean:n.reduce((l,c)=>l+c,0)/n.length}}var Rf={isBoxplotType(t){return this.isTypeOf(t,"boxplot")},getBoxplotData({value:t}){var e;if(!q(t))return null;const{config:n}=this,r=(e=this.boxplotParsed)!=null?e:this.boxplotParsed=new WeakMap;let a=r.get(t);if(a===void 0){const{boxplot_outlier_show:s,boxplot_mean_show:o}=n;if(n.boxplot_samples)a=BM(t,n.boxplot_whisker_iqr);else if(t.length>=5&&t.slice(0,5).every(D)){const[l,c,u,f,d,h,v]=t;a={min:l,q1:c,median:u,q3:f,max:d,outliers:q(h)?h.filter(D):[],mean:D(v)?v:void 0}}else a=null;a&&(!s&&(a.outliers=[]),!o&&(a.mean=void 0)),r.set(t,a)}return a},getBoxplotDomainValues(t){const e=this.getBoxplotData(t);return e?[e.min,e.max,...e.outliers]:[]},generateGetBoxplotPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,a=n.getIndicesMax(t)+1,s=n.getBarW("boxplot",r,a);if(rt(s)){const c=n.getTargetsToShow().map(u=>u.id);c.forEach(u=>{var f;(f=s[u])!=null||(s[u]=s._$width)}),s._$total=c.map(u=>s[u])}const o=n.getShapeX(s,t,!!e),l=n.getShapeY(!!e);return c=>{const u=n.getBoxplotData(c);if(!u)return null;const f=D(s)?s:s[c.id]||s._$width,d=o(c);return[[d,l(u.q1)],[d+f,l(u.q3)],[d+f/2,l(u.min),l(u.max)],[l(u.median)],u.outliers.map(h=>l(h)),D(u.mean)?[l(u.mean)]:[]]}},getBoxplotTooltipRows(t,e,n){const r=this.getBoxplotData(t);if(!r)return[];const a=l=>e(l,...n),s=r.outliers.slice(0,5).map(a).join(", "),o=[["Max",a(r.max)],["Q3",a(r.q3)],["Median",a(r.median)],["Q1",a(r.q1)],["Min",a(r.min)]];return D(r.mean)&&o.splice(3,0,["Mean",a(r.mean)]),r.outliers.length&&o.push(["Outliers",s+(r.outliers.length>5?`, ... (${r.outliers.length})`:"")]),o}},kM=Object.defineProperty,zM=Object.defineProperties,UM=Object.getOwnPropertyDescriptors,Ty=Object.getOwnPropertySymbols,WM=Object.prototype.hasOwnProperty,GM=Object.prototype.propertyIsEnumerable,Sy=(t,e,n)=>e in t?kM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HM=(t,e)=>{for(var n in e||(e={}))WM.call(e,n)&&Sy(t,n,e[n]);if(Ty)for(var n of Ty(e))GM.call(e,n)&&Sy(t,n,e[n]);return t},XM=(t,e)=>zM(t,UM(e)),VM=XM(HM({},Rf),{initBoxplot(){const t=this,{$el:e}=t;e.boxplot=e.main.select(`.${Oe.chart}`).append("g").attr("class",fn.chartBoxplots)},updateTargetsForBoxplot(t){const e=this,{$el:n}=e;!e.$el.boxplot&&e.initBoxplot(),n.main.select(`.${fn.chartBoxplots}`).selectAll(`.${fn.chartBoxplot}`).data(e.filterNullish(t)).attr("class",a=>fn.chartBoxplot+e.classTarget(a.id)).enter().append("g").attr("class",a=>fn.chartBoxplot+e.classTarget(a.id)).style("pointer-events","none")},updateBoxplot(t){const e=this,{$el:n,$T:r}=e,a=n.main.selectAll(`.${fn.chartBoxplot}`).selectAll(`.${fn.boxplot}`).data(o=>e.getBoxplotRows(o));r(a.exit(),t).style("opacity","0").remove();const s=a.enter().append("g").attr("class",o=>e.generateClass(fn.boxplot,o.index).trim());s.append("path").attr("class",fn.boxplotWhisker),s.append("path").attr("class",fn.boxplotBox),s.append("path").attr("class",fn.boxplotMedian),n.boxplot=a.merge(s).attr("class",o=>e.generateClass(fn.boxplot,o.index).trim()).style("opacity",e.initialOpacity.bind(e))},getBoxplotRows(t){return this.isBoxplotType(t)?t.values.filter(e=>this.getBoxplotData(e)):[]},generateDrawBoxplot(t,e){const n=this,r=n.generateGetBoxplotPoints(t,e),a=n.config.axis_rotated?(s,o)=>`${o},${s}`:(s,o)=>`${s},${o}`;return(s,o,l)=>{const c=r(s,o);if(!c)return;const{config:u}=n,[[f,d],[h,v],[b,x,E],[w],N,k]=c,B=(h-f)*u.boxplot_whisker_width/2,G=B>0?`M${a(b-B,E)}L${a(b+B,E)}M${a(b-B,x)}L${a(b+B,x)}`:"";l.select(`.${fn.boxplotBox}`).attr("d",`M${a(f,d)}L${a(h,d)}L${a(h,v)}L${a(f,v)}z`).style("fill",n.color(s)),l.select(`.${fn.boxplotMedian}`).attr("d",`M${a(f,w)}L${a(h,w)}`),l.select(`.${fn.boxplotWhisker}`).attr("d",`M${a(b,E)}L${a(b,v)}M${a(b,d)}L${a(b,x)}${G}`);const V=Zt(l.node()),Z=u.boxplot_outlier_r,Y=u.boxplot_mean_r;V.selectAll(`.${fn.boxplotOutlier}`).data(N).join("path").attr("class",fn.boxplotOutlier).attr("d",et=>{const[it,at]=u.axis_rotated?[et,b]:[b,et];return`M${it-Z},${at}a${Z},${Z} 0 1,0 ${2*Z},0a${Z},${Z} 0 1,0 ${-2*Z},0`}),V.selectAll(`.${fn.boxplotMean}`).data(k).join("path").attr("class",fn.boxplotMean).attr("d",et=>`M${a(b-Y,et)}L${a(b,et-Y)}L${a(b+Y,et)}L${a(b,et+Y)}z`)}},redrawBoxplot(t,e){const n=this,{$el:r,$T:a}=n,s=Vn(!0);return[r.boxplot.each(function(o,l){t(o,l,a(Zt(this),e,s))}).style("opacity",null)]}}),jM={boxplot_samples:!1,boxplot_width:void 0,boxplot_width_ratio:.6,boxplot_width_max:void 0,boxplot_whisker_width:.5,boxplot_whisker_iqr:1.5,boxplot_outlier_show:!0,boxplot_outlier_r:3,boxplot_mean_show:!1,boxplot_mean_r:4};const YM={padded:!0,domainValues:(t,e)=>Rf.getBoxplotDomainValues.call(t,e),hit:(t,e)=>`.${fn.chartBoxplot}.${Oe.target}${t.getTargetSelectorSuffix(e.id)} .${fn.boxplot}-${e.index} .${fn.boxplotBox}`,tooltipRows:(t,e,n,r)=>Rf.getBoxplotTooltipRows.call(t,e,n,r)};let Ay=()=>(Ui([VM,Ya],[jM,Sa]),xm("boxplot",YM),(Ay=()=>"boxplot")());var KM={initBubble(){const t=this,{config:e}=t;t.hasType("bubble")&&(e.point_show=!0,e.point_type="circle")},getBaseLength(){const t=this,{width:e,height:n}=t.state,r=Me.bubbleBaseLength;let a=t.cache.get(r);return a||t.cache.add(r,a=Xn("min",[e,n])),a},getBubbleR(t){const e=this;let n=e.config.bubble_maxR;M(n)?n=n.bind(e.api)(t):D(n)||(n=e.getBaseLength()/(e.getMaxDataCount()*2)+12);const r=Me.bubbleMaxValue;let a=e.cache.get(r);a===null&&e.cache.add(r,a=Xn("max",e.getMinMaxData().max.map(l=>e.isBubbleZType(l)?e.getBubbleZData(l.value,"y"):rt(l.value)?l.value.mid:l.value)));const s=n*n*Math.PI,o=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(s/a);return Math.sqrt(o/Math.PI)},getBubbleZData(t,e){return rt(t)?t[e]:t[e==="y"?0:1]}},ZM=KM,JM={bubble_maxR:35,bubble_zerobased:!1};let Ey=()=>(Ui([Ya,bl,ZM],[JM,Sa]),(Ey=()=>ne.BUBBLE)());function QM(t){return t}var wl=1,Il=2,Of=3,Hs=4,Cy=1e-6;function _M(t){return"translate("+t+",0)"}function qM(t){return"translate(0,"+t+")"}function tL(t){return e=>+t(e)}function eL(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nL(){return!this.__axis}function Rl(t,e){var n=[],r=null,a=null,s=6,o=6,l=3,c=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,u=t===wl||t===Hs?-1:1,f=t===Hs||t===Il?"x":"y",d=t===wl||t===Of?_M:qM;function h(v){var b=r==null?e.ticks?e.ticks.apply(e,n):e.domain():r,x=a==null?e.tickFormat?e.tickFormat.apply(e,n):QM:a,E=Math.max(s,0)+l,w=e.range(),N=+w[0]+c,k=+w[w.length-1]+c,B=(e.bandwidth?eL:tL)(e.copy(),c),G=v.selection?v.selection():v,V=G.selectAll(".domain").data([null]),Z=G.selectAll(".tick").data(b,e).order(),Y=Z.exit(),et=Z.enter().append("g").attr("class","tick"),it=Z.select("line"),at=Z.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Z=Z.merge(et),it=it.merge(et.append("line").attr("stroke","currentColor").attr(f+"2",u*s)),at=at.merge(et.append("text").attr("fill","currentColor").attr(f,u*E).attr("dy",t===wl?"0em":t===Of?"0.71em":"0.32em")),v!==G&&(V=V.transition(v),Z=Z.transition(v),it=it.transition(v),at=at.transition(v),Y=Y.transition(v).attr("opacity",Cy).attr("transform",function(ot){return isFinite(ot=B(ot))?d(ot+c):this.getAttribute("transform")}),et.attr("opacity",Cy).attr("transform",function(ot){var st=this.parentNode.__axis;return d((st&&isFinite(st=st(ot))?st:B(ot))+c)})),Y.remove(),V.attr("d",t===Hs||t===Il?o?"M"+u*o+","+N+"H"+c+"V"+k+"H"+u*o:"M"+c+","+N+"V"+k:o?"M"+N+","+u*o+"V"+c+"H"+k+"V"+u*o:"M"+N+","+c+"H"+k),Z.attr("opacity",1).attr("transform",function(ot){return d(B(ot)+c)}),it.attr(f+"2",u*s),at.attr(f,u*E).text(x),G.filter(nL).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Il?"start":t===Hs?"end":"middle"),G.each(function(){this.__axis=B})}return h.scale=function(v){return arguments.length?(e=v,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(v){return arguments.length?(n=v==null?[]:Array.from(v),h):n.slice()},h.tickValues=function(v){return arguments.length?(r=v==null?null:Array.from(v),h):r&&r.slice()},h.tickFormat=function(v){return arguments.length?(a=v,h):a},h.tickSize=function(v){return arguments.length?(s=o=+v,h):s},h.tickSizeInner=function(v){return arguments.length?(s=+v,h):s},h.tickSizeOuter=function(v){return arguments.length?(o=+v,h):o},h.tickPadding=function(v){return arguments.length?(l=+v,h):l},h.offset=function(v){return arguments.length?(c=+v,h):c},h}function jN(t){return Rl(wl,t)}function YN(t){return Rl(Il,t)}function rL(t){return Rl(Of,t)}function aL(t){return Rl(Hs,t)}var iL=Object.defineProperty,sL=Object.defineProperties,oL=Object.getOwnPropertyDescriptors,wy=Object.getOwnPropertySymbols,lL=Object.prototype.hasOwnProperty,cL=Object.prototype.propertyIsEnumerable,Iy=(t,e,n)=>e in t?iL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pf=(t,e)=>{for(var n in e||(e={}))lL.call(e,n)&&Iy(t,n,e[n]);if(wy)for(var n of wy(e))cL.call(e,n)&&Iy(t,n,e[n]);return t},Mf=(t,e)=>sL(t,oL(e));const Cn={bullet:"bb-bullet",chartBullet:"bb-chart-bullet",chartBullets:"bb-chart-bullets",bulletRange:"bb-bullet-range",bulletMeasure:"bb-bullet-measure",bulletTarget:"bb-bullet-target",bulletAxis:"bb-bullet-axis",bulletTitle:"bb-bullet-title"},Ry=16,Ea=t=>Number.isFinite(t),Lf=(t,e)=>t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;function uL(t){let e=0,n=0;return t.forEach(r=>{e=Math.min(e,r),n=Math.max(n,r)}),[e,n]}function fL(t,e){var n;const{config:r,api:a}=this,s=r.bullet_title_text;let o;return M(s)?o=s.call(a,t,e):rt(s)&&(o=Lf(s,t)),String((n=o!=null?o:Lf(r.data_names,t))!=null?n:t)}function dL(t){const e=this,{config:n,cache:r,state:{isCanvasMode:a},$el:s}=e;if(n.bullet_rotated)return 18;const o=t.map(u=>u.title),l=`bullet-title-${a}-${o.join("\0")}`;let c=r.get(l)||0;if(!c&&a&&e.canvasRenderer){const{ctx:u}=e.canvasRenderer;u.save(),u.font=e.canvasTheme.style.bullet.titleFont,c=o.reduce((f,d)=>Math.max(f,u.measureText(d).width),0),u.restore()}else if(!c&&!a&&s.bullet){const u=s.bullet.append("text").attr("class",Cn.bulletTitle).style("visibility","hidden");o.forEach(f=>{var d,h;c=Math.max(c,((h=(d=u.text(f).node()).getComputedTextLength)==null?void 0:h.call(d))||0)}),u.remove()}return c?r.add(l,c):c=o.reduce((u,f)=>Math.max(u,f.length),0)*6.5,Math.ceil(c)+8}function Oy(t){var e,n;const r=this,{config:a,state:{current:{width:s,height:o},isCanvasMode:l,isLegendRight:c}}=r,u=r.getCurrentPadding(),f=a.legend_show&&a.legend_position==="bottom"?(l?0:r.getLegendHeight())+10:0,d=l?r.getCanvasSurfaceHeight():o,h=a.bullet_axis_show&&!a.bullet_rotated?Ry:0,v=a.legend_show&&c?r.getLegendWidth()+(((e=a.padding)==null?void 0:e.mode)==="fit"?0:20):0,b=!a.bullet_rotated&&a.bullet_label_show&&r.hasDataLabel(),x=b||a.bullet_title_show?t!=null?t:r.getBulletData():[],E=b&&x.some(G=>G.domainMax<=0||G.value>=G.domainMax)?14:0,w=a.bullet_title_show?dL.call(r,x):0,N=a.bullet_rotated?0:w,k=a.bullet_rotated?w:0,B=u.top+(l&&((n=r.getCanvasTitleDescent)==null?void 0:n.call(r))||0);return{width:Math.max(0,s-u.left-u.right-h*2-E-N-v),height:Math.max(0,d-f-B-u.bottom-k),left:u.left+h+N,top:B}}function hL(){const{config:t}=this;return t.bullet_axis_show?t.bullet_rotated?34:20:0}function gL(t,e){const n=this.config.bullet_ranges;let r=[];return M(n)?r=n.call(this.api,t,e)||[]:q(n)?r=n:rt(n)&&q(n[t])&&(r=n[t]),r.filter(Ea).sort((a,s)=>a-s)}function vL(t,e){const n=this.config.bullet_target;let r;return M(n)?r=n.call(this.api,t,e):q(n)||Ea(n)?r=n:rt(n)&&(r=Lf(n,t)),(q(r)?r:[r]).filter(Ea)}function pL(t,e){const n=this.config.bullet_range_colors;return M(n)?n.call(this.api,t,e):q(n)&&n[t]?n[t]:null}function mL(t,e,n){const{config:r,api:a}=this,{axes:s,axisLen:o,isRotated:l}=t,c=`${e}|${n}`;let u=s.get(c);if(!u){const f=xi().domain([e,n]).range(l?[o,0]:[0,o]),{bullet_axis_tick_count:d,bullet_axis_tick_values:h,bullet_axis_tick_format:v}=r,b=Ea(d)&&d>0?Math.min(d,Math.max(2,o)):Math.max(2,Math.floor(o/(l?40:60))),[x,E]=[e,n],w=q(h)?h.filter(k=>Ea(k)&&k>=x&&k<=E):f.ticks(b),N=M(v)?k=>String(v.call(a,k)):f.tickFormat(b);u={scale:f,count:b,ticks:w,format:N,key:`${f.domain()}|${f.range()}|${w}|${w.map(N)}`},s.set(c,u)}return u}function Df(){const t=this,{config:e}=t,n=t.getBulletData(),r=Oy.call(t,n),a=e.bullet_rotated,s=hL.call(t),o=(a?r.width:r.height)/(n.length||1);return{rows:n,area:r,isRotated:a,axisSize:s,band:o,bandInner:Math.max(0,o-e.bullet_padding-s),axisLen:a?r.height:r.width,axes:new Map}}function Ff(t,e){const n=this,{config:r}=n,{area:a,isRotated:s,axisSize:o,band:l,bandInner:c,axisLen:u}=e,{height:f,left:d,top:h}=a,{domainMin:v,domainMax:b}=t,x=c*r.bullet_width_ratio,E=c*r.bullet_width_target_ratio,w=lt=>(lt-v)/(b-v)*u,N=lt=>Math.min(Math.max(w(lt),0),u),k=N(0),B=t.ranges.map((lt,nt)=>({value:lt,index:nt})).sort((lt,nt)=>nt.value-lt.value).map(({value:lt,index:nt})=>{const dt=N(lt);return Mf(Pf({},s?{x:0,y:f-dt,width:c,height:dt}:{x:0,y:0,width:dt,height:c}),{fill:pL.call(n,nt,t.ranges.length),t:nt/Math.max(t.ranges.length-1,1)})}),G=r.bullet_type==="dot",V=r.bullet_marker_size||x/2,Z=N(t.value),Y=t.value<0;let et;if(G)et={cx:s?c/2:Z,cy:s?f-Z:c/2,r:V};else{const lt=Math.abs(Z-k);et=s?{x:(c-x)/2,y:f-Math.max(k,Z),width:x,height:lt}:{x:Math.min(k,Z),y:(c-x)/2,width:lt,height:x}}const it=t.targets.filter(lt=>lt>=v&<<=b).map(lt=>{const nt=w(lt);return s?{x1:(c-E)/2,x2:(c+E)/2,y1:f-nt,y2:f-nt}:{x1:nt,x2:nt,y1:(c-E)/2,y2:(c+E)/2}}),at=G?V:0,ot=Y?k:Z,st=Mf(Pf({},s?{x:c/2,y:f-ot-at-6}:{x:ot+at+5,y:c/2}),{center:G?{x:et.cx,y:et.cy}:{x:et.x+et.width/2,y:et.y+et.height/2}}),_=r.bullet_title_show?s?{text:t.title,x:c/2,y:f+13,anchor:"middle"}:{text:t.title,x:-(o?Ry:0)-6,y:c/2,anchor:"end"}:null;return{area:{left:d,top:h},offset:s?{x:t.index*l+o,y:0}:{x:0,y:t.index*l},ranges:B,isDot:G,measure:et,color:n.color(t),targets:it,title:_,axis:o?Mf(Pf({},mL.call(n,e,v,b)),{rotated:s,x:0,y:s?0:c}):null,label:st}}const yL={ownLegendLayout:!0,themeTextColor:!0,textAnchor(t){return t.config.bullet_rotated||t.config.data_labels.centered?"middle":"start"},labelData(t,e){const n=e.values[e.values.length-1];return t.config.bullet_label_show&&n&&(D(n.value)||n.value)?[n]:[]},labelFormat(t){const e=t.config.bullet_label_format;return M(e)?(n,r)=>e.call(t.api,n,r):void 0},tooltipTarget(t,e){var n;const r=t.getBulletData().filter(s=>t.isTargetToShow(s.id)),a=(n=e.data)!=null&&n.id?r.filter(s=>s.id===e.data.id):[r[e.index]].filter(Boolean);return{data:a,point:a[0]&&t.getBulletMeasureCenter(a[0])}},textX(t,e,n,r){return e?e[t.config.data_labels.centered?1:0][0]+Fi.call(t,n,"x"):Os(r,"x")},textY(t,e,n,r,a){if(!e)return Os(r,"y");const s=t.config.data_labels.centered,o=e[s?1:0][1];return(s||!t.config.bullet_rotated?o+a.height/2-3:o)+Fi.call(t,n,"y")}};var xL={isBulletType(t){return this.isTypeOf(t,"bullet")},getBulletSize(){return Oy.call(this)},getCanvasTitleDescent(){const{config:t,canvasRenderer:e,canvasTheme:n}=this;if(!t.title_text||!e)return 0;const{ctx:r}=e;r.save(),r.font=n.style.title.font;const a=r.measureText(String(t.title_text)).fontBoundingBoxDescent||0;return r.restore(),a},getBulletData(){const t=this;return t.data.targets.filter(t.isBulletType.bind(t)).map((n,r)=>{var a;const s=Number((a=n.values[n.values.length-1])==null?void 0:a.value),o=Ea(s)?s:0,l=gL.call(t,n.id,o),c=vL.call(t,n.id,o),[u,f]=uL([o].concat(c,l)),{bullet_axis_min:d,bullet_axis_max:h}=t.config;let v=Ea(d)?d:u,b=Ea(h)?h:f;v>=b&&(v=u,b=f),b===v&&(b=v+1);const x=b-v,E=l.length?l:[.5,.75,1].map(w=>v+x*w);return{id:n.id,index:r,x:r,name:n.id,value:o,title:t.config.bullet_title_show?fL.call(t,n.id,o):"",ranges:E,targets:c,domainMin:v,domainMax:b}})},getBulletLayout(){return Df.call(this)},getBulletMeasureCenter(t){const{area:e,offset:n,measure:r}=Ff.call(this,t,Df.call(this)),[a,s]="cx"in r?[r.cx,r.cy]:[r.x+r.width/2,r.y+r.height/2];return[e.left+n.x+a,e.top+n.y+s]},generateGetBulletPoints(){const t=this;let e;return n=>{if(!e){const r=Df.call(t);e={},r.rows.forEach(a=>{const{area:s,offset:o,label:l}=Ff.call(t,a,r),c=s.left+o.x,u=s.top+o.y;e[a.id]=[[c+l.x,u+l.y],[c+l.center.x,u+l.center.y]]})}return e[n.id]}},getBulletRowGeometry(t,e){return Ff.call(this,t,e)}},bL=Object.defineProperty,TL=Object.defineProperties,SL=Object.getOwnPropertyDescriptors,Py=Object.getOwnPropertySymbols,AL=Object.prototype.hasOwnProperty,EL=Object.prototype.propertyIsEnumerable,My=(t,e,n)=>e in t?bL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CL=(t,e)=>{for(var n in e||(e={}))AL.call(e,n)&&My(t,n,e[n]);if(Py)for(var n of Py(e))EL.call(e,n)&&My(t,n,e[n]);return t},wL=(t,e)=>TL(t,SL(e));const Nf=Sv();function Ly(t,e,n,r){const a=t.select(`${e}.${n}`),s=a.empty();return[s?t.insert(e,r).classed(n,!0):a,s]}function Ka(t,e,n,r,a,s){const o=n?e:t.$T(e,r);Object.keys(a).forEach(l=>o.attr(l,a[l])),s!==void 0&&o.style("fill",s)}function IL(t,e,n,r){var a,s;const o=this,{offset:l,ranges:c,isDot:u,measure:f,color:d,targets:h,axis:v,title:b}=o.getBulletRowGeometry(e,n),x={target:`.${Cn.bulletTarget}`,axis:`.${Cn.bulletAxis}`};Ka(o,t,t.attr("transform")===null,r,{transform:`translate(${l.x}, ${l.y})`});const E=t.selectAll(`.${Cn.bulletRange}`).data(c),w=({x:Y,y:et,width:it,height:at})=>({x:Y,y:et,width:it,height:at}),N=(Y,{fill:et,t:it})=>Y.style("--bb-t",et?null:it);E.exit().remove(),E.each(function(Y){const et=Zt(this);Ka(o,et,!1,r,w(Y),Y.fill),N(et,Y)}),E.enter().insert("rect",`.${Cn.bulletMeasure}`).attr("class",Cn.bulletRange).each(function(Y){const et=Zt(this);Ka(o,et,!0,r,w(Y),Y.fill),N(et,Y)});const k=u?"circle":"rect";t.selectAll(`.${Cn.bulletMeasure}`).filter(function(){return this.tagName.toLowerCase()!==k}).remove();const[B,G]=Ly(t,k,Cn.bulletMeasure,`${x.target}, ${x.axis}`);B.attr("class",[Cn.bulletMeasure,o.generateClass(nn.shape,e.index),o.generateClass(Cn.bullet,e.id)].join("").replace(/\s+/g," ").trim()).datum(e),Ka(o,B,G,r,f,d);const V=t.selectAll(`line${x.target}`).nodes();V.slice(h.length).forEach(Y=>Y.remove()),h.forEach((Y,et)=>{const it=!V[et],at=it?t.insert("line",x.axis).classed(Cn.bulletTarget,!0):Zt(V[et]);at.datum(e),Ka(o,at,it,r,Y)});let Z=t.select(x.axis);if(v&&!Z.empty()&&((a=Nf.get(Z.node()))==null?void 0:a.rotated)!==v.rotated&&(Z.remove(),Z=t.select(x.axis)),v){const Y=Z.empty();Y&&(Z=t.append("g").attr("class",Cn.bulletAxis)),v.rotated?Z.attr("transform",null):Ka(o,Z,Y,r,{transform:`translate(${v.x}, ${v.y})`});const{key:et}=v;((s=Nf.get(Z.node()))==null?void 0:s.key)!==et&&((Y?Z:o.$T(Z,r)).call((v.rotated?aL:rL)(v.scale).tickValues(v.ticks).tickFormat(v.format).tickSizeOuter(0)),Z.attr("font-family",null).attr("font-size",null),Nf.set(Z.node(),{rotated:v.rotated,key:et}))}else Z.remove();if(b){const[Y,et]=Ly(t,"text",Cn.bulletTitle,null);Y.text(b.text).style("text-anchor",b.anchor).attr("dy",b.anchor==="end"?".35em":null),Ka(o,Y,et,r,{x:b.x,y:b.y})}else t.select(`.${Cn.bulletTitle}`).remove()}var RL=wL(CL({},xL),{initBullet(){const t=this,{$el:e}=t;e.bullet=e.main.select(`.${Oe.chart}`).append("g").classed(Cn.chartBullets,!0),t.bindBulletEvent()},bindBulletEvent(){const t=this,{$el:{bullet:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const a=o=>{var l,c;const u=o.target===e.node()?(c=(l=r.eventReceiver.rect)==null?void 0:l.node)==null?void 0:c.call(l):o.target;if(u&&/^(rect|circle|line)$/i.test(u.tagName)){const f=Zt(u).datum();if(f&&rt(f)&&"id"in f)return r.event=o,f}},s=r.inputType==="touch";e.on(s?"touchstart":"mouseover mousemove",o=>{const l=a(o);l&&(t.showTooltip([t.addName(l)],t.$el.svg.node()),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=a(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))}).on("click",o=>{const l=a(o);l&&n.data_onclick.bind(t.api)(l,o.target)})},updateTargetsForBullet(){const t=this,{$el:e}=t;e.bullet||t.initBullet();const n=t.getBulletData(),r=s=>Cn.chartBullet+t.classTarget(s.id),a=e.bullet.selectAll(`.${Cn.chartBullet}`).data(n,s=>s.id);a.exit().remove(),a.enter().append("g").merge(a).attr("class",r)},redrawBullet(t){const e=this,{$el:{bullet:n}}=e,r=e.getBulletLayout(),{left:a,top:s}=r.area;n.attr("transform",`translate(${a}, ${s})`),n.selectAll(`.${Cn.chartBullet}`).data(r.rows,o=>o.id).each(function(o){IL.call(e,Zt(this),o,r,t)})}}),OL={bullet_rotated:!1,bullet_type:"bar",bullet_marker_size:0,bullet_ranges:null,bullet_target:null,bullet_width_ratio:.35,bullet_width_target_ratio:.6,bullet_range_colors:null,bullet_padding:4,bullet_axis_show:!0,bullet_axis_min:void 0,bullet_axis_max:void 0,bullet_axis_tick_count:void 0,bullet_axis_tick_values:void 0,bullet_axis_tick_format:void 0,bullet_title_show:!1,bullet_title_text:void 0,bullet_label_show:!0,bullet_label_format:void 0};let Dy=()=>(Ve(dn.prototype,[RL]),Br.setOptions([OL]),ja("bullet",{hooks:yL}),(Dy=()=>"bullet")());var PL=Object.defineProperty,Fy=Object.getOwnPropertySymbols,ML=Object.prototype.hasOwnProperty,LL=Object.prototype.propertyIsEnumerable,Ny=(t,e,n)=>e in t?PL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DL=(t,e)=>{for(var n in e||(e={}))ML.call(e,n)&&Ny(t,n,e[n]);if(Fy)for(var n of Fy(e))LL.call(e,n)&&Ny(t,n,e[n]);return t},FL={generateGetCandlestickPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,a=n.getIndicesMax(t)+1,s=n.getBarW("candlestick",r,a),o=n.getShapeX(s,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isCandlestickType,t,!!e),u=n.getYScaleById.bind(n);return(f,d)=>{const h=u.call(n,f.id,e)(n.getShapeYMin(f.id,e)),v=c(f,d)||h,b=D(s)?s:s[f.id]||s._$width,x=n.getCandlestickData(f);let E;if(x&&D(x.open)&&D(x.close)){const w={start:o(f),end:0};w.end=w.start+b;const N={start:l(x.open),end:l(x.close)},k={x:w.start+b/2,high:l(x.high),low:l(x.low)},B=h-v;N.start-=B,N.end-=B,k.high-=B,k.low-=B,E=[[w.start,N.start],[w.end,N.end],[k.x,k.low,k.high]]}else E=[[0,0],[0,0],[0,0,0]];return E}},getCandlestickData({value:t}){let e;if(q(t)){const[n,r,a,s,o=!1]=t;e={open:n,high:r,low:a,close:s},o!==!1&&(e.volume=o)}else rt(t)&&(e=DL({},t));return e&&(e._isUp=e.close>=e.open),e||null}},NL=Object.defineProperty,$L=Object.defineProperties,BL=Object.getOwnPropertyDescriptors,$y=Object.getOwnPropertySymbols,kL=Object.prototype.hasOwnProperty,zL=Object.prototype.propertyIsEnumerable,By=(t,e,n)=>e in t?NL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UL=(t,e)=>{for(var n in e||(e={}))kL.call(e,n)&&By(t,n,e[n]);if($y)for(var n of $y(e))zL.call(e,n)&&By(t,n,e[n]);return t},WL=(t,e)=>$L(t,BL(e)),GL=WL(UL({},FL),{initCandlestick(){Wp.call(this,{elKey:"candlestick",className:Qr.chartCandlesticks})},updateTargetsForCandlestick(t){ef.call(this,t,{type:"Candlestick",elKey:"candlestick",containerClass:Qr.chartCandlesticks,itemClass:Qr.chartCandlestick,initFn:this.initCandlestick,withFocus:!1,withStyles:!1}).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:r,$T:a}=n,s=e?r.subchart:r,o=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=s.main.selectAll(`.${Qr.chartCandlestick}`).selectAll(`.${Qr.candlestick}`).data(n.labelishData.bind(n));a(c.exit(),t).style("opacity","0").remove();const u=c.enter().filter(f=>f.value).append("g").attr("class",o);u.append("line"),u.append("path"),s.candlestick=c.merge(u).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:r}=n,a=n.generateGetCandlestickPoints(t,e),s=r.axis_rotated,o=r.candlestick_color_down;return(l,c,u)=>{const f=a(l,c),d=n.getCandlestickData(l),h=d==null?void 0:d._isUp,v=+s,b=+!v;u.classed&&u.classed(Qr[h?"valueUp":"valueDown"],!0);const x=s?`H${f[1][1]} V${f[1][0]} H${f[0][1]}`:`V${f[1][1]} H${f[1][0]} V${f[0][1]}`;u.select("path").attr("d",`M${f[0][v]},${f[0][b]}${x}z`).style("fill",N=>(h?n.color(N):rt(o)?o[N.id]:o)||n.color(N));const E=u.select("line"),w=s?{x1:f[2][1],x2:f[2][2],y1:f[2][0],y2:f[2][0]}:{x1:f[2][0],x2:f[2][0],y1:f[2][1],y2:f[2][2]};for(const N in w)E.attr(N,w[N])}},redrawCandlestick(t,e,n=!1){const r=this,{$el:a,$T:s}=r,{candlestick:o}=n?a.subchart:a,l=Vn(!0);return[o.each(function(c,u){const f=s(Zt(this),e,l);t(c,u,f)}).style("opacity",null)]}}),HL={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let ky=()=>(Ui([GL,Ya],[HL,Sa]),(ky=()=>ne.CANDLESTICK)());var Ol={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},XL={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0};const VL=15,zy=20,Uy=.35;function jL(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function Wy(){const t=this,{config:e}=t,n=jL.call(t,!0),r=n&&e[`${n}_label_line`],a=K(r),s=(c,u,f)=>f,o={show:r===!0||a&&(r==null?void 0:r.show)!==!1,distance:a&&(r==null?void 0:r.distance)||zy};if(r===!0)return{chartType:n,line:o,text:{formatter:s}};if(!a)return{chartType:n,line:{show:!1,distance:zy},text:{formatter:null}};let l=s;return M(r.text)?l=r.text:r.text===!1&&(l=null),{chartType:n,line:o,text:{formatter:l}}}function YL(t,e){const n=this,{state:r}=n,a=n.updateAngle(t);if(!a)return null;let{outerRadius:s}=n.getRadius(t),o=s;n.hasType("polar")&&(o=n.getPolarOuterRadius(t,s),s=r.radius);let l=(a.startAngle+a.endAngle)/2;Math.abs(a.endAngle-a.startAngle-2*Math.PI)<.01&&(l=Math.PI/2);const u=Math.sin(l),f=-Math.cos(l),d={x:u*o,y:f*o},h=s+VL,v={x:u*h,y:f*h},b=u>=0,x={x:v.x+e*(b?1:-1),y:v.y};return{startPoint:d,breakPoint:v,endPoint:x,isRight:b,midAngle:l}}function Gy(){return Wy.call(this).line.show}function KL(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:a,text:s}=Wy.call(e),o=a.distance;let l=null;n.selectAll(`.${Ye.chartArc}`).each(function(c){var u,f,d;const h=Zt(this),v=YL.call(e,c,o),{ratio:b,meetsThreshold:x,updated:E}=(u=c._cache)!=null?u:{};if(!E||!v)return;const w=e.isTargetToShow(c.data.id)&&x,{startPoint:N,breakPoint:k,endPoint:B,isRight:G}=v,V=`${N.x},${N.y} ${k.x},${k.y} ${B.x},${B.y}`;if(a.show){let Y=h.select(`.${Ye.arcLabelLine}`);Y.empty()&&(Y=h.append("polyline").attr("class",Ye.arcLabelLine)),r(Y,t).attr("points",V).style("stroke",e.color(c.data)).style("opacity",w?null:"0")}let Z=h.select(`.${Ye.arcLabelLineText}`);if(Z.empty()&&(Z=h.append("text").attr("class",Ye.arcLabelLineText).style("pointer-events","none")),w){const{value:Y}=E,{id:et}=c.data,it=((d=(f=s.formatter)!=null?f:e.getArcLabelConfig("format"))!=null?d:e.defaultArcValueFormat)(Y,b,et).toString();Ri(Z,it,[-1,1],!1);const at={x:B.x+5*(G?1:-1),y:B.y};Z.style("text-anchor",G?"start":"end");const ot=Z.node(),st=ot==null?void 0:ot.querySelectorAll("tspan");if(l===null&&(l=parseFloat(yt.getComputedStyle(ot).fontSize)||12),st&&st.length>1){const lt=(st.length-3)/2;at.y+=(-lt+Uy)*l}else at.y+=Uy*l;r(Z,t).attr("transform",`translate(${at.x},${at.y})`).style("opacity",null).style("fill",e.updateTextColor.bind(e)(c))}else r(Z,t).style("opacity","0")})}var ZL=Object.defineProperty,JL=Object.defineProperties,QL=Object.getOwnPropertyDescriptors,Hy=Object.getOwnPropertySymbols,_L=Object.prototype.hasOwnProperty,qL=Object.prototype.propertyIsEnumerable,Xy=(t,e,n)=>e in t?ZL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tD=(t,e)=>{for(var n in e||(e={}))_L.call(e,n)&&Xy(t,n,e[n]);if(Hy)for(var n of Hy(e))qL.call(e,n)&&Xy(t,n,e[n]);return t},eD=(t,e)=>JL(t,QL(e));const $f=["donut","gauge","pie","polar"];function nD(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function rD(t,e,n,r){var a,s;const{config:o,state:{radiusExpanded:l}}=t,c=n.endAngle-Math.PI/2,u=Math.sin(c),f={x:Math.cos(c)*(l+(r?5:25)),y:u*(l+15-Math.abs(u*10))+3};if(r){const d=o.arc_rangeText_position;if(d){const h=o.arc_rangeText_values,v=M(d)?d(h[e.index]):d;f.x+=(a=v==null?void 0:v.x)!=null?a:0,f.y+=(s=v==null?void 0:v.y)!=null?s:0}}return f}function aD(t,e,n,r){const{config:a}=t,s=nD(t);let o=s?a[`${s}_label_ratio`]:void 0;if(o)o=M(o)?o.bind(t.api)(e,n,r):o;else{const d=36/n,h=d>.375;o=n&&r?(h?1.175-d:.8)*n/r:0}return o}function iD(t,e,n){let{outerRadius:r}=t.getRadius(e);t.hasType("polar")&&(r=t.getPolarOuterRadius(e,r));const[a,s]=t.svgArc.centroid(n).map(c=>isNaN(c)?0:c),o=Math.sqrt(a*a+s*s),l=aD(t,e,r,o);return{pos:{x:a,y:s},ratio:l}}function Vy(t=0){const e=this,{config:n,state:r}=e,a=e.hasMultiArcGauge(),s=r.gaugeArcWidth/e.getTargetsToShow().length,o=t?Math.min(r.radiusExpanded*t-r.radius,s*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return a?r.radius-s*(l.index+1):D(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let u;if(a)u=r.radius-s*l.index+o;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(l,c);else if(u=c,t){let{radiusExpanded:f}=r;r.radius!==c&&(f-=Math.abs(r.radius-c)),u=f*t}return u},corner(l,c){const{arc_cornerRadius_ratio:u=0,arc_cornerRadius:f=0}=n,{data:{id:d},value:h}=l;let v;return u?v=u*c:v=D(f)?f:f.call(e.api,d,h,c),v}}}function Bf(t){return function(e){const n=({startAngle:a=0,endAngle:s=0,padAngle:o=0})=>({startAngle:a,endAngle:s,padAngle:o}),r=Hr(n(this._current),n(e));return this._current=e,function(a){const s=r(a),{data:o,index:l,value:c}=e;return t(eD(tD({},s),{data:o,index:l,value:c}))}}}var sD={initPie(){const t=this,{config:e}=t,n=e.data_type,r=e[`${n}_padding`],a=e[`${n}_startingAngle`]||0,s=(r?r*.01:e[`${n}_padAngle`])||0;t.pie=a0().startAngle(a).endAngle(a+2*Math.PI).padAngle(s).value(o=>{var l,c;return(c=(l=o.values)==null?void 0:l.reduce((u,f)=>u+f.value,0))!=null?c:o}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,r=e.data_type,a=e[`${r}_padding`],s=e.gauge_width||e.donut_width,o=t.getTargetsToShow().length*e.gauge_arcs_minWidth,l=.85,c=Gy.call(t)?l:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?l:c),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=s?(n.radius-s)/n.radius:.6,n.gaugeArcWidth=s||(o<=n.radius-n.innerRadius?n.radius-n.innerRadius:o<=n.radius?o:n.radius);const u=e.pie_innerRadius||(a?a*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:u},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:r,outerRadius:a}=e.state;return!D(r)&&n&&(r=r[n.id]||0),rt(a)&&n&&n.id in a?a=a[n.id]:D(a)||(a=e.state.radius),{innerRadius:r,outerRadius:a}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let r=2*(n/360);return n<-360?r=-2:n>360&&(r=2),r*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,r=t.hasType("gauge")?e.gauge_fullCircle:!1,a=-1*Math.PI/2,s=Math.PI/2;let o=e[`${n}_startingAngle`]||0;return!r&&o<=a?o=a:!r&&o>=s?o=s:(o>Math.PI||o<-1*Math.PI)&&(o=Math.PI),o},updateAngle(t,e=!1){var n;const r=this,{config:a,state:s}=r,o=e&&r.hasType("gauge");let{pie:l}=r,c=t,u=!1;if(!a)return null;const f=r.getStartingAngle(),d=a.gauge_fullCircle||e&&!o?r.getArcLength():f*-2,h=c.data&&r.isGaugeType(c.data)&&!r.hasMultiArcGauge();if(h){const{gauge_min:v,gauge_max:b}=a,x=r.getTotalDataSum(s.rendered),E=d*((x-v)/(b-v));l=l.startAngle(f).endAngle(E+f)}if(e===!1){let v;if(h)v=l(r.filterTargetsToShow());else{const b="$arcPieLayout";let x=r.cache.get(b);(!x||x.generation!==s.redrawGeneration)&&(x={generation:s.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(b,x)),v=x.layout}v.forEach((b,x)=>{var E;!u&&b.data.id===((E=c.data)==null?void 0:E.id)&&(u=!0,c=b,c.index=x)})}if(isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(a.gauge_enforceMinMax||r.hasMultiArcGauge())){const{gauge_min:v,gauge_max:b}=a,x=e&&!o?r.getTotalDataSum(s.rendered):b,E=d/(x-v),w=(n=c.value)!=null?n:0,N=w<v?0:w<x?w-v:x-v;c.startAngle=f,c.endAngle=f+E*N}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Vy.call(t),a=_f().innerRadius(e).outerRadius(n),s=function(o,l){var c;let u="M 0 0";if(o.value||o.data){const f=l?o:(c=t.updateAngle(o))!=null?c:null;f&&(u=a.cornerRadius(r(f,n(f)))(f))}return u};return s.centroid=a.centroid,s},getSvgArcExpanded(t=1){const e=this,{inner:n,outer:r,corner:a}=Vy.call(e,t),s=_f().innerRadius(n).outerRadius(r);return o=>{const l=e.updateAngle(o),c=r(l);let u=0;return l&&(u=a(l,c)),l&&s.cornerRadius(u)(l)||"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:r,$T:a}=t,s=e.arc_rangeText_format,o=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",u=t.getTotalDataSum(r.rendered);c&&(l=l.map(h=>u/100*h));const f=t.pie(l).map((h,v)=>(h.index=v,h));let d=n.selectAll(`.${Ye.arcRange}`).data(l);d.exit().remove(),d=a(d.enter().append("text").attr("class",Ye.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(h=>{const v=c?h/u*100:h;return M(s)?s(v):`${v}${c?"%":""}`}).merge(d)),(!r.rendered||r.rendered&&!o)&&u>0&&d.attr("transform",function(h,v){return t.transformForArcLabel(this,f[v],!0)}),d.style("opacity",h=>!o&&(h>u||u===0)?"0":null)}},transformForArcLabel(t,e,n=!1){const r=this,a=r.updateAngle(e,n);if(!a)return"";let s,o=1;if(n||r.hasMultiArcGauge())s=rD(r,e,a,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=iD(r,e,a);s=l.pos,o=l.ratio}else return"";return $p.call(r,t,s),`translate(${s.x*o},${s.y*o})`},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){var e;const n=this,r=n.hasType("gauge"),a=(e=$f.filter(n.hasType.bind(n)))==null?void 0:e[0];n.shouldShowArcLabel()&&t.style("fill",n.updateTextColor.bind(n)).attr("filter",s=>n.updateTextBGColor.bind(n)(s,n.config.data_labels_backgroundColors)).each(function(s){const o=Zt(this),l=n.updateAngle(s),c=n.getRatio("arc",l),u=Qu.call(n,c,a);if(s._cache={updated:l,ratio:c,meetsThreshold:u},u){const{value:f}=l||s,d=(n.getArcLabelConfig("format")||n.defaultArcValueFormat)(f,c,s.data.id).toString();Ri(o,d,[-1,1],r)}else o.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:r}=e;if(n){const s=setInterval(()=>{e.state.transiting||(clearInterval(s),r.legend.selectAll(`.${Ke.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const a=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(a,`.${Ye.chartArc}`)).each(function(s){if(!e.shouldExpand(s.data.id))return;const o=e.getExpandConfig(s.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(s.data.id,"rate"));Zt(this).selectAll("path").transition().duration(o).attrTween("d",Bf(e.svgArcExpanded.bind(e))).transition().duration(o*2).attrTween("d",Bf(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:r}}=e;if(n)return;const a=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(a,`.${Ye.chartArc}`)).selectAll("path").transition().duration(s=>e.getExpandConfig(s.data.id,"duration")).attrTween("d",Bf(e.svgArc.bind(e))),r.selectAll(`${Ye.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:r}=n,a={duration:50,rate:.98};let s;return n.isDonutType(t)?s="donut":n.isGaugeType(t)?s="gauge":n.isPieType(t)&&(s="pie"),s?r[`${s}_expand_${e}`]:a[e]},shouldExpand(t){const e=this,{config:n}=e,r=e.isDonutType(t)?"donut":e.isGaugeType(t)?"gauge":e.isPieType(t)?"pie":null;return r?!!n[`${r}_expand`]:!1},shouldShowArcLabel(){const t=this,{config:e}=t;return $f.some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelConfig(t="format"){const e=this,{config:n}=e;let r=a=>a;return $f.filter(e.hasType.bind(e)).forEach(a=>{r=n[`${a}_label_${t}`]}),t==="format"&&M(r)?r.bind(e.api):r},updateTargetsForArc(t){const e=this,{$el:n}=e,r=e.hasType("gauge"),a=e.getChartClass("Arc"),s=e.getClass("arcs",!0),o=e.classFocus.bind(e),l=n.main.select(`.${Ye.chartArcs}`),c=l.selectAll(`.${Ye.chartArc}`).data(e.pie(t)).attr("class",f=>a(f)+o(f.data)),u=c.enter().append("g").attr("class",a).call(this.setCssRule(!1,`.${Ye.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",s).merge(c),u.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${Oe.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${Oe.chart}`).append("g").attr("class",Ye.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),r=e.hasType("gauge");if(n){const a=r?er.chartArcsGaugeTitle:Ye.chartArcsTitle;let s=e.$el.arcs.select(`.${a}`);s.empty()&&(s=e.$el.arcs.append("text").attr("class",a).style("text-anchor","middle")),r&&s.attr("dy","-0.3em"),Ri(s,n,r?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,r=t.getArcTitle();if(r&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){let a=n.current.needle;return D(a)||(a=e.arc_needle_value),Ir(r,{NEEDLE_VALUE:~~a})}return!1},redrawArc(t,e,n){const r=this,{config:a,state:s,$el:{main:o}}=r,l=a.interaction_enabled,c=l&&a.data_selection_isselectable;let u=o.selectAll(`.${Ye.arcs}`).selectAll(`.${Ye.arc}`).data(r.arcData.bind(r));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",f=>r.color(f.data)).style("cursor",f=>{var d;return(d=c==null?void 0:c.bind)!=null&&d.call(c,r.api)(f)?"pointer":null}).style("opacity","0").each(function(f){r.isGaugeType(f.data)&&(f.startAngle=a.gauge_startingAngle,f.endAngle=a.gauge_startingAngle),this._current=f}).merge(u),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),u.attr("transform",f=>!r.isGaugeType(f.data)&&n?"scale(0)":"").style("opacity",function(f){return f===this._current?"0":null}).each(()=>{s.transiting=!0}).transition().duration(t).attrTween("d",function(f){const d=r.updateAngle(f);if(!d)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const h=Hr(this._current,d);return this._current=h(0),function(v){const b=h(v);return b.data=f.data,r.getArc(b,!0)}}).attr("transform",n?"scale(1)":"").style("fill",f=>{let d;return r.levelColor?(d=r.levelColor(f.data.values[0].value),a.data_colors[f.data.id]=d):d=r.color(f.data),d}).style("opacity",null).call(Ue,function(){if(r.levelColor){const f=Zt(this),d=f.datum(this._current);r.updateLegendItemColor(d.data.id,f.style("fill"))}s.transiting=!1,s.redrawing&&(s.redrawing=!1,s._targetsToShow=null,s._cachedDrawShape=null),se(a.onrendered,r.api)}),l&&r.bindArcEvent(u),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),a.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t),r.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:r,radius:a}}=t,s=(a-1)/100*n.arc_needle_length,o=r.size!==t.data.targets.length;let l=t.$el.arcs.select(`.${Ye.needle}`);const c=n.arc_needle_path,u=n.arc_needle_bottom_width/2,f=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,h=n.arc_needle_top_ry,v=n.arc_needle_bottom_len,b=n.arc_needle_bottom_rx,x=n.arc_needle_bottom_ry,E=t.getNeedleAngle(),w=()=>{const N=t.getArcTitleWithNeedleValue();N&&t.setArcTitle(N)};if(w(),l.empty()&&(l=e.arcs.append("path").classed(Ye.needle,!0),e.needle=l,e.needle.updateHelper=(N,k=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle(N)}deg)`).call(Ue,()=>{k&&(n.arc_needle_value=N),w()})}),o){const N=M(c)?c.call(t,s):`M-${u} ${v} A${b} ${x} 0 0 0 ${u} ${v} L${f} -${s} A${d} ${h} 0 0 0 -${f} -${s} L-${u} ${v} Z`;t.$T(l).attr("d",N).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${E}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:r}=e,a=e.getArcLength(),s=e.hasType("gauge"),o=e.getTotalDataSum(!0);let l=H(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,u;if(D(l)||(l=s&&e.data.targets.length===1?o:0),r.current.needle=l,s){c=e.getStartingAngle();const f=n.gauge_fullCircle?a:c*-2,{gauge_min:d,gauge_max:h}=n;u=f*((l-d)/(h-d))}else u=o?a*(l/o):0;return(c+u)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,r=t.hasMultiArcGauge(),a=e.gauge_fullCircle,s=t.getTargetsToShow().length===0&&!!e.data_empty_label_text,o=t.getStartingAngle(),l=a?o+t.getArcLength():o*-1;let c=t.$el.arcs.select(`${r?"g":""}.${Ye.chartArcsBackground}`);if(r){let u=0;c=c.selectAll(`path.${Ye.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(f,d)=>`${Ye.chartArcsBackground} ${Ye.chartArcsBackground}-${d}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:f})=>{if(s||n.hiddenTargetIds.has(f))return"M 0 0";const d={data:[{value:e.gauge_max}],startAngle:o,endAngle:l,index:u++};return t.getArc(d,!0,!0)}),c.exit().remove()}else c.attr("d",s?"M 0 0":()=>{const u={data:[{value:e.gauge_max}],startAngle:o,endAngle:l};return t.getArc(u,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:r}=e,a=r.inputType==="touch",s=r.inputType==="mouse",o=u=>{const f=e.updateAngle(u);return f?e.convertToArcData(f):null};function l(u,f,d){e.expandArc(d),e.api.focus(d),e.toggleFocusLegend(d,!0),e.showTooltip([f],u)}function c(u){const f=(u==null?void 0:u.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,f,d){var h;const v=o(f);v&&((h=e.toggleShape)==null||h.call(e,this,v,d),n.data_onclick.bind(e.api)(v,this))}),s&&t.on("mouseover",function(u,f){if(r.transiting)return;r.event=u;const d=o(f),h=(d==null?void 0:d.id)||void 0;l(this,d,h),e.setOverOut(!0,d)}).on("mouseout",(u,f)=>{if(r.transiting||!n.interaction_onout)return;r.event=u;const d=o(f);c(),e.setOverOut(!1,d)}).on("mousemove",function(u,f){const d=o(f);r.event=u,e.showTooltip([d],this)}),a&&e.hasArcType()&&!e.radars){const u=f=>{var d,h;const{clientX:v,clientY:b}=(h=(d=f.changedTouches)==null?void 0:d[0])!=null?h:{clientX:0,clientY:0};return Zt(Tt.elementFromPoint(v,b))};e.$el.svg.on("touchstart touchmove",function(f){if(r.transiting)return;r.event=f;const h=u(f).datum(),v=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,b=v?e.convertToArcData(v):null,x=(b==null?void 0:b.id)||void 0;e.callOverOutForTouch(b),z(x)?c():l(this,b,x)},{passive:!0})}},redrawArcText(t){const e=this,{config:n,state:r,$el:{main:a,arcs:s}}=e,o=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(o&&e.data.targets.length===1&&n.gauge_title||(c=a.selectAll(`.${Ye.chartArc}`).select("text").style("opacity","0").attr("class",u=>e.isGaugeType(u.data)?er.gaugeValue:null).call(e.textForArcLabel.bind(e)).style("font-size",u=>e.isGaugeType(u.data)&&e.data.targets.length===1&&!l?`${Math.round(r.radius/5)}px`:null),Np.call(e),c.attr("transform",function(u){return e.transformForArcLabel.bind(e)(this,u)}).transition().duration(t).style("opacity",u=>e.isTargetToShow(u.data.id)&&e.isArcType(u.data)?null:"0"),l&&c.attr("dy","-.1em")),a.select(`.${Ye.chartArcsTitle}`).style("opacity",e.hasType("donut")||o?null:"0"),o){const u=n.gauge_fullCircle;u&&(c==null||c.attr("dy",`${l?0:Math.round(r.radius/14)}`)),n.gauge_label_show&&(s.select(`.${er.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),s.select(`.${er.chartArcsGaugeMin}`).attr("dx",`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!u&&s.select(`.${er.chartArcsGaugeMax}`).attr("dx",`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}Gy.call(e)&&KL.call(e,t)},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,r=D(t)?a=>a.index===t:a=>a.data.id===t;return n==null?void 0:n.selectAll(`.${Oe.target} path`).filter(r)}};function Wi(t,e){Ve(dn.prototype,[sD,Ya].concat(t||[])),Br.setOptions([Sa].concat(e||[]))}let jy=()=>(Wi(void 0,[Ol,XL]),(jy=()=>ne.DONUT)());var oD=Object.defineProperty,Yy=Object.getOwnPropertySymbols,lD=Object.prototype.hasOwnProperty,cD=Object.prototype.propertyIsEnumerable,Ky=(t,e,n)=>e in t?oD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uD=(t,e)=>{for(var n in e||(e={}))lD.call(e,n)&&Ky(t,n,e[n]);if(Yy)for(var n of Yy(e))cD.call(e,n)&&Ky(t,n,e[n]);return t};function Gi(t=!1){const e=this,{config:n,state:{current:{width:r,height:a}}}=e,s=e.getCurrentPadding(),o=uD({width:r-s.left-s.right,height:a-(n.legend_show?e.getLegendHeight()+10:0)-s.top-s.bottom},s);if(t){const l=kf.call(e,o),c=n.funnel_rotated;o.width=Math.max(o.width,c?l.height:l.width),o.height=Math.max(o.height,c?l.width:l.height)}return o}function kf(t){const e=this,{config:n}=e,r=n.funnel_rotated,[a,s]=[n.funnel_neck_width,n.funnel_neck_height].map((o,l)=>rt(o)?t[r!==!l?"width":"height"]*o.ratio:o);return{width:a,height:s}}function fD(t){const e=this,n=e.config.funnel_rotated,{width:r,height:a}=Gi.call(e,!0),s=[];return t.forEach((o,l)=>{const{ratio:c=0}=o,u=l>0?s[l-1][2][n?0:1]:0,f=c+u;s.push(o.coords=n?[[u,0],[f,0],[f,a],[u,a],[u,0]]:[[0,u],[r,u],[r,f],[0,f],[0,u]])}),s}function dD(){const t=this,e=t.config.funnel_rotated,{width:n,height:r}=Gi.call(t,!0),a=kf.call(t,{width:n,height:r});let s;if(e){const o=(r-a.width)/2,l=n-a.height;s=[[l,o],[n,o],[n,r-o],[l,r-o],[0,r]]}else{const o=(n-a.width)/2,l=r-a.height;s=[[n,0],[n-o,l],[n-o,r],[o,r],[o,l]]}return`M${[[0,0],...s,[0,0]].join("L")}z`}function hD(t){const e=this,{config:n}=e,r=t.map(a=>({id:a.id,value:a.values.reduce((s,o)=>s+o.value,0)}));return n.data_order&&r.sort(e.getSortCompareFn.bind(e)(!0)),Zy.call(e,r)}function Zy(t){const e=this,{width:n,height:r}=Gi.call(e),a=e.getTotalDataSum(!0),s=e.config.funnel_rotated?n:r;return t.forEach(o=>{o.ratio=o.value/a*s}),t}function gD(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function Jy(t,e,n,r,a){const s=[];for(let l=0;l<=20;l++){const c=l/20,u=t+(e-t)*c,f=n+(r-n)*gD(c);s.push(a?[u,f]:[f,u])}return s}function vD(){var t;const e=this,n=e.config.funnel_rotated,{width:r,height:a}=Gi.call(e,!0),s=kf.call(e,{width:r,height:a}),o=to().x(v=>v[0]).y(v=>v[1]).curve(Qi),l=(n?a-s.width:r-s.width)/2,c=n?r-s.height:a-s.height,u=Jy(0,c,n?0:r,n?l:r-l,n),f=[];if(s.height>0&&(u.push(n?[r,l]:[r-l,a]),f.push(n?[r,a-l]:[l,a])),f.push(...Jy(c,0,n?a-l:l,n?a:0,n)),u.length>1){const[v,b]=n?[1,0]:[0,1];u.splice(1,0,[u[v][0],u[b][1]]);const x=f.length-1;x>0&&f.splice(x,0,[f[x-v][0],f[x-b][1]])}const d=o(u)||"",h=((t=o(f))==null?void 0:t.replace(/^M/,"L"))||"";return n?`${d}${h}z`:`M0,0${d.replace(/^M/,"L")}${h}z`}const pD={themeTextColor:!0,canvasUnsupported:"funnel chart",afterUnload(t){t.updateFunnel(t.data.targets)},labelData(t,e){return e.values.filter(n=>D(n.value)||!!n.value)},textX(t,e,n,r,a){var s,o;return e?((o=(s=e[2])==null?void 0:s[0])!=null?o:e[0][0])+t.getCenteredTextPos(n,e,r,"x",a)+Fi.call(t,n,"x"):Os(r,"x")},textY(t,e,n,r,a,s){var o,l;if(!e)return Os(r,"y");let c=((l=(o=e[2])==null?void 0:o[1])!=null?l:e[0][1])+a.height/2-3;return t.config.axis_rotated||(c+=t.getCenteredTextPos(n,e,r,"y",s)),c+Fi.call(t,n,"y")}};var mD={isFunnelType(t){return this.isTypeOf(t,"funnel")},initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${Oe.chart}`).append("g").classed(ws.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(ws.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const a=o=>{var l;const c=o.isTrusted?o.target:(l=r.eventReceiver.rect)==null?void 0:l.node();if(c&&/^path$/i.test(c.tagName))return r.event=o,Zt(c).datum()},s=r.inputType==="touch";e.on(s?"touchstart":"mouseover mousemove",o=>{const l=a(o);l&&(t.showTooltip([l],o.target),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=a(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))}).on("click",o=>{const{target:l}=o,c=/^path$/i.test(l.tagName)?Zt(l).datum():null;c!=null&&c.id&&n.data_onclick.bind(t.api)(c,l)})},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e;n||e.initFunnel();const r=e.getChartClass("Funnel"),a=e.getClass("funnel",!0,!0),s=hD.call(e,t.filter(e.isFunnelType.bind(e))),o=e.filterNullish(s),l=n.selectAll(`.${ws.chartFunnel}`).data(o);l.exit().remove();const c=l.enter().insert("g",`.${ws.funnelBackground}`);c.append("path"),n.path=c.merge(l).attr("class",r).select("path").attr("class",a).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,r=t.map(({id:a})=>a);n.path=n.path.filter(a=>r.includes(a.id))},generateGetFunnelPoints(){const t=this,{config:e,$el:{funnel:n}}=t,r=e.funnel_rotated,a=t.filterTargetsToShow(n.path),{top:s,left:o,width:l,height:c}=Gi.call(t),u={};let f=0;return a.each(d=>{const h=f,{ratio:v}=d;f+=v;const b=r?o:s,x=b+h,E=b+f,w=(x+E)/2,N=r?s+c/2:o+l/2;u[d.id]=r?[[x,N],[E,N],[w,N]]:[[N,x],[N,E],[N,w]]}),d=>u[d.id]},redrawFunnel(){const t=this,{config:e,$T:n,$el:{funnel:r}}=t,a=t.filterTargetsToShow(r.path),s=fD.call(t,Zy.call(t,a.data())),{top:o,left:l}=Gi.call(t),c=(e.funnel_spline?vD:dD).call(t);r.attr("transform",`translate(${l}, ${o})`).attr("clip-path",`path('${c}')`),r.background.attr("d",c),n(a).attr("d",(u,f)=>`M${s[f].join("L")}z`).style("opacity","1"),r.selectAll("g").style("opacity",null)}},yD={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let Qy=()=>(Wi([mD],[yD]),Object.assign(Se,ws),ja("funnel",{hooks:pD}),(Qy=()=>ne.FUNNEL)());var xD={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,r=(a=null,s="")=>{n.append("text").attr("class",a).style("text-anchor","middle").style("pointer-events","none").text(s)};if(t.hasType("gauge")){const a=t.hasMultiArcGauge();n.append(a?"g":"path").attr("class",Ye.chartArcsBackground).style("fill",!a&&e.gauge_background||null),e.gauge_units&&r(er.chartArcsGaugeUnit),e.gauge_label_show&&(r(er.chartArcsGaugeMin),!e.gauge_fullCircle&&r(er.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,a=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&a+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=a-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:r}=t,{hiddenTargetIds:a}=t.state,s=r.main.selectAll(`.${Ye.arcs}`).selectAll(`.${Ye.arcLabelLine}`).data(t.arcData.bind(t));s.enter().append("rect").attr("class",l=>`${Ye.arcLabelLine} ${Oe.target} ${Oe.target}-${l.data.id}`).merge(s).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const u=2;let f=0,d=0,h="";if(!a.has(l.data.id)){const v=t.updateAngle(l),b=n.gaugeArcWidth/t.getTargetsToShow().length*(v.index+1),x=v.endAngle-Math.PI/2,E=n.radius-b,w=x-(E===0?0:1/E);c=n.radiusExpanded-n.radius+b,f=Math.cos(w)*E,d=Math.sin(w)*E,h=`rotate(${x*180/Math.PI}, ${f}, ${d})`}Zt(this).attr("x",f).attr("y",d).attr("width",c).attr("height",u).attr("transform",h).style("stroke-dasharray",`0, ${c+u}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:r}=n,a=r.gauge_label_extents;return M(a)?a.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){return this.getGaugeLabelHeight()*2}},bD={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50};let _y=()=>(Wi([xD],[Ol,bD]),(_y=()=>ne.GAUGE)());const $n={chartHeatmap:"bb-chart-heatmap",heatmapRows:"bb-heatmap-rows",heatmapRow:"bb-heatmap-row",heatmapCell:"bb-heatmap-cell",heatmapLabel:"bb-heatmap-label",heatmapNames:"bb-heatmap-names",heatmapAxis:"bb-heatmap-axis",heatmapColorbar:"bb-heatmap-colorbar"},TD=18,Pl=6,Hi=12,Ml=10,qy=16,SD=11,AD=(t,e)=>t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0,Ll=t=>t!=null&&t!==""&&Number.isFinite(Number(t));function ED(){var t,e;const n=this,{config:r,state:{current:{width:a,height:s},isCanvasMode:o,isLegendRight:l}}=n,c=n.getCurrentPadding(),u=r.legend_show&&r.legend_position==="bottom"?(o?0:n.getLegendHeight())+10:0,f=r.legend_show&&l?n.getLegendWidth()+(((t=r.padding)==null?void 0:t.mode)==="fit"?6:20):0,d=o?n.getCanvasSurfaceHeight():s,h=Math.max(0,d-c.top-c.bottom-u),v=o&&u&&((e=n.getCanvasBottomLegendHeight)==null?void 0:e.call(n))||0;return{left:c.left,top:c.top,width:Math.max(0,a-c.left-c.right-f),height:h,chrome:c.top+c.bottom+u+v}}function zf(t){const e=this,{cache:n,state:{isCanvasMode:r},$el:a}=e,s=`heatmap-text-${r}-${t.join("\0")}`;let o=n.get(s)||0;if(!o&&r&&e.canvasRenderer){const{ctx:l}=e.canvasRenderer;l.save(),l.font=e.canvasTheme.style.heatmap.axisFont,o=t.reduce((c,u)=>Math.max(c,l.measureText(u).width),0),l.restore()}else if(!o&&!r&&a.heatmap){const l=a.heatmap.append("text").attr("class",$n.heatmapAxis).style("visibility","hidden");t.forEach(c=>{var u,f;o=Math.max(o,((f=(u=l.text(c).node()).getComputedTextLength)==null?void 0:f.call(u))||0)}),l.remove()}return o?n.add(s,o):o=t.reduce((l,c)=>Math.max(l,c.length),0)*6.5,Math.ceil(o)}function CD(t){const e=this.config.heatmap_color_ranges;if(e!=null&&e.length)return o=>{var l;return(l=e.find(c=>{var u,f;return o>=((u=c.from)!=null?u:-1/0)&&o<=((f=c.to)!=null?f:1/0)}))==null?void 0:l.color};const n=this.config.heatmap_color_range,[r,a]=t,s=n.length-1;return s<1?()=>n[0]:xi().domain(n.map((o,l)=>r+(a-r)*l/s)).range(n).interpolate(gs).clamp(!0)}function wD(t){const e=/^rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(t);let n=[0,0,0];return e?n=[+e[1],+e[2],+e[3]]:/^#[0-9a-f]{6}$/i.test(t)?n=[1,3,5].map(r=>parseInt(t.slice(r,r+2),16)):/^#[0-9a-f]{3}$/i.test(t)&&(n=[1,2,3].map(r=>parseInt(t[r]+t[r],16))),(n[0]*299+n[1]*587+n[2]*114)/1e3>140?"#000":"#fff"}function tx(t,e,n,r=4){const a=Math.max(1,Math.ceil((n+r)/(e||1)));return t.map((s,o)=>[s,o]).filter(([,s])=>s%a===0)}const ex={ownLegendLayout:!0,currentHeight(t){var e,n;if(!(t.config.heatmap_cell_ratio>0)||!((n=(e=t.data)==null?void 0:e.targets)!=null&&n.length))return;const{height:r}=t.getHeatmapLayout(!0);return Number.isFinite(r)?Math.ceil(r):void 0},namedData:!0,labelData(){return[]},legendColor(t,e){var n,r;const a=e.values.filter(s=>Ll(s.value));return a.length&&(r=(n=t.getHeatmapScale().scale(a.reduce((s,o)=>s+Number(o.value),0)/a.length))!=null?n:t.config.heatmap_color_none)!=null?r:void 0},tooltipColor(t,e){var n,r;return Ll(e.value)&&(r=(n=t.getHeatmapScale().scale(Number(e.value)))!=null?n:t.config.heatmap_color_none)!=null?r:void 0},tooltipTarget(t,e){var n,r,a,s,o;const{cells:l}=t.getHeatmapLayout(),c=(n=e.data)==null?void 0:n.id,u=(a=e.index)!=null?a:(r=e.data)==null?void 0:r.index,f=(o=e.x)!=null?o:(s=e.data)==null?void 0:s.x,d=l.find(h=>(c===void 0||h.id===c)&&(u!==void 0?h.index===u:f!==void 0?h.x===String(f):!0)&&h.value!==null);return{data:d?[t.getHeatmapCellData(d)]:[],point:d&&[(d.x0+d.x1)/2,(d.y0+d.y1)/2]}}},nx=new WeakSet,rx=new WeakMap;var ID={fitHeatmapHeight(){const t=this,{width:e,height:n}=t.state.current,r=ex.currentHeight(t);let a=rx.get(t);(!a||a.width!==e)&&rx.set(t,a={width:e,count:0}),r&&Math.abs(r-n)>1&&a.count++<3&&t.resizeFunction()},isHeatmapType(t){return this.isTypeOf(t,"heatmap")},getHeatmapLayout(t=!1){const e=this,{config:n}=e,r=e.data.targets.filter(e.isHeatmapType.bind(e)),a=ED.call(e);t&&(a.height=1/0);const o=r.reduce((Rt,Vt)=>Vt.values.length>Rt.length?Vt.values:Rt,[]).map(Rt=>String(Rt.x)),{domain:l,scale:c}=e.getHeatmapScale(),u=r.filter(Rt=>e.isTargetToShow(Rt.id)),f=u.map(Rt=>Rt.id),d=u.map(Rt=>{var Vt;return String((Vt=AD(n.data_names,Rt.id))!=null?Vt:Rt.id)}),h=n.heatmap_axis_x_show&&o.length>0,v=n.heatmap_axis_y_show&&f.length>0,b=v?zf.call(e,d)+Pl:0,x=h?TD:0,E=n.heatmap_axis_x_position==="top",w=n.heatmap_colorbar_format,N=Rt=>Rt===void 0?"":String(M(w)?w.call(e.api,Rt):Rt),k=n.heatmap_color_ranges||[];let B=[];n.heatmap_colorbar_show&&(B=k.length?k.map((Rt,Vt)=>{var ae;return{text:(ae=Rt.name)!=null?ae:Rt.from===void 0?`\u2264 ${N(Rt.to)}`:Rt.to===void 0?`\u2265 ${N(Rt.from)}`:`${N(Rt.from)} - ${N(Rt.to)}`,pos:(Vt+.5)/k.length,edge:!1}}):l.map((Rt,Vt)=>({text:N(Rt),pos:Vt,edge:!0})));const G=n.heatmap_colorbar_position,V=G!=="top"&&G!=="bottom",Z=B.length>0,Y=Z&&V?Ml+Hi+4+zf.call(e,B.map(Rt=>Rt.text)):0,et=Z&&!V?Ml+Hi+qy:0,it=G==="top",at={left:a.left+b,top:a.top+(E?x:0)+(it?et:0),width:Math.max(0,a.width-b-Y),height:Math.max(0,a.height-x-et)};let ot=o.length?at.width/o.length:0,st=f.length?at.height/f.length:0;const _=n.heatmap_cell_ratio;_>0&&ot&&st&&(ot=Math.min(ot,st*_),st=ot/_,at.width=ot*o.length,at.height=st*f.length);const lt=n.heatmap_cell_padding/2,nt=n.heatmap_color_none,dt=[];u.forEach((Rt,Vt)=>{Rt.values.forEach((ae,re)=>{var ve;const xe=Ll(ae.value),ge=xe&&(ve=c(Number(ae.value)))!=null?ve:nt;ge&&dt.push({id:Rt.id,name:d[Vt],x:o[re],index:re,row:Vt,value:xe?Number(ae.value):null,color:ge,x0:at.left+re*ot+lt,y0:at.top+Vt*st+lt,x1:at.left+(re+1)*ot-lt,y1:at.top+(Vt+1)*st-lt})})});const bt=h?tx(o,ot,zf.call(e,o)).map(([Rt,Vt])=>({text:Rt,x:at.left+(Vt+.5)*ot,y:E?at.top-Pl:at.top+at.height+Pl,align:"center",baseline:E?"bottom":"top"})):[],At=v?tx(d,st,SD,0).map(([Rt,Vt])=>({text:Rt,x:at.left-Pl,y:at.top+(Vt+.5)*st,align:"right",baseline:"middle"})):[];let Et=null;if(Z){const Rt=k.length?k.map(re=>re.color):n.heatmap_color_range,Vt=Rt.length-1,ae=[];if(Rt.forEach((re,ve)=>{k.length?ae.push([ve/Rt.length,re],[(ve+1)/Rt.length,re]):ae.push([Vt?ve/Vt:0,re])}),V){const re=at.left+at.width+Ml;Et={horizontal:!1,x:re,y:at.top,width:Hi,height:at.height,stops:ae.map(([ve,xe])=>[1-ve,xe]).reverse(),labels:B.map(ve=>({text:ve.text,x:re+Hi+4,y:at.top+at.height*(1-ve.pos),align:"left",baseline:ve.edge?ve.pos?"top":"bottom":"middle"}))}}else{const re=it?a.top+qy:at.top+at.height+(E?0:x)+Ml,ve=it?re-4:re+Hi+4,xe=it?"bottom":"top";Et={horizontal:!0,x:at.left,y:re,width:at.width,height:Hi,stops:ae,labels:B.map(ge=>({text:ge.text,x:at.left+at.width*ge.pos,y:ve,align:ge.edge?ge.pos?"right":"left":"center",baseline:xe}))}}}return{cells:dt,rows:f,columns:o,plot:at,axisX:bt,axisY:At,colorbar:Et,domain:l,height:at.height+x+et+a.chrome}},getHeatmapScale(){const t=this,{config:e}=t;let n=1/0,r=-1/0;t.data.targets.filter(t.isHeatmapType.bind(t)).forEach(l=>{t.color(l.id),l.values.forEach(c=>{if(Ll(c.value)){const u=Number(c.value);n=Math.min(n,u),r=Math.max(r,u)}})});let a=e.heatmap_color_min,s=e.heatmap_color_max;a>s&&(nx.has(t)||(nx.add(t),console.error(`[billboard.js] heatmap.color.min (${a}) is bigger than heatmap.color.max (${s}): both are ignored.`)),a=s=void 0);const o=[a!=null?a:n===1/0?0:n,s!=null?s:r===-1/0?1:r];return{domain:o,scale:CD.call(t,o)}},getHeatmapLabelColor(t){return this.config.heatmap_label_color||wD(t.color)},getHeatmapLabel(t){var e;const n=this,{config:r}=n;if(!r.heatmap_label_show||t.value===null)return"";const a=r.heatmap_label_format;return String((e=M(a)?a.call(n.api,t.value,t.x,t.id):t.value)!=null?e:"")},isHeatmapDefocused(t){var e;return!!((e=this.state.defocusedTargetIds)!=null&&e.has(t))},getHeatmapCellData(t){return{id:t.id,x:t.x,index:t.index,value:t.value,name:`${t.name} / ${t.x}`}},generateGetHeatmapPoints(){return()=>{}}},RD=Object.defineProperty,OD=Object.defineProperties,PD=Object.getOwnPropertyDescriptors,ax=Object.getOwnPropertySymbols,MD=Object.prototype.hasOwnProperty,LD=Object.prototype.propertyIsEnumerable,ix=(t,e,n)=>e in t?RD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DD=(t,e)=>{for(var n in e||(e={}))MD.call(e,n)&&ix(t,n,e[n]);if(ax)for(var n of ax(e))LD.call(e,n)&&ix(t,n,e[n]);return t},FD=(t,e)=>OD(t,PD(e));const ND={left:"start",right:"end",center:"middle"},$D={middle:".35em",top:".71em",bottom:"0"};var BD=FD(DD({},ID),{initHeatmap(){const t=this,{$el:e}=t;e.heatmap=e.main.select(`.${Oe.chart}`).append("g").classed($n.chartHeatmap,!0),e.heatmap.append("defs"),e.heatmap.append("g").classed($n.heatmapRows,!0),e.heatmap.append("g").classed($n.heatmapNames,!0),e.heatmap.append("g").classed($n.heatmapColorbar,!0),t.bindHeatmapEvent()},bindHeatmapEvent(){const t=this,{$el:{heatmap:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const a=o=>{var l,c;const u=o.target===e.node()?(c=(l=r.eventReceiver.rect)==null?void 0:l.node)==null?void 0:c.call(l):o.target;if(u&&/^rect$/i.test(u.tagName)){const f=Zt(u).datum();if((f==null?void 0:f.id)!==void 0&&f.value!==void 0&&f.value!==null)return r.event=o,t.getHeatmapCellData(f)}},s=r.inputType==="touch";e.on(s?"touchstart":"mouseover mousemove",o=>{const l=a(o);l&&(t.showTooltip([l],t.$el.svg.node()),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l,o.target))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=a(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l,o.target))}).on("click",o=>{const l=a(o);l&&n.data_onclick.bind(t.api)(l,o.target)})},updateTargetsForHeatmap(){const t=this;!t.$el.heatmap&&t.initHeatmap()},setHeatmapText(t,e){const n=this;t.each(function(r){Zt(this).attr("class",$n.heatmapAxis).text(r.text).attr("dy",$D[r.baseline]).style("text-anchor",ND[r.align])}),n.$T(t,e).attr("x",r=>r.x).attr("y",r=>r.y)},redrawHeatmap(t){const e=this,{$el:{heatmap:n},config:r,state:a}=e,{cells:s,rows:o,axisX:l,axisY:c,colorbar:u}=e.getHeatmapLayout(),f=r.heatmap_cell_radius,d=r.heatmap_cell_border_width,h=new Map(o.map(N=>[N,[]]));s.forEach(N=>{var k;return(k=h.get(N.id))==null?void 0:k.push(N)});const v=n.select(`.${$n.heatmapRows}`).selectAll(`.${$n.heatmapRow}`).data(o,N=>N);v.exit().remove(),v.enter().append("g").merge(v).attr("class",N=>$n.heatmapRow+e.classTarget(N)).each(function(N){const k=Zt(this),B=h.get(N),G=k.selectAll(`.${$n.heatmapCell}`).data(B,Y=>Y.index);G.exit().remove();const V=G.enter().append("rect").style("opacity","0").merge(G).attr("class",Y=>`${nn.shape} ${nn.shape}-${Y.index} ${$n.heatmapCell}`).style("fill",Y=>Y.color).style("stroke",d?r.heatmap_cell_border_color:null).style("stroke-width",d?`${d}px`:null).attr("rx",f||null);e.$T(V,t).attr("x",Y=>Y.x0).attr("y",Y=>Y.y0).attr("width",Y=>Math.max(0,Y.x1-Y.x0)).attr("height",Y=>Math.max(0,Y.y1-Y.y0)).style("opacity",null);const Z=k.selectAll(`.${$n.heatmapLabel}`).data(r.heatmap_label_show?B.filter(Y=>Y.value!==null):[],Y=>Y.index);Z.exit().remove(),Z.enter().append("text").merge(Z).attr("class",$n.heatmapLabel).attr("x",Y=>(Y.x0+Y.x1)/2).attr("y",Y=>(Y.y0+Y.y1)/2).attr("dy",".35em").style("text-anchor","middle").style("fill",Y=>e.getHeatmapLabelColor(Y)).text(Y=>e.getHeatmapLabel(Y))});const x=n.select(`.${$n.heatmapNames}`).selectAll("text").data(l.concat(c),N=>`${N.align}${N.text}`);x.exit().remove(),e.setHeatmapText(x.enter().append("text").merge(x),t);const E=n.select(`.${$n.heatmapColorbar}`),w=`${a.datetimeId}-heatmap-colorbar`;E.selectAll("*").remove(),n.select("defs").selectAll("*").remove(),u&&(n.select("defs").append("linearGradient").attr("id",w).attr("x1",0).attr("x2",u.horizontal?1:0).attr("y1",0).attr("y2",u.horizontal?0:1).selectAll("stop").data(u.stops).enter().append("stop").attr("offset",N=>N[0]).attr("stop-color",N=>N[1]),E.append("rect").attr("x",u.x).attr("y",u.y).attr("width",u.width).attr("height",u.height).style("fill",`url(#${w})`),e.setHeatmapText(E.selectAll("text").data(u.labels).enter().append("text"))),e.fitHeatmapHeight(),n.selectAll(`.${$n.heatmapRow}`).classed(Ke.defocused,N=>e.isHeatmapDefocused(N))}}),kD={heatmap_color_range:["#f6efa6","#d88273","#bf444c"],heatmap_color_ranges:void 0,heatmap_color_min:void 0,heatmap_color_max:void 0,heatmap_color_none:"#ebedf0",heatmap_cell_ratio:void 0,heatmap_cell_padding:0,heatmap_cell_radius:0,heatmap_cell_border_width:0,heatmap_cell_border_color:"#fff",heatmap_label_show:!1,heatmap_label_format:void 0,heatmap_label_color:void 0,heatmap_axis_x_show:!0,heatmap_axis_x_position:"bottom",heatmap_axis_y_show:!0,heatmap_colorbar_show:!0,heatmap_colorbar_position:"right",heatmap_colorbar_format:void 0};let sx=()=>(Ve(dn.prototype,[BD]),Br.setOptions([kD]),ja("heatmap",{hooks:ex}),(sx=()=>"heatmap")()),ox=()=>(ra(),(ox=()=>ne.LINE)()),lx=()=>(ra(void 0,[mf]),(lx=()=>ne.SPLINE)()),cx=()=>(ra(),(cx=()=>ne.STEP)());var zD={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};let ux=()=>(Wi(void 0,[Ol,zD]),(ux=()=>ne.PIE)());function fx(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var UD={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,r=n.polar_level_text_show,a=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",qr.levels),r&&a&&t.generateTextBGColorFilter(a)},getPolarOuterRadius(t,e){var n;const r=fx(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/r*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:r}}}=t,a=e.polar_level_depth,s=fx(t),o=ia(0,a),l=n.radius,c=o.map(h=>l*((h+1)/a)),u=(e.polar_level_text_format||function(){}).bind(t.api),f=r.selectAll(`.${qr.level}`).data(o);f.exit().remove();const d=f.enter().append("g").attr("class",(h,v)=>`${qr.level} ${qr.level}-${v}`);if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",h=>c[h]),e.polar_level_text_show){const h=e.polar_level_text_backgroundColor,v=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(h)}`;d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",b=>-c[b]+5).attr("filter",h?`url(${v})`:null).text(b=>u(s/o.length*(b+1)))}}},WD={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0};let dx=()=>(Wi([UD],[Ol,WD]),(dx=()=>ne.POLAR)());function GD(t,e,n,r,a,s){const o=t&&r>0?n-r:r,l=2*Math.PI;return a*(1-s*(e==="x"?Math.sin:Math.cos)(o*l/n))}const Xi=Me.radarPoints,hx=Me.radarTextWidth;var HD={initRadar(){const t=this,{config:e,state:{current:n},$el:r}=t;t.hasType("radar")&&(r.radar=r.main.select(`.${Oe.chart}`).append("g").attr("class",$v.chartRadars),r.radar.levels=r.radar.append("g").attr("class",qr.levels),r.radar.axes=r.radar.append("g").attr("class",yn.axis),r.radar.shapes=r.radar.append("g").attr("class",nn.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.interaction_enabled&&r.radar.shapes.on("click",a=>{const{target:s}=a,o=/^circle$/i.test(s.tagName)?Zt(s).datum():null;o!=null&&o.id&&e.data_onclick.bind(t.api)(o,s)}),e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:r}}=t,a=e.axis_x_categories.length<4?-20:10,s=(Math.min(n,r)-a)/2;return[s,s]},updateTargetsForRadar(t){const e=this,{config:n}=e;tt(n.axis_x_categories)&&(n.axis_x_categories=ia(0,Xn("max",t.map(r=>r.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,r){const a=this,{config:s}=a,[o,l]=a.getRadarSize(),c=s.axis_x_categories.length,u=s.radar_direction_clockwise,f=Rn(t).map(d=>GD(u,d,c,e,H(n)?n:t==="x"?o:l,D(r)?r:s.radar_size_ratio));return f.length===1?f[0]:f},generateRadarPoints(){const t=this,e=t.data.targets,[n,r]=t.getRadarSize(),a=t.cache.get(Xi)||{},s=a._size;(!s||s.width!==n&&s.height!==r)&&(e.forEach(o=>{a[o.id]=o.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),a._size={width:n,height:r},t.cache.add(Xi,a))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,r=t.getTranslate("radar");r&&(e.attr("transform",r),n.select(`.${vn.chartTexts}`).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(Xi);return(e,n)=>{const r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:r}}=t,[a,s]=t.getRadarSize(),o=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,u=r.levels,f=ia(0,o),d=e.radar_size_ratio*Math.min(a,s),h=f.map(w=>d*((w+1)/o)),v=(e.radar_level_text_format||function(){}).bind(t.api),b=f.map(w=>{const N=h[w];return ia(0,l).map(B=>t.getRadarPosition(["x","y"],B,N,1).join(",")).join(" ")}),x=u.selectAll(`.${qr.level}`).data(f);x.exit().remove();const E=x.enter().append("g").attr("class",(w,N)=>`${qr.level} ${qr.level}-${N}`);E.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>v(0)),E.append("text").attr("dx","-.5em").style("text-anchor","end").text(w=>v(n.current.dataMax/f.length*(w+1)))),E.merge(x).attr("transform",w=>`translate(${a-h[w]}, ${s-h[w]})`).selectAll("polygon").attr("points",w=>b[w]),c&&u.selectAll("text").attr("x",w=>z(w)?a:b[w].split(",")[0]).attr("y",w=>z(w)?s:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[r,a]=t.getRadarSize(),s=e.axis_x_categories;let o=n.axes.selectAll("g").data(s);o.exit().remove();const l=o.enter().append("g").attr("class",(c,u)=>`${yn.axis}-${u}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),o=l.merge(o),e.radar_axis_line_show&&o.select("line").attr("x1",r).attr("y1",a).attr("x2",(c,u)=>t.getRadarPosition("x",u)).attr("y2",(c,u)=>t.getRadarPosition("y",u)),e.radar_axis_text_show){const{x:c=0,y:u=0}=e.radar_axis_text_position,f=t.cache.get(hx)||0;if(o.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){Ri(Zt(this),String(h),[-.6,1.2])})}).datum((d,h)=>({index:h})).attr("transform",function(d){z(this.width)&&(this.width=en(this,!0).width/2);let h=t.getRadarPosition("x",d.index,void 0,1),v=Math.round(t.getRadarPosition("y",d.index,void 0,1));return h>r?h+=this.width+c:Math.round(h)<r&&(h-=this.width+c),v>a?(v/2===a&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),v+=u):v<a&&(v-=u),`translate(${h} ${v})`}),!f){const d=[n.axes,n.levels].map(h=>Hv(h.node()).width);d.every(h=>h>0)&&t.cache.add(hx,d[0]-d[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:r,svg:a}}=t,s=t.isPointFocusOnly(),{inputType:o,transiting:l}=n,c=o==="mouse",u=f=>{if(n.event=f,!e.interaction_onout)return;const d=t.getDataIndexFromEvent(f),h=z(d);(c||h)&&(t.hideTooltip(),s?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,d):h&&t.callOverOutForTouch())};r.axes.on(c?"mouseover ":"touchstart",f=>{if(l)return;n.event=f;const d=t.getDataIndexFromEvent(f);t.selectRectForSingle(a.node(),d),c?t.setOverOut(!0,d):t.callOverOutForTouch(d)},c?void 0:{passive:!0}).on("mouseout",c?u:null).on("click",f=>{const d=t.getDataIndexFromEvent(f);if(z(d))return;const h=/tspan/i.test(f.target.tagName)?f.target.parentNode:f.target;t.filterTargetsToShow(t.data.targets).forEach(v=>{const b=t.getValueOnIndex(v.values,d);b&&e.data_onclick.bind(t.api)(b,h)})}),c||a.on("touchstart",u,{passive:!0})},updateRadarShape(){const t=this,e=t.data.targets.filter(s=>t.isRadarType(s)),n=t.cache.get(Xi),r=t.$el.radar.shapes.selectAll("polygon").data(t.filterNullish(e)),a=r.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(r.exit()).remove(),a.append("polygon").merge(r).style("fill",t.color).style("stroke",t.color).attr("points",s=>n[s.id].join(" ")),t.updateTargetForCircle(e,a)},radarCircleX(t){return this.cache.get(Xi)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(Xi)[t.id][t.index][1]}},XD={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};let gx=()=>(Wi([uy.eventrect,bl,HD],[Sa,XD,{axis_x_categories:fy.optAxis.axis_x_categories}]),(gx=()=>ne.RADAR)());var Za=Math.pow;const ur={chartSankey:"bb-chart-sankey",sankeyLinks:"bb-sankey-links",sankeyLink:"bb-sankey-link",sankeyNodes:"bb-sankey-nodes",sankeyNode:"bb-sankey-node",sankeyLabel:"bb-sankey-label"},vx={left:t=>t.depth,right:(t,e)=>e-1-t.height,justify:(t,e)=>t.sourceLinks.length?t.depth:e-1,center:t=>t.targetLinks.length?t.depth:t.sourceLinks.length?Math.min(...t.sourceLinks.map(e=>e.target.depth))-1:0},px=(t,e)=>t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0,mx=t=>t.reduce((e,n)=>e+n.value,0),Uf=(t,e)=>t.y0-e.y0,yx=(t,e)=>Uf(t.source,e.source)||t.index-e.index,xx=(t,e)=>Uf(t.target,e.target)||t.index-e.index,bx=t=>t>0&&Number.isFinite(t);function VD(){const t=this,{config:e}=t,n=t.data.targets.filter(t.isSankeyType.bind(t)),r=new Map,a=[],s=[];n.forEach(l=>t.color(l.id)),n.forEach(l=>l.values.forEach(c=>bx(Number(c.value))&&t.color(String(c.x))));const o=l=>{var c;let u=r.get(l);return u||(u={id:l,name:String((c=px(e.data_names,l))!=null?c:l),index:a.length,value:0,color:t.color(l),sourceLinks:[],targetLinks:[],depth:0,height:0,layer:0,x0:0,x1:0,y0:0,y1:0},r.set(l,u),a.push(u)),u};return n.filter(l=>t.isTargetToShow(l.id)).forEach(l=>{l.values.forEach(c=>{const u=Number(c.value);if(!bx(u)||!t.isTargetToShow(String(c.x)))return;const f=o(l.id),d=o(String(c.x)),h={source:f,target:d,value:u,index:s.length,width:0,y0:0,y1:0};f.sourceLinks.push(h),d.targetLinks.push(h),s.push(h)})}),a.forEach(l=>{l.value=Math.max(mx(l.sourceLinks),mx(l.targetLinks))}),{nodes:a,links:s}}function Tx(t,e){const n=e==="depth"?"sourceLinks":"targetLinks",r=e==="depth"?"target":"source";let a=new Set(t),s=0;for(;a.size;){const o=new Set;if(a.forEach(l=>{l[e]=s,l[n].forEach(c=>o.add(c[r]))}),++s>t.length)return!1;a=o}return!0}function jD(){var t;const e=this,n=e.config.sankey_node_sort,r=(a,s)=>a.index-s.index;return M(n)?(a,s)=>n.call(e.api,e.getSankeyNodeData(a),e.getSankeyNodeData(s))||r(a,s):(t=px({data:r,asc:(a,s)=>a.value-s.value||r(a,s),desc:(a,s)=>s.value-a.value||r(a,s)},n))!=null?t:null}function YD(t,e,n){var r;const a=this,{config:s}=a,o=n.left,l=n.top,c=o+n.width,u=l+n.height,f=s.sankey_node_width,d=(r=vx[s.sankey_node_align])!=null?r:vx.justify,h=jD.call(a),v=Math.max(...t.map(st=>st.depth))+1,b=v>1?(c-o-f)/(v-1):0,x=Array.from({length:v},()=>[]);t.forEach(st=>{const _=Math.max(0,Math.min(v-1,Math.floor(d(st,v))));st.layer=_,st.x0=o+_*b,st.x1=st.x0+f,x[_].push(st)}),h&&x.forEach(st=>st.sort(h));const E=Math.max(...x.map(st=>st.length)),w=Math.min(s.sankey_node_padding,E>1?(u-l)/(E-1):1/0),N=st=>{st.sourceLinks.sort(xx),st.targetLinks.sort(yx)},k=st=>{st.targetLinks.forEach(_=>_.source.sourceLinks.sort(xx)),st.sourceLinks.forEach(_=>_.target.targetLinks.sort(yx))},B=Math.min(...x.map(st=>(u-l-(st.length-1)*w)/st.reduce((_,lt)=>_+lt.value,0)));x.forEach(st=>{let _=l;st.forEach(nt=>{nt.y0=_,nt.y1=_+nt.value*B,_=nt.y1+w,nt.sourceLinks.forEach(dt=>{dt.width=dt.value*B})});const lt=(u-_+w)/(st.length+1);st.forEach((nt,dt)=>{nt.y0+=lt*(dt+1),nt.y1+=lt*(dt+1)}),st.forEach(N)});const G=(st,_)=>{st.y0+=_,st.y1+=_},V=(st,_,lt,nt)=>{for(;lt<st.length;lt++){const dt=st[lt],bt=(_-dt.y0)*nt;bt>1e-6&&G(dt,bt),_=dt.y1+w}},Z=(st,_,lt,nt)=>{for(;lt>=0;lt--){const dt=st[lt],bt=(dt.y1-_)*nt;bt>1e-6&&G(dt,-bt),_=dt.y0-w}},Y=(st,_)=>{const lt=st.length>>1,nt=st[lt];Z(st,nt.y0-w,lt-1,_),V(st,nt.y1+w,lt+1,_),Z(st,u,st.length-1,_),V(st,l,0,_)},et=(st,_)=>{let lt=st.y0-(st.sourceLinks.length-1)*w/2;for(const{target:nt,width:dt}of st.sourceLinks){if(nt===_)break;lt+=dt+w}for(const{source:nt,width:dt}of _.targetLinks){if(nt===st)break;lt-=dt}return lt},it=(st,_)=>{let lt=_.y0-(_.targetLinks.length-1)*w/2;for(const{source:nt,width:dt}of _.targetLinks){if(nt===st)break;lt+=dt+w}for(const{target:nt,width:dt}of st.sourceLinks){if(nt===_)break;lt-=dt}return lt},at=(st,_,lt,nt)=>{st.forEach(dt=>{let bt=0,At=0;(_?dt.targetLinks:dt.sourceLinks).forEach(Et=>{const Rt=Et.value*(Et.target.layer-Et.source.layer);bt+=(_?et(Et.source,dt):it(dt,Et.target))*Rt,At+=Rt}),At>0&&(G(dt,(bt/At-dt.y0)*lt),k(dt))}),h||st.sort(Uf),Y(st,nt)},ot=s.sankey_iterations;for(let st=0;st<ot;st++){const _=Za(.99,st),lt=Math.max(1-_,(st+1)/ot);for(let nt=x.length-2;nt>=0;nt--)at(x[nt],!1,_,lt);for(let nt=1;nt<x.length;nt++)at(x[nt],!0,_,lt)}t.forEach(st=>{let _=st.y0,lt=st.y0;st.sourceLinks.forEach(nt=>{nt.y0=_+nt.width/2,_+=nt.width}),st.targetLinks.forEach(nt=>{nt.y1=lt+nt.width/2,lt+=nt.width})})}function Sx(){var t;const e=this,{config:n,state:{current:{width:r,height:a},isCanvasMode:s,isLegendRight:o}}=e,l=e.getCurrentPadding(),c=n.legend_show&&n.legend_position==="bottom"?(s?0:e.getLegendHeight())+10:0,u=n.legend_show&&o?e.getLegendWidth()+(((t=n.padding)==null?void 0:t.mode)==="fit"?0:20):0,f=s?e.getCanvasSurfaceHeight():a;return{left:l.left,top:l.top,width:Math.max(0,r-l.left-l.right-u),height:Math.max(0,f-l.top-l.bottom-c)}}function KD(t){return{left:t.top,top:t.left,width:t.height,height:t.width}}function ZD(t){const{x0:e,x1:n,y0:r,y1:a}=t;Object.assign(t,{x0:r,x1:a,y0:e,y1:n})}function JD(t,e,n){const[[r,a],[s],,[o,l]]=t,c=x=>Za(1-x,3)*r+3*(1-x)*x*s+Za(x,3)*o;let u=0,f=1;for(let x=0;x<20;x++){const E=(u+f)/2;c(E)<n==r<o?u=E:f=E}const d=(u+f)/2,h=3*Za(1-d,2)*(s-r)+3*Za(d,2)*(o-s),v=6*d*(1-d)*(l-a),b=h?v/h:0;return{c:a+(l-a)*(3*Za(d,2)-2*Za(d,3)),half:e/2*Math.sqrt(1+b*b)}}const QD={namedData:!0,afterFocus(t){var e;(e=t.updateSankeyFocus)==null||e.call(t)},labelData(){return[]},tooltipTarget(t,e){var n;const{nodes:r}=t.getSankeyLayout(),a=(n=e.data)!=null&&n.id?r.find(l=>l.id===e.data.id):r[e.index],s=a?[t.getSankeyNodeData(a)]:[],o=a&&(t.config.sankey_rotated?[(a.x0+a.x1)/2,a.y1]:[a.x1,(a.y0+a.y1)/2]);return{data:s,point:o}}};var _D={isSankeyType(t){return this.isTypeOf(t,"sankey")},getSankeyLayout(){const t=this,e=Sx.call(t),{nodes:n,links:r}=VD.call(t);if(n.length)if(Tx(n,"depth")&&Tx(n,"height")){const a=t.config.sankey_rotated;YD.call(t,n,r,a?KD(e):e),a&&n.forEach(ZD)}else return console.error("[billboard.js] The links of the sankey chart make a cycle: it can't be drawn."),{nodes:[],links:[],area:e};return{nodes:n,links:r,area:e}},getSankeyLinkPoints(t,e=!1){const n=this.config.sankey_rotated,r=n?t.source.y1:t.source.x1,a=n?t.target.y0:t.target.x0,s=(r+a)/2,o=[[r,t.y0],[s,t.y0],[s,t.y1],[a,t.y1]];return n&&!e?o.map(([l,c])=>[c,l]):o},getSankeyLinkPath(t){const[e,n,r,a]=this.getSankeyLinkPoints(t);return`M${e}C${n},${r},${a}`},isSankeyLinkHit(t,e,n){const r=this.getSankeyLinkPoints(t,!0),[a,s]=this.config.sankey_rotated?[n,e]:[e,n];if(a<r[0][0]||a>r[3][0])return!1;const o=JD(r,Math.max(1,t.width),a);return Math.abs(s-o.c)<=o.half},getSankeyLabel(t){var e;const n=this,{config:r}=n;if(!r.sankey_label_show)return null;const a=r.sankey_label_format,s=String((e=M(a)?a.call(n.api,t.name,t.value,t.id):t.name)!=null?e:""),o=Sx.call(n);if(r.sankey_rotated){const c=t.y0>o.top+o.height/2;return{text:s,x:(t.x0+t.x1)/2,y:c?t.y0-6:t.y1+6,align:"center",baseline:c?"bottom":"top"}}const l=t.x0>o.left+o.width/2;return{text:s,x:l?t.x0-6:t.x1+6,y:(t.y0+t.y1)/2,align:l?"right":"left",baseline:"middle"}},getSankeyLinkColors(t){const{source:{color:e},target:{color:n}}=t;return{source:[e,e],target:[n,n],gradient:[e,n]}[this.config.sankey_link_color]||[e,e]},isSankeyDefocused(t){const e=this,n=e.state.defocusedTargetIds;return n!=null&&n.size?"source"in t?n.has(t.source.id):n.has(t.id)||t.targetLinks.length>0&&!e.data.targets.some(r=>r.id===t.id)&&t.targetLinks.every(r=>n.has(r.source.id)):!1},getSankeyNodeData(t){return{id:t.id,index:t.index,value:t.value,name:t.name}},getSankeyLinkData(t){const{source:e,target:n,value:r,index:a}=t;return{id:e.id,x:n.id,index:a,value:r,name:`${e.name} \u2192 ${n.name}`,source:e.id,target:n.id}},generateGetSankeyPoints(){return()=>{}}},qD=Object.defineProperty,tF=Object.defineProperties,eF=Object.getOwnPropertyDescriptors,Ax=Object.getOwnPropertySymbols,nF=Object.prototype.hasOwnProperty,rF=Object.prototype.propertyIsEnumerable,Ex=(t,e,n)=>e in t?qD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aF=(t,e)=>{for(var n in e||(e={}))nF.call(e,n)&&Ex(t,n,e[n]);if(Ax)for(var n of Ax(e))rF.call(e,n)&&Ex(t,n,e[n]);return t},iF=(t,e)=>tF(t,eF(e)),sF=iF(aF({},_D),{initSankey(){const t=this,{$el:e}=t;e.sankey=e.main.select(`.${Oe.chart}`).append("g").classed(ur.chartSankey,!0),e.sankey.append("defs"),e.sankey.append("g").classed(ur.sankeyLinks,!0),e.sankey.append("g").classed(ur.sankeyNodes,!0),t.bindSankeyEvent()},bindSankeyEvent(){const t=this,{$el:{sankey:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const a=o=>{var l,c;const u=o.target===e.node()?(c=(l=r.eventReceiver.rect)==null?void 0:l.node)==null?void 0:c.call(l):o.target;if(u&&/^(rect|path)$/i.test(u.tagName)){const f=Zt(u).datum();if(f!=null&&f.sourceLinks)return r.event=o,t.getSankeyNodeData(f);if(f!=null&&f.source)return r.event=o,t.getSankeyLinkData(f)}},s=r.inputType==="touch";e.on(s?"touchstart":"mouseover mousemove",o=>{const l=a(o);l&&(t.showTooltip([l],t.$el.svg.node()),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l,o.target))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=a(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l,o.target))}).on("click",o=>{const l=a(o);l&&n.data_onclick.bind(t.api)(l,o.target)})},updateTargetsForSankey(){const t=this;!t.$el.sankey&&t.initSankey()},updateSankeyFocus(){var t;const e=this,n=r=>e.isSankeyDefocused(r);(t=e.$el.sankey)==null||t.selectAll(`.${ur.sankeyLink}, .${ur.sankeyNode}`).classed(Ke.defocused,n)},redrawSankey(t){var e;const n=this,{$el:{sankey:r},config:a,state:s}=n,{nodes:o,links:l}=n.getSankeyLayout(),c=a.sankey_rotated,u=a.sankey_node_border_width,f=k=>`${k.source.id}\0${k.target.id}\0${k.index}`,d=k=>k.id,h=k=>`${s.datetimeId}-sankey-link-${k.index}`;r.style("--bb-sankey-link-opacity",(e=a.sankey_link_opacity)!=null?e:null);const v=r.select(`.${ur.sankeyLinks}`).selectAll(`.${ur.sankeyLink}`).data(l,f);v.exit().remove();const b=v.enter().append("path").style("opacity","0").merge(v).attr("class",k=>n.generateClass(ur.sankeyLink,k.source.id)).style("stroke",k=>{const[B,G]=n.getSankeyLinkColors(k);return B===G?B:`url(#${h(k)})`}),x=r.select("defs").selectAll("linearGradient").data(l.filter(k=>{const[B,G]=n.getSankeyLinkColors(k);return B!==G}));x.exit().remove(),x.enter().append("linearGradient").attr("gradientUnits","userSpaceOnUse").call(k=>{k.append("stop").attr("offset","0"),k.append("stop").attr("offset","1")}).merge(x).attr("id",k=>h(k)).each(function(k){const[[B],,,[G]]=n.getSankeyLinkPoints(k,!0),[V,Z]=c?["y","x"]:["x","y"],Y=n.getSankeyLinkColors(k);Zt(this).attr(`${V}1`,B).attr(`${V}2`,G).attr(`${Z}1`,0).attr(`${Z}2`,0).selectAll("stop").attr("stop-color",(et,it)=>Y[it])}),n.$T(b,t).attr("d",k=>n.getSankeyLinkPath(k)).style("stroke-width",k=>`${Math.max(1,k.width)}px`).style("opacity",null);const E=r.select(`.${ur.sankeyNodes}`).selectAll(`.${ur.sankeyNode}`).data(o,d);E.exit().remove();const w=E.enter().append("g");w.append("rect").attr("class",nn.shape),w.append("text").attr("class",ur.sankeyLabel);const N=w.merge(E).attr("class",k=>ur.sankeyNode+n.classTarget(k.id));N.select("rect").datum(k=>k).style("fill",k=>k.color).style("stroke",u?a.sankey_node_border_color:null).style("stroke-width",u?`${u}px`:null).call(k=>{n.$T(k,t).attr("x",B=>B.x0).attr("y",B=>B.y0).attr("width",B=>Math.max(1,B.x1-B.x0)).attr("height",B=>Math.max(1,B.y1-B.y0))}),N.select("text").datum(k=>k).each(function(k){const B=n.getSankeyLabel(k),G=Zt(this);B?(G.text(B.text).attr("dy",{middle:".35em",top:".71em",bottom:"0"}[B.baseline]).style("text-anchor",{left:"start",right:"end",center:"middle"}[B.align]),n.$T(G,t).attr("x",B.x).attr("y",B.y)):G.text(null)}),n.updateSankeyFocus()}}),oF={sankey_rotated:!1,sankey_node_width:20,sankey_node_padding:10,sankey_node_align:"justify",sankey_node_sort:"auto",sankey_node_border_width:0,sankey_node_border_color:"#000",sankey_link_color:"source",sankey_link_opacity:void 0,sankey_iterations:6,sankey_label_show:!0,sankey_label_format:void 0};let Cx=()=>(Ve(dn.prototype,[sF]),Br.setOptions([oF]),ja("sankey",{hooks:QD}),(Cx=()=>"sankey")());var lF={scatter_zerobased:!1};let wx=()=>(Ui([Ya,bl],[Sa,lF]),(wx=()=>ne.SCATTER)());function cF(t,e){return t.parent===e.parent?1:2}function uF(t){return t.reduce(fF,0)/t.length}function fF(t,e){return t+e.x}function dF(t){return 1+t.reduce(hF,0)}function hF(t,e){return Math.max(t,e.y)}function gF(t){for(var e;e=t.children;)t=e[0];return t}function vF(t){for(var e;e=t.children;)t=e[e.length-1];return t}function KN(){var t=cF,e=1,n=1,r=!1;function a(s){var o,l=0;s.eachAfter(function(h){var v=h.children;v?(h.x=uF(v),h.y=dF(v)):(h.x=o?l+=t(h,o):0,h.y=0,o=h)});var c=gF(s),u=vF(s),f=c.x-t(c,u)/2,d=u.x+t(u,c)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*e,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-f)/(d-f)*e,h.y=(1-(s.y?h.y/s.y:1))*n})}return a.separation=function(s){return arguments.length?(t=s,a):t},a.size=function(s){return arguments.length?(r=!1,e=+s[0],n=+s[1],a):r?null:[e,n]},a.nodeSize=function(s){return arguments.length?(r=!0,e=+s[0],n=+s[1],a):r?[e,n]:null},a}function pF(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function mF(){return this.eachAfter(pF)}function yF(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function xF(t,e){for(var n=this,r=[n],a,s,o=-1;n=r.pop();)if(t.call(e,n,++o,this),a=n.children)for(s=a.length-1;s>=0;--s)r.push(a[s]);return this}function bF(t,e){for(var n=this,r=[n],a=[],s,o,l,c=-1;n=r.pop();)if(a.push(n),s=n.children)for(o=0,l=s.length;o<l;++o)r.push(s[o]);for(;n=a.pop();)t.call(e,n,++c,this);return this}function TF(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function SF(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,a=r&&r.length;--a>=0;)n+=r[a].value;e.value=n})}function AF(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function EF(t){for(var e=this,n=CF(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var a=r.length;t!==n;)r.splice(a,0,t),t=t.parent;return r}function CF(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),a=null;for(t=n.pop(),e=r.pop();t===e;)a=t,t=n.pop(),e=r.pop();return a}function wF(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function IF(){return Array.from(this)}function RF(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function OF(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*PF(){var t=this,e,n=[t],r,a,s;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(a=0,s=r.length;a<s;++a)n.push(r[a]);while(n.length)}function Wf(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=DF)):e===void 0&&(e=LF);for(var n=new Vi(t),r,a=[n],s,o,l,c;r=a.pop();)if((o=e(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,l=c-1;l>=0;--l)a.push(s=o[l]=new Vi(o[l])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(Ix)}function MF(){return Wf(this).eachBefore(FF)}function LF(t){return t.children}function DF(t){return Array.isArray(t)?t[1]:null}function FF(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ix(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Vi(t){this.data=t,this.depth=this.height=0,this.parent=null}Vi.prototype=Wf.prototype={constructor:Vi,count:mF,each:yF,eachAfter:bF,eachBefore:xF,find:TF,sum:SF,sort:AF,path:EF,ancestors:wF,descendants:IF,leaves:RF,links:OF,copy:MF,[Symbol.iterator]:PF};function Dl(t){return t==null?null:Rx(t)}function Rx(t){if(typeof t!="function")throw new Error;return t}function Ja(){return 0}function ji(t){return function(){return t}}const NF=1664525,$F=1013904223,Ox=4294967296;function Gf(){let t=1;return()=>(t=(NF*t+$F)%Ox)/Ox}function BF(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function kF(t,e){let n=t.length,r,a;for(;n;)a=e()*n--|0,r=t[n],t[n]=t[a],t[a]=r;return t}function ZN(t){return Px(t,Gf())}function Px(t,e){for(var n=0,r=(t=kF(Array.from(t),e)).length,a=[],s,o;n<r;)s=t[n],o&&Mx(o,s)?++n:(o=UF(a=zF(a,s)),n=0);return o}function zF(t,e){var n,r;if(Hf(e,t))return[e];for(n=0;n<t.length;++n)if(Fl(e,t[n])&&Hf(Xs(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(Fl(Xs(t[n],t[r]),e)&&Fl(Xs(t[n],e),t[r])&&Fl(Xs(t[r],e),t[n])&&Hf(Lx(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Fl(t,e){var n=t.r-e.r,r=e.x-t.x,a=e.y-t.y;return n<0||n*n<r*r+a*a}function Mx(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,a=e.y-t.y;return n>0&&n*n>r*r+a*a}function Hf(t,e){for(var n=0;n<e.length;++n)if(!Mx(t,e[n]))return!1;return!0}function UF(t){switch(t.length){case 1:return WF(t[0]);case 2:return Xs(t[0],t[1]);case 3:return Lx(t[0],t[1],t[2])}}function WF(t){return{x:t.x,y:t.y,r:t.r}}function Xs(t,e){var n=t.x,r=t.y,a=t.r,s=e.x,o=e.y,l=e.r,c=s-n,u=o-r,f=l-a,d=Math.sqrt(c*c+u*u);return{x:(n+s+c/d*f)/2,y:(r+o+u/d*f)/2,r:(d+a+l)/2}}function Lx(t,e,n){var r=t.x,a=t.y,s=t.r,o=e.x,l=e.y,c=e.r,u=n.x,f=n.y,d=n.r,h=r-o,v=r-u,b=a-l,x=a-f,E=c-s,w=d-s,N=r*r+a*a-s*s,k=N-o*o-l*l+c*c,B=N-u*u-f*f+d*d,G=v*b-h*x,V=(b*B-x*k)/(G*2)-r,Z=(x*E-b*w)/G,Y=(v*k-h*B)/(G*2)-a,et=(h*w-v*E)/G,it=Z*Z+et*et-1,at=2*(s+V*Z+Y*et),ot=V*V+Y*Y-s*s,st=-(Math.abs(it)>1e-6?(at+Math.sqrt(at*at-4*it*ot))/(2*it):ot/at);return{x:r+V+Z*st,y:a+Y+et*st,r:st}}function Dx(t,e,n){var r=t.x-e.x,a,s,o=t.y-e.y,l,c,u=r*r+o*o;u?(s=e.r+n.r,s*=s,c=t.r+n.r,c*=c,s>c?(a=(u+c-s)/(2*u),l=Math.sqrt(Math.max(0,c/u-a*a)),n.x=t.x-a*r-l*o,n.y=t.y-a*o+l*r):(a=(u+s-c)/(2*u),l=Math.sqrt(Math.max(0,s/u-a*a)),n.x=e.x+a*r-l*o,n.y=e.y+a*o+l*r)):(n.x=e.x+n.r,n.y=e.y)}function Fx(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,a=e.y-t.y;return n>0&&n*n>r*r+a*a}function Nx(t){var e=t._,n=t.next._,r=e.r+n.r,a=(e.x*n.r+n.x*e.r)/r,s=(e.y*n.r+n.y*e.r)/r;return a*a+s*s}function Nl(t){this._=t,this.next=null,this.previous=null}function $x(t,e){if(!(s=(t=BF(t)).length))return 0;var n,r,a,s,o,l,c,u,f,d,h;if(n=t[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;Dx(r,n,a=t[2]),n=new Nl(n),r=new Nl(r),a=new Nl(a),n.next=a.previous=r,r.next=n.previous=a,a.next=r.previous=n;t:for(c=3;c<s;++c){Dx(n._,r._,a=t[c]),a=new Nl(a),u=r.next,f=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(Fx(u._,a._)){r=u,n.next=r,r.previous=n,--c;continue t}d+=u._.r,u=u.next}else{if(Fx(f._,a._)){n=f,n.next=r,r.previous=n,--c;continue t}h+=f._.r,f=f.previous}while(u!==f.next);for(a.previous=n,a.next=r,n.next=r.previous=r=a,o=Nx(n);(a=a.next)!==r;)(l=Nx(a))<o&&(n=a,o=l);r=n.next}for(n=[r._],a=r;(a=a.next)!==r;)n.push(a._);for(a=Px(n,e),c=0;c<s;++c)n=t[c],n.x-=a.x,n.y-=a.y;return a.r}function JN(t){return $x(t,Gf()),t}function GF(t){return Math.sqrt(t.value)}function QN(){var t=null,e=1,n=1,r=Ja;function a(s){const o=Gf();return s.x=e/2,s.y=n/2,t?s.eachBefore(Bx(t)).eachAfter(Xf(r,.5,o)).eachBefore(kx(1)):s.eachBefore(Bx(GF)).eachAfter(Xf(Ja,1,o)).eachAfter(Xf(r,s.r/Math.min(e,n),o)).eachBefore(kx(Math.min(e,n)/(2*s.r))),s}return a.radius=function(s){return arguments.length?(t=Dl(s),a):t},a.size=function(s){return arguments.length?(e=+s[0],n=+s[1],a):[e,n]},a.padding=function(s){return arguments.length?(r=typeof s=="function"?s:ji(+s),a):r},a}function Bx(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Xf(t,e,n){return function(r){if(a=r.children){var a,s,o=a.length,l=t(r)*e||0,c;if(l)for(s=0;s<o;++s)a[s].r+=l;if(c=$x(a,n),l)for(s=0;s<o;++s)a[s].r-=l;r.r=c+l}}}function kx(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 zx(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 Vs(t,e,n,r,a){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(r-e)/t.value;++l<c;)o=s[l],o.y0=n,o.y1=a,o.x0=e,o.x1=e+=o.value*u}function _N(){var t=1,e=1,n=0,r=!1;function a(o){var l=o.height+1;return o.x0=o.y0=n,o.x1=t,o.y1=e/l,o.eachBefore(s(e,l)),r&&o.eachBefore(zx),o}function s(o,l){return function(c){c.children&&Vs(c,c.x0,o*(c.depth+1)/l,c.x1,o*(c.depth+2)/l);var u=c.x0,f=c.y0,d=c.x1-n,h=c.y1-n;d<u&&(u=d=(u+d)/2),h<f&&(f=h=(f+h)/2),c.x0=u,c.y0=f,c.x1=d,c.y1=h}}return a.round=function(o){return arguments.length?(r=!!o,a):r},a.size=function(o){return arguments.length?(t=+o[0],e=+o[1],a):[t,e]},a.padding=function(o){return arguments.length?(n=+o,a):n},a}var HF={depth:-1},Ux={},Vf={};function XF(t){return t.id}function VF(t){return t.parentId}function qN(){var t=XF,e=VF,n;function r(a){var s=Array.from(a),o=t,l=e,c,u,f,d,h,v,b,x,E=new Map;if(n!=null){const w=s.map((B,G)=>jF(n(B,G,a))),N=w.map(Wx),k=new Set(w).add("");for(const B of N)k.has(B)||(k.add(B),w.push(B),N.push(Wx(B)),s.push(Vf));o=(B,G)=>w[G],l=(B,G)=>N[G]}for(f=0,c=s.length;f<c;++f)u=s[f],v=s[f]=new Vi(u),(b=o(u,f,a))!=null&&(b+="")&&(x=v.id=b,E.set(x,E.has(x)?Ux:v)),(b=l(u,f,a))!=null&&(b+="")&&(v.parent=b);for(f=0;f<c;++f)if(v=s[f],b=v.parent){if(h=E.get(b),!h)throw new Error("missing: "+b);if(h===Ux)throw new Error("ambiguous: "+b);h.children?h.children.push(v):h.children=[v],v.parent=h}else{if(d)throw new Error("multiple roots");d=v}if(!d)throw new Error("no root");if(n!=null){for(;d.data===Vf&&d.children.length===1;)d=d.children[0],--c;for(let w=s.length-1;w>=0&&(v=s[w],v.data===Vf);--w)v.data=null}if(d.parent=HF,d.eachBefore(function(w){w.depth=w.parent.depth+1,--c}).eachBefore(Ix),d.parent=null,c>0)throw new Error("cycle");return d}return r.id=function(a){return arguments.length?(t=Dl(a),r):t},r.parentId=function(a){return arguments.length?(e=Dl(a),r):e},r.path=function(a){return arguments.length?(n=Dl(a),r):n},r}function jF(t){t=`${t}`;let e=t.length;return jf(t,e-1)&&!jf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Wx(t){let e=t.length;if(e<2)return"";for(;--e>1&&!jf(t,e););return t.slice(0,e)}function jf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if((n&1)===0)return!0}return!1}function YF(t,e){return t.parent===e.parent?1:2}function Yf(t){var e=t.children;return e?e[0]:t.t}function Kf(t){var e=t.children;return e?e[e.length-1]:t.t}function KF(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 ZF(t){for(var e=0,n=0,r=t.children,a=r.length,s;--a>=0;)s=r[a],s.z+=e,s.m+=e,e+=s.s+(n+=s.c)}function JF(t,e,n){return t.a.parent===e.parent?t.a:n}function $l(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}$l.prototype=Object.create(Vi.prototype);function QF(t){for(var e=new $l(t,0),n,r=[e],a,s,o,l;n=r.pop();)if(s=n._.children)for(n.children=new Array(l=s.length),o=l-1;o>=0;--o)r.push(a=n.children[o]=new $l(s[o],o)),a.parent=n;return(e.parent=new $l(null,0)).children=[e],e}function t$(){var t=YF,e=1,n=1,r=null;function a(u){var f=QF(u);if(f.eachAfter(s),f.parent.m=-f.z,f.eachBefore(o),r)u.eachBefore(c);else{var d=u,h=u,v=u;u.eachBefore(function(N){N.x<d.x&&(d=N),N.x>h.x&&(h=N),N.depth>v.depth&&(v=N)});var b=d===h?1:t(d,h)/2,x=b-d.x,E=e/(h.x+b+x),w=n/(v.depth||1);u.eachBefore(function(N){N.x=(N.x+x)*E,N.y=N.depth*w})}return u}function s(u){var f=u.children,d=u.parent.children,h=u.i?d[u.i-1]:null;if(f){ZF(u);var v=(f[0].z+f[f.length-1].z)/2;h?(u.z=h.z+t(u._,h._),u.m=u.z-v):u.z=v}else h&&(u.z=h.z+t(u._,h._));u.parent.A=l(u,h,u.parent.A||d[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function l(u,f,d){if(f){for(var h=u,v=u,b=f,x=h.parent.children[0],E=h.m,w=v.m,N=b.m,k=x.m,B;b=Kf(b),h=Yf(h),b&&h;)x=Yf(x),v=Kf(v),v.a=u,B=b.z+N-h.z-E+t(b._,h._),B>0&&(KF(JF(b,u,d),u,B),E+=B,w+=B),N+=b.m,E+=h.m,k+=x.m,w+=v.m;b&&!Kf(v)&&(v.t=b,v.m+=N-w),h&&!Yf(x)&&(x.t=h,x.m+=E-k,d=u)}return d}function c(u){u.x*=e,u.y=u.depth*n}return a.separation=function(u){return arguments.length?(t=u,a):t},a.size=function(u){return arguments.length?(r=!1,e=+u[0],n=+u[1],a):r?null:[e,n]},a.nodeSize=function(u){return arguments.length?(r=!0,e=+u[0],n=+u[1],a):r?[e,n]:null},a}function Bl(t,e,n,r,a){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(a-n)/t.value;++l<c;)o=s[l],o.x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}var Gx=(1+Math.sqrt(5))/2;function Hx(t,e,n,r,a,s){for(var o=[],l=e.children,c,u,f=0,d=0,h=l.length,v,b,x=e.value,E,w,N,k,B,G,V;f<h;){v=a-n,b=s-r;do E=l[d++].value;while(!E&&d<h);for(w=N=E,G=Math.max(b/v,v/b)/(x*t),V=E*E*G,B=Math.max(N/V,V/w);d<h;++d){if(E+=u=l[d].value,u<w&&(w=u),u>N&&(N=u),V=E*E*G,k=Math.max(N/V,V/w),k>B){E-=u;break}B=k}o.push(c={value:E,dice:v<b,children:l.slice(f,d)}),c.dice?Vs(c,n,r,a,x?r+=b*E/x:s):Bl(c,n,r,x?n+=v*E/x:a,s),x-=E,f=d}return o}var Xx=(function t(e){function n(r,a,s,o,l){Hx(e,r,a,s,o,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Gx);function _F(){var t=Xx,e=!1,n=1,r=1,a=[0],s=Ja,o=Ja,l=Ja,c=Ja,u=Ja;function f(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),a=[0],e&&h.eachBefore(zx),h}function d(h){var v=a[h.depth],b=h.x0+v,x=h.y0+v,E=h.x1-v,w=h.y1-v;E<b&&(b=E=(b+E)/2),w<x&&(x=w=(x+w)/2),h.x0=b,h.y0=x,h.x1=E,h.y1=w,h.children&&(v=a[h.depth+1]=s(h)/2,b+=u(h)-v,x+=o(h)-v,E-=l(h)-v,w-=c(h)-v,E<b&&(b=E=(b+E)/2),w<x&&(x=w=(x+w)/2),t(h,b,x,E,w))}return f.round=function(h){return arguments.length?(e=!!h,f):e},f.size=function(h){return arguments.length?(n=+h[0],r=+h[1],f):[n,r]},f.tile=function(h){return arguments.length?(t=Rx(h),f):t},f.padding=function(h){return arguments.length?f.paddingInner(h).paddingOuter(h):f.paddingInner()},f.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:ji(+h),f):s},f.paddingOuter=function(h){return arguments.length?f.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):f.paddingTop()},f.paddingTop=function(h){return arguments.length?(o=typeof h=="function"?h:ji(+h),f):o},f.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:ji(+h),f):l},f.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:ji(+h),f):c},f.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:ji(+h),f):u},f}function Vx(t,e,n,r,a){var s=t.children,o,l=s.length,c,u=new Array(l+1);for(u[0]=c=o=0;o<l;++o)u[o+1]=c+=s[o].value;f(0,l,t.value,e,n,r,a);function f(d,h,v,b,x,E,w){if(d>=h-1){var N=s[d];N.x0=b,N.y0=x,N.x1=E,N.y1=w;return}for(var k=u[d],B=v/2+k,G=d+1,V=h-1;G<V;){var Z=G+V>>>1;u[Z]<B?G=Z+1:V=Z}B-u[G-1]<u[G]-B&&d+1<G&&--G;var Y=u[G]-k,et=v-Y;if(E-b>w-x){var it=v?(b*et+E*Y)/v:E;f(d,G,Y,b,x,it,w),f(G,h,et,it,x,E,w)}else{var at=v?(x*et+w*Y)/v:w;f(d,G,Y,b,x,E,at),f(G,h,et,b,at,E,w)}}}function qF(t,e,n,r,a){(t.depth&1?Bl:Vs)(t,e,n,r,a)}var t3=(function t(e){function n(r,a,s,o,l){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,d,h=-1,v,b=c.length,x=r.value;++h<b;){for(u=c[h],f=u.children,d=u.value=0,v=f.length;d<v;++d)u.value+=f[d].value;u.dice?Vs(u,a,s,o,x?s+=(l-s)*u.value/x:l):Bl(u,a,s,x?a+=(o-a)*u.value/x:o,l),x-=u.value}else r._squarify=c=Hx(e,r,a,s,o,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Gx);function e3(t){const e=this;return t.map(n=>{const{id:r,values:a}=n,{value:s}=a[0];return{name:r,id:r,value:s,ratio:e.getRatio("treemap",a[0])}})}var n3={initTreemapLayout(){this.treemap=_F().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:a,height:s}}}=n,o=(e={binary:Vx,dice:Vs,slice:Bl,sliceDice:qF,squarify:Xx,resquarify:t3}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:Vx;return(l,c,u,f,d)=>{o(l,0,0,a,s);for(const h of l.children)h.x0=c+h.x0/a*(f-c),h.x1=c+h.x1/a*(f-c),h.y0=u+h.y0/s*(d-u),h.y1=u+h.y1/s*(d-u)}},getTreemapData(t){const e=this;return{name:"root",children:e3.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},getTreemapRoot(t){const e=this,n=e.getTreemapData(t!=null?t:e.data.targets),r=Wf(n).sum(s=>s.value),a=e.getSortCompareFn(!0);return e.treemap||e.initTreemapLayout(),e.treemap(a?r.sort(a):r)}},r3=Object.defineProperty,a3=Object.defineProperties,i3=Object.getOwnPropertyDescriptors,jx=Object.getOwnPropertySymbols,s3=Object.prototype.hasOwnProperty,o3=Object.prototype.propertyIsEnumerable,Yx=(t,e,n)=>e in t?r3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,l3=(t,e)=>{for(var n in e||(e={}))s3.call(e,n)&&Yx(t,n,e[n]);if(jx)for(var n of jx(e))o3.call(e,n)&&Yx(t,n,e[n]);return t},c3=(t,e)=>a3(t,i3(e));function u3(t,e){const n=this;t.selectAll("g").attr("transform",r=>{const a=I(n,r,e);return`translate(${a.x},${a.y})`}).select("rect").attr("width",r=>I(n,r,e).w).attr("height",r=>I(n,r,e).h)}var f3=c3(l3({},n3),{initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:r},clip:a,datetimeId:s}}=t;a.id=`${s}-clip`,t.initTreemapLayout(),e.defs.append("clipPath").attr("id",a.id).append("rect").attr("width",n).attr("height",r),e.treemap=e.main.select(`.${Oe.chart}`).attr("clip-path",`url(#${a.id})`).append("g").classed(kv.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:r}=t,a=s=>{var o;const l=s.isTrusted?s.target:(o=r.eventReceiver.rect)==null?void 0:o.node();let c;return l&&/^rect$/i.test(l.tagName)&&(r.event=s,c=Zt(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const s=r.inputType==="touch";e.treemap.on(s?"touchstart":"mouseover mousemove",o=>{const l=a(o);l&&(t.showTooltip([l],o.currentTarget),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=a(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))}).on("click",o=>{var l;const{target:c}=o,u=/^rect$/i.test(c.tagName)?(l=Zt(c).datum())==null?void 0:l.data:null;u&&n.data_onclick.bind(t.api)(u,c)})}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,r=[e.getTreemapRoot(t!=null?t:e.data.targets)];n.data(e.filterNullish(r))},updateTreemap(t){const e=this,{$el:n,$T:r}=e,a=n.treemap.datum(),s=e.getChartClass("Treemap"),o=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(a.children);r(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",s).select("rect").attr("class",o).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e}=t,n={};return e.treemap.selectAll("g").each(r=>{const a=I(t,r);n[r.data.name]=[[a.x,a.y],[a.x+a.w,a.y+a.h]]}),r=>n[r.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:r,height:a}}}=e;return n.defs.select("rect").attr("width",r).attr("height",a),[e.$T(n.treemap,t,Vn()).call(u3.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{$el:{treemap:n},config:r,scale:{x:a,y:s}}=e,{id:o,value:l}=t,c=r.treemap_label_format,u=e.getRatio("treemap",t),f=(u*100).toFixed(2),d=r.treemap_label_show&&Qu.call(e,u,"treemap")?null:"0",h=n.selectAll("g").filter(x=>x.data.id===o).datum();let v=0,b=0;if(h){const{x0:x,x1:E,y0:w,y1:N}=h;v=a(E)-a(x),b=s(N)-s(w)}return function(x){return x.style("opacity",d),M(c)?c.bind(e.api)(l,u,o,{width:v,height:b}):`${o}
|
|
61
|
+
${f}%`}}}),d3={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};let Kx=()=>(Ui([f3],[d3]),(Kx=()=>ne.TREEMAP)()),Zf=Object.create(null);const Zx={version:"4.2.0-next.1",generate(t){const e=dr(Object.create(null),Zf,t),n=new Gn(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults(t){return rt(t)&&(Zf=t),Zf},instance:[],plugin:{}};Object.keys(p).forEach(t=>p[t]()),Object.keys(g).forEach(t=>g[t]()),bm(),Tm(),Ve(dn.prototype,f1),Dm(),ff("grid",jA),Ve(dn.prototype,EO),ff("subchart",CO),Ve(dn.prototype,iO),ff("selection",sO),Qm(),pm(),qp(),xm("boxplot",{canvas:r1}),ja("bullet",{canvas:i1}),ja("heatmap",{canvas:nE}),ja("sankey",{canvas:rE}),PO("treemap",wO)})],Ys={};function nr(S){var P=Ys[S];if(P!==void 0)return P.exports;var i=Ys[S]={exports:{}};return Qf[S].call(i.exports,i,i.exports,nr),i.exports}nr.d=function(S,P){for(var i in P)nr.o(P,i)&&!nr.o(S,i)&&Object.defineProperty(S,i,{enumerable:!0,get:P[i]})},nr.o=function(S,P){return Object.prototype.hasOwnProperty.call(S,P)},nr.r=function(S){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})},nr(0);var Ks=nr(641);return Ks})()});
|