@antv/g2 5.0.0-alpha.4 → 5.0.0-beta.10
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/README.md +29 -27
- package/dist/g2-lite.min.js +5 -2
- package/dist/g2.min.js +5 -2
- package/esm/animation/morphing.js +32 -10
- package/esm/animation/morphing.js.map +1 -1
- package/esm/animation/waveIn.js +1 -12
- package/esm/animation/waveIn.js.map +1 -1
- package/esm/api/chart.d.ts +16 -7
- package/esm/api/chart.js +66 -29
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/base.d.ts +21 -0
- package/esm/api/composition/base.js +59 -0
- package/esm/api/composition/base.js.map +1 -0
- package/esm/api/composition/facetCircle.d.ts +2 -3
- package/esm/api/composition/facetCircle.js +2 -2
- package/esm/api/composition/facetCircle.js.map +1 -1
- package/esm/api/composition/facetRect.d.ts +2 -3
- package/esm/api/composition/facetRect.js +2 -2
- package/esm/api/composition/facetRect.js.map +1 -1
- package/esm/api/composition/geoPath.d.ts +5 -7
- package/esm/api/composition/geoPath.js +4 -5
- package/esm/api/composition/geoPath.js.map +1 -1
- package/esm/api/composition/geoView.d.ts +4 -6
- package/esm/api/composition/geoView.js +4 -5
- package/esm/api/composition/geoView.js.map +1 -1
- package/esm/api/composition/index.d.ts +2 -1
- package/esm/api/composition/index.js +2 -1
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +2 -3
- package/esm/api/composition/repeatMatrix.js +2 -2
- package/esm/api/composition/repeatMatrix.js.map +1 -1
- package/esm/api/composition/spaceFlex.d.ts +2 -3
- package/esm/api/composition/spaceFlex.js +2 -2
- package/esm/api/composition/spaceFlex.js.map +1 -1
- package/esm/api/composition/spaceLayer.d.ts +2 -3
- package/esm/api/composition/spaceLayer.js +2 -2
- package/esm/api/composition/spaceLayer.js.map +1 -1
- package/esm/api/composition/timingKeyframe.d.ts +2 -3
- package/esm/api/composition/timingKeyframe.js +2 -2
- package/esm/api/composition/timingKeyframe.js.map +1 -1
- package/esm/api/composition/view.d.ts +5 -5
- package/esm/api/composition/view.js +6 -6
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/mark/base.d.ts +22 -0
- package/esm/api/mark/base.js +54 -0
- package/esm/api/mark/base.js.map +1 -0
- package/esm/api/mark/mark.d.ts +29 -29
- package/esm/api/mark/mark.js +32 -29
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +5 -2
- package/esm/api/node.d.ts +2 -1
- package/esm/api/node.js +8 -9
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.js +3 -22
- package/esm/api/props.js.map +1 -1
- package/esm/component/axis.d.ts +5 -8
- package/esm/component/axis.js +182 -234
- package/esm/component/axis.js.map +1 -1
- package/esm/component/axisArc.d.ts +7 -0
- package/esm/component/axisArc.js +9 -0
- package/esm/component/axisArc.js.map +1 -0
- package/esm/component/axisRadar.d.ts +9 -0
- package/esm/component/axisRadar.js +45 -0
- package/esm/component/axisRadar.js.map +1 -0
- package/esm/component/axisX.d.ts +2 -1
- package/esm/component/axisX.js +5 -4
- package/esm/component/axisX.js.map +1 -1
- package/esm/component/axisY.d.ts +1 -1
- package/esm/component/axisY.js +4 -4
- package/esm/component/axisY.js.map +1 -1
- package/esm/component/index.d.ts +14 -0
- package/esm/component/index.js +9 -0
- package/esm/component/index.js.map +1 -1
- package/esm/component/legendCategory.d.ts +5 -4
- package/esm/component/legendCategory.js +87 -55
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.d.ts +4 -2
- package/esm/component/legendContinuous.js +87 -25
- package/esm/component/legendContinuous.js.map +1 -1
- package/esm/component/legendContinuousBlock.d.ts +4 -0
- package/esm/component/legendContinuousBlock.js +6 -0
- package/esm/component/legendContinuousBlock.js.map +1 -0
- package/esm/component/legendContinuousBlockSize.d.ts +4 -0
- package/esm/component/legendContinuousBlockSize.js +6 -0
- package/esm/component/legendContinuousBlockSize.js.map +1 -0
- package/esm/component/legendContinuousSize.d.ts +4 -0
- package/esm/component/legendContinuousSize.js +10 -0
- package/esm/component/legendContinuousSize.js.map +1 -0
- package/esm/component/scrollbar.d.ts +9 -0
- package/esm/component/scrollbar.js +36 -0
- package/esm/component/scrollbar.js.map +1 -0
- package/esm/component/scrollbarX.d.ts +7 -0
- package/esm/component/scrollbarX.js +9 -0
- package/esm/component/scrollbarX.js.map +1 -0
- package/esm/component/scrollbarY.d.ts +7 -0
- package/esm/component/scrollbarY.js +9 -0
- package/esm/component/scrollbarY.js.map +1 -0
- package/esm/component/slider.d.ts +9 -0
- package/esm/component/slider.js +47 -0
- package/esm/component/slider.js.map +1 -0
- package/esm/component/sliderX.d.ts +7 -0
- package/esm/component/sliderX.js +9 -0
- package/esm/component/sliderX.js.map +1 -0
- package/esm/component/sliderY.d.ts +7 -0
- package/esm/component/sliderY.js +9 -0
- package/esm/component/sliderY.js.map +1 -0
- package/esm/component/title.js +47 -23
- package/esm/component/title.js.map +1 -1
- package/esm/component/utils.d.ts +13 -0
- package/esm/component/utils.js +50 -0
- package/esm/component/utils.js.map +1 -1
- package/esm/composition/facetCircle.js +2 -2
- package/esm/composition/facetCircle.js.map +1 -1
- package/esm/composition/facetRect.js +6 -8
- package/esm/composition/facetRect.js.map +1 -1
- package/esm/composition/mark.js +5 -3
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/repeatMatrix.js +4 -4
- package/esm/composition/repeatMatrix.js.map +1 -1
- package/esm/composition/view.js +8 -4
- package/esm/composition/view.js.map +1 -1
- package/esm/coordinate/fisheye.js +1 -1
- package/esm/coordinate/fisheye.js.map +1 -1
- package/esm/coordinate/index.d.ts +5 -13
- package/esm/coordinate/index.js +4 -8
- package/esm/coordinate/index.js.map +1 -1
- package/esm/coordinate/polar.d.ts +6 -0
- package/esm/coordinate/polar.js +18 -6
- package/esm/coordinate/polar.js.map +1 -1
- package/esm/coordinate/radar.d.ts +7 -0
- package/esm/coordinate/radar.js +14 -0
- package/esm/coordinate/radar.js.map +1 -0
- package/esm/coordinate/radial.d.ts +6 -0
- package/esm/coordinate/radial.js +19 -6
- package/esm/coordinate/radial.js.map +1 -1
- package/esm/coordinate/theta.d.ts +7 -0
- package/esm/coordinate/theta.js +16 -4
- package/esm/coordinate/theta.js.map +1 -1
- package/esm/coordinate/transpose.js +1 -1
- package/esm/coordinate/transpose.js.map +1 -1
- package/esm/data/filter.d.ts +3 -3
- package/esm/data/filter.js.map +1 -1
- package/esm/data/fold.js +4 -10
- package/esm/data/fold.js.map +1 -1
- package/esm/data/index.d.ts +5 -3
- package/esm/data/index.js +2 -1
- package/esm/data/index.js.map +1 -1
- package/esm/data/pick.js +10 -2
- package/esm/data/pick.js.map +1 -1
- package/esm/data/slice.d.ts +8 -0
- package/esm/data/slice.js +10 -0
- package/esm/data/slice.js.map +1 -0
- package/esm/data/sort.d.ts +8 -0
- package/esm/data/sort.js +12 -0
- package/esm/data/sort.js.map +1 -0
- package/esm/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- package/esm/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/esm/geo/d3Projection.js.map +1 -0
- package/esm/geo/geoView.js +4 -4
- package/esm/geo/geoView.js.map +1 -1
- package/esm/interaction/action/service/legendItemSelection.js.map +1 -1
- package/esm/interaction/action/transformer/setItemState.js.map +1 -1
- package/esm/interaction/builtin/activeRegion.d.ts +0 -2
- package/esm/interaction/builtin/brush.d.ts +1 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/builtin/brushVisible.d.ts +1 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +2 -0
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +2 -0
- package/esm/interaction/builtin/elementHighlightByX.d.ts +2 -0
- package/esm/interaction/builtin/ellipsisText.d.ts +0 -3
- package/esm/interaction/builtin/fisheye.d.ts +6 -6
- package/esm/interaction/builtin/tooltip.d.ts +4 -8
- package/esm/interaction/index.d.ts +13 -0
- package/esm/interaction/index.js +12 -30
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushAxisHighlight.d.ts +27 -0
- package/esm/interaction/native/brushAxisHighlight.js +167 -0
- package/esm/interaction/native/brushAxisHighlight.js.map +1 -0
- package/esm/interaction/native/brushFilter.d.ts +14 -0
- package/esm/interaction/native/brushFilter.js +122 -0
- package/esm/interaction/native/brushFilter.js.map +1 -0
- package/esm/interaction/native/brushHighlight.d.ts +41 -0
- package/esm/interaction/native/brushHighlight.js +349 -0
- package/esm/interaction/native/brushHighlight.js.map +1 -0
- package/esm/interaction/native/brushXFilter.d.ts +1 -0
- package/esm/interaction/native/brushXFilter.js +6 -0
- package/esm/interaction/native/brushXFilter.js.map +1 -0
- package/esm/interaction/native/brushXHighlight.d.ts +6 -0
- package/esm/interaction/native/brushXHighlight.js +9 -0
- package/esm/interaction/native/brushXHighlight.js.map +1 -0
- package/esm/interaction/native/brushYFilter.d.ts +1 -0
- package/esm/interaction/native/brushYFilter.js +6 -0
- package/esm/interaction/native/brushYFilter.js.map +1 -0
- package/esm/interaction/native/brushYHighlight.d.ts +6 -0
- package/esm/interaction/native/brushYHighlight.js +9 -0
- package/esm/interaction/native/brushYHighlight.js.map +1 -0
- package/esm/interaction/native/elementHighlight.d.ts +10 -2
- package/esm/interaction/native/elementHighlight.js +87 -24
- package/esm/interaction/native/elementHighlight.js.map +1 -1
- package/esm/interaction/native/elementHighlightByColor.d.ts +0 -3
- package/esm/interaction/native/elementHighlightByColor.js +3 -9
- package/esm/interaction/native/elementHighlightByColor.js.map +1 -1
- package/esm/interaction/native/elementHighlightByX.d.ts +1 -8
- package/esm/interaction/native/elementHighlightByX.js +4 -11
- package/esm/interaction/native/elementHighlightByX.js.map +1 -1
- package/esm/interaction/native/elementSelect.d.ts +7 -2
- package/esm/interaction/native/elementSelect.js +59 -27
- package/esm/interaction/native/elementSelect.js.map +1 -1
- package/esm/interaction/native/elementSelectByColor.js +3 -6
- package/esm/interaction/native/elementSelectByColor.js.map +1 -1
- package/esm/interaction/native/elementSelectByX.js +3 -6
- package/esm/interaction/native/elementSelectByX.js.map +1 -1
- package/esm/interaction/native/fisheye.js +6 -4
- package/esm/interaction/native/fisheye.js.map +1 -1
- package/esm/interaction/native/legendFilter.d.ts +14 -0
- package/esm/interaction/native/legendFilter.js +195 -0
- package/esm/interaction/native/legendFilter.js.map +1 -0
- package/esm/interaction/native/legendHighlight.d.ts +1 -0
- package/esm/interaction/native/legendHighlight.js +87 -0
- package/esm/interaction/native/legendHighlight.js.map +1 -0
- package/esm/interaction/native/poptip.d.ts +5 -0
- package/esm/interaction/native/poptip.js +91 -0
- package/esm/interaction/native/poptip.js.map +1 -0
- package/esm/interaction/native/sliderFilter.d.ts +5 -0
- package/esm/interaction/native/sliderFilter.js +87 -0
- package/esm/interaction/native/sliderFilter.js.map +1 -0
- package/esm/interaction/native/tooltip.d.ts +2 -2
- package/esm/interaction/native/tooltip.js +149 -47
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +24 -5
- package/esm/interaction/native/utils.js +248 -42
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +48 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -8
- package/esm/label-transform/index.js +4 -4
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +18 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +24 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/mark/area.js +2 -2
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/boxplot.js +5 -18
- package/esm/mark/boxplot.js.map +1 -1
- package/esm/mark/cell.js +1 -1
- package/esm/mark/line.js +1 -1
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/pack.js +2 -3
- package/esm/mark/pack.js.map +1 -1
- package/esm/mark/sankey.js +1 -0
- package/esm/mark/sankey.js.map +1 -1
- package/esm/mark/treemap.js +2 -3
- package/esm/mark/treemap.js.map +1 -1
- package/esm/mark/wordCloud.js +2 -2
- package/esm/mark/wordCloud.js.map +1 -1
- package/esm/runtime/component.d.ts +4 -1
- package/esm/runtime/component.js +274 -106
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/coordinate.d.ts +12 -0
- package/esm/runtime/coordinate.js +47 -16
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/layout.d.ts +1 -1
- package/esm/runtime/layout.js +145 -76
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/plot.d.ts +1 -1
- package/esm/runtime/plot.js +155 -69
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +0 -1
- package/esm/runtime/render.js +22 -47
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.d.ts +3 -1
- package/esm/runtime/scale.js +59 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +17 -7
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +38 -11
- package/esm/runtime/types/component.d.ts +13 -8
- package/esm/runtime/types/mark.d.ts +1 -1
- package/esm/runtime/types/options.d.ts +14 -12
- package/esm/runtime/types/scale.d.ts +18 -0
- package/esm/runtime/types/scale.js +19 -0
- package/esm/runtime/types/scale.js.map +1 -0
- package/esm/runtime/types/theme.d.ts +8 -5
- package/esm/shape/area/curve.js +17 -17
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/area/hv.d.ts +3 -0
- package/esm/shape/area/hv.js +9 -0
- package/esm/shape/area/hv.js.map +1 -0
- package/esm/shape/area/hvh.d.ts +3 -0
- package/esm/shape/area/{step.js → hvh.js} +3 -3
- package/esm/shape/area/hvh.js.map +1 -0
- package/esm/shape/area/vh.d.ts +3 -0
- package/esm/shape/area/vh.js +9 -0
- package/esm/shape/area/vh.js.map +1 -0
- package/esm/shape/box/box.js +1 -1
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.js +3 -3
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/image/image.js +2 -2
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/index.d.ts +6 -2
- package/esm/shape/index.js +3 -1
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/color.d.ts +1 -0
- package/esm/shape/interval/color.js +67 -51
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/label/label.js +3 -3
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +18 -0
- package/esm/shape/label/position/default.js +107 -0
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +18 -0
- package/esm/shape/label/position/outside.js +67 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +7 -0
- package/esm/shape/label/position/spider.js +34 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +35 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/shape/line/curve.js +24 -13
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/line/line.js +6 -2
- package/esm/shape/line/line.js.map +1 -1
- package/esm/shape/line/smooth.js +6 -2
- package/esm/shape/line/smooth.js.map +1 -1
- package/esm/shape/lineXY/line.js +2 -2
- package/esm/shape/lineXY/line.js.map +1 -1
- package/esm/shape/link/arc.js +2 -2
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.js +2 -2
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.js +2 -2
- package/esm/shape/link/smooth.js.map +1 -1
- package/esm/shape/link/vhv.js +2 -2
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/point/color.js +1 -1
- package/esm/shape/point/color.js.map +1 -1
- package/esm/shape/polygon/polygon.js +3 -3
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.js +3 -3
- package/esm/shape/polygon/ribbon.js.map +1 -1
- package/esm/shape/text/advance.js +3 -3
- package/esm/shape/text/advance.js.map +1 -1
- package/esm/shape/text/badge.js +3 -3
- package/esm/shape/text/badge.js.map +1 -1
- package/esm/shape/text/text.js +1 -1
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +5 -0
- package/esm/shape/utils.js +14 -2
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.js +3 -3
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/composition.d.ts +9 -7
- package/esm/spec/coordinate.d.ts +17 -33
- package/esm/spec/data.d.ts +32 -10
- package/esm/spec/geometry.d.ts +26 -11
- package/esm/spec/interaction.d.ts +81 -27
- package/esm/spec/labelTransform.d.ts +24 -11
- package/esm/spec/theme.d.ts +5 -2
- package/esm/spec/transform.d.ts +27 -4
- package/esm/spec/utils.d.ts +7 -0
- package/esm/spec/utils.js +2 -0
- package/esm/spec/utils.js.map +1 -0
- package/esm/stdlib/index.js +11 -17
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.d.ts +3 -0
- package/esm/theme/academy.js +404 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/dark.js +163 -100
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.js +177 -101
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/filter.d.ts +7 -0
- package/esm/transform/filter.js +42 -0
- package/esm/transform/filter.js.map +1 -0
- package/esm/transform/groupN.js +2 -0
- package/esm/transform/groupN.js.map +1 -1
- package/esm/transform/index.d.ts +10 -6
- package/esm/transform/index.js +5 -3
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/maybeTooltip.js +3 -1
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/transform/sample.d.ts +8 -0
- package/esm/transform/sample.js +64 -0
- package/esm/transform/sample.js.map +1 -0
- package/esm/transform/{Select.d.ts → select.d.ts} +0 -0
- package/esm/transform/{Select.js → select.js} +2 -14
- package/esm/transform/select.js.map +1 -0
- package/esm/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
- package/esm/transform/{SelectX.js → selectX.js} +3 -3
- package/esm/transform/selectX.js.map +1 -0
- package/esm/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
- package/esm/transform/{SelectY.js → selectY.js} +3 -3
- package/esm/transform/selectY.js.map +1 -0
- package/esm/transform/sort.d.ts +1 -1
- package/esm/transform/sort.js +39 -21
- package/esm/transform/sort.js.map +1 -1
- package/esm/transform/utils/lttb.d.ts +5 -0
- package/esm/transform/utils/lttb.js +56 -0
- package/esm/transform/utils/lttb.js.map +1 -0
- package/esm/utils/angle.d.ts +2 -0
- package/esm/utils/angle.js +7 -0
- package/esm/utils/angle.js.map +1 -0
- package/esm/utils/array.d.ts +8 -0
- package/esm/utils/array.js +35 -0
- package/esm/utils/array.js.map +1 -1
- package/esm/utils/bounds.d.ts +26 -0
- package/esm/utils/bounds.js +41 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/coordinate.d.ts +5 -0
- package/esm/utils/coordinate.js +31 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/event.d.ts +0 -2
- package/esm/utils/event.js +0 -18
- package/esm/utils/event.js.map +1 -1
- package/esm/utils/helper.d.ts +2 -0
- package/esm/utils/helper.js +10 -2
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/scale.d.ts +3 -0
- package/esm/utils/scale.js +30 -0
- package/esm/utils/scale.js.map +1 -0
- package/esm/utils/selection.d.ts +1 -0
- package/esm/utils/selection.js +5 -2
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/size.js +1 -1
- package/esm/utils/size.js.map +1 -1
- package/esm/utils/vector.d.ts +1 -1
- package/esm/utils/vector.js +1 -1
- package/lib/animation/morphing.js +32 -10
- package/lib/animation/morphing.js.map +1 -1
- package/lib/animation/waveIn.js +1 -12
- package/lib/animation/waveIn.js.map +1 -1
- package/lib/api/chart.d.ts +16 -7
- package/lib/api/chart.js +67 -27
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/base.d.ts +21 -0
- package/lib/api/composition/base.js +62 -0
- package/lib/api/composition/base.js.map +1 -0
- package/lib/api/composition/facetCircle.d.ts +2 -3
- package/lib/api/composition/facetCircle.js +2 -2
- package/lib/api/composition/facetCircle.js.map +1 -1
- package/lib/api/composition/facetRect.d.ts +2 -3
- package/lib/api/composition/facetRect.js +2 -2
- package/lib/api/composition/facetRect.js.map +1 -1
- package/lib/api/composition/geoPath.d.ts +5 -7
- package/lib/api/composition/geoPath.js +4 -5
- package/lib/api/composition/geoPath.js.map +1 -1
- package/lib/api/composition/geoView.d.ts +4 -6
- package/lib/api/composition/geoView.js +4 -5
- package/lib/api/composition/geoView.js.map +1 -1
- package/lib/api/composition/index.d.ts +2 -1
- package/lib/api/composition/index.js +3 -1
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +2 -3
- package/lib/api/composition/repeatMatrix.js +2 -2
- package/lib/api/composition/repeatMatrix.js.map +1 -1
- package/lib/api/composition/spaceFlex.d.ts +2 -3
- package/lib/api/composition/spaceFlex.js +2 -2
- package/lib/api/composition/spaceFlex.js.map +1 -1
- package/lib/api/composition/spaceLayer.d.ts +2 -3
- package/lib/api/composition/spaceLayer.js +2 -2
- package/lib/api/composition/spaceLayer.js.map +1 -1
- package/lib/api/composition/timingKeyframe.d.ts +2 -3
- package/lib/api/composition/timingKeyframe.js +2 -2
- package/lib/api/composition/timingKeyframe.js.map +1 -1
- package/lib/api/composition/view.d.ts +5 -5
- package/lib/api/composition/view.js +6 -6
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/mark/base.d.ts +22 -0
- package/lib/api/mark/base.js +58 -0
- package/lib/api/mark/base.js.map +1 -0
- package/lib/api/mark/mark.d.ts +29 -29
- package/lib/api/mark/mark.js +32 -29
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +5 -2
- package/lib/api/node.d.ts +2 -1
- package/lib/api/node.js +8 -9
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.js +3 -22
- package/lib/api/props.js.map +1 -1
- package/lib/component/axis.d.ts +5 -8
- package/lib/component/axis.js +181 -234
- package/lib/component/axis.js.map +1 -1
- package/lib/component/axisArc.d.ts +7 -0
- package/lib/component/axisArc.js +13 -0
- package/lib/component/axisArc.js.map +1 -0
- package/lib/component/axisRadar.d.ts +9 -0
- package/lib/component/axisRadar.js +49 -0
- package/lib/component/axisRadar.js.map +1 -0
- package/lib/component/axisX.d.ts +2 -1
- package/lib/component/axisX.js +6 -4
- package/lib/component/axisX.js.map +1 -1
- package/lib/component/axisY.d.ts +1 -1
- package/lib/component/axisY.js +3 -3
- package/lib/component/axisY.js.map +1 -1
- package/lib/component/index.d.ts +14 -0
- package/lib/component/index.js +20 -1
- package/lib/component/index.js.map +1 -1
- package/lib/component/legendCategory.d.ts +5 -4
- package/lib/component/legendCategory.js +87 -55
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.d.ts +4 -2
- package/lib/component/legendContinuous.js +87 -25
- package/lib/component/legendContinuous.js.map +1 -1
- package/lib/component/legendContinuousBlock.d.ts +4 -0
- package/lib/component/legendContinuousBlock.js +10 -0
- package/lib/component/legendContinuousBlock.js.map +1 -0
- package/lib/component/legendContinuousBlockSize.d.ts +4 -0
- package/lib/component/legendContinuousBlockSize.js +10 -0
- package/lib/component/legendContinuousBlockSize.js.map +1 -0
- package/lib/component/legendContinuousSize.d.ts +4 -0
- package/lib/component/legendContinuousSize.js +14 -0
- package/lib/component/legendContinuousSize.js.map +1 -0
- package/lib/component/scrollbar.d.ts +9 -0
- package/lib/component/scrollbar.js +40 -0
- package/lib/component/scrollbar.js.map +1 -0
- package/lib/component/scrollbarX.d.ts +7 -0
- package/lib/component/scrollbarX.js +13 -0
- package/lib/component/scrollbarX.js.map +1 -0
- package/lib/component/scrollbarY.d.ts +7 -0
- package/lib/component/scrollbarY.js +13 -0
- package/lib/component/scrollbarY.js.map +1 -0
- package/lib/component/slider.d.ts +9 -0
- package/lib/component/slider.js +51 -0
- package/lib/component/slider.js.map +1 -0
- package/lib/component/sliderX.d.ts +7 -0
- package/lib/component/sliderX.js +13 -0
- package/lib/component/sliderX.js.map +1 -0
- package/lib/component/sliderY.d.ts +7 -0
- package/lib/component/sliderY.js +13 -0
- package/lib/component/sliderY.js.map +1 -0
- package/lib/component/title.js +47 -23
- package/lib/component/title.js.map +1 -1
- package/lib/component/utils.d.ts +13 -0
- package/lib/component/utils.js +55 -1
- package/lib/component/utils.js.map +1 -1
- package/lib/composition/facetCircle.js +2 -2
- package/lib/composition/facetCircle.js.map +1 -1
- package/lib/composition/facetRect.js +6 -8
- package/lib/composition/facetRect.js.map +1 -1
- package/lib/composition/mark.js +5 -3
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/repeatMatrix.js +4 -4
- package/lib/composition/repeatMatrix.js.map +1 -1
- package/lib/composition/view.js +8 -4
- package/lib/composition/view.js.map +1 -1
- package/lib/coordinate/fisheye.js +1 -1
- package/lib/coordinate/fisheye.js.map +1 -1
- package/lib/coordinate/index.d.ts +5 -13
- package/lib/coordinate/index.js +6 -11
- package/lib/coordinate/index.js.map +1 -1
- package/lib/coordinate/polar.d.ts +6 -0
- package/lib/coordinate/polar.js +20 -7
- package/lib/coordinate/polar.js.map +1 -1
- package/lib/coordinate/radar.d.ts +7 -0
- package/lib/coordinate/radar.js +18 -0
- package/lib/coordinate/radar.js.map +1 -0
- package/lib/coordinate/radial.d.ts +6 -0
- package/lib/coordinate/radial.js +21 -7
- package/lib/coordinate/radial.js.map +1 -1
- package/lib/coordinate/theta.d.ts +7 -0
- package/lib/coordinate/theta.js +18 -5
- package/lib/coordinate/theta.js.map +1 -1
- package/lib/coordinate/transpose.js +1 -1
- package/lib/coordinate/transpose.js.map +1 -1
- package/lib/data/filter.d.ts +3 -3
- package/lib/data/filter.js.map +1 -1
- package/lib/data/fold.js +4 -10
- package/lib/data/fold.js.map +1 -1
- package/lib/data/index.d.ts +5 -3
- package/lib/data/index.js +5 -3
- package/lib/data/index.js.map +1 -1
- package/lib/data/pick.js +10 -2
- package/lib/data/pick.js.map +1 -1
- package/lib/data/slice.d.ts +8 -0
- package/lib/data/slice.js +14 -0
- package/lib/data/slice.js.map +1 -0
- package/lib/data/sort.d.ts +8 -0
- package/lib/data/sort.js +17 -0
- package/lib/data/sort.js.map +1 -0
- package/lib/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- package/lib/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/lib/geo/d3Projection.js.map +1 -0
- package/lib/geo/geoView.js +4 -4
- package/lib/geo/geoView.js.map +1 -1
- package/lib/interaction/action/service/legendItemSelection.js.map +1 -1
- package/lib/interaction/action/transformer/setItemState.js.map +1 -1
- package/lib/interaction/builtin/activeRegion.d.ts +0 -2
- package/lib/interaction/builtin/brush.d.ts +1 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/builtin/brushVisible.d.ts +1 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +2 -0
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +2 -0
- package/lib/interaction/builtin/elementHighlightByX.d.ts +2 -0
- package/lib/interaction/builtin/ellipsisText.d.ts +0 -3
- package/lib/interaction/builtin/fisheye.d.ts +6 -6
- package/lib/interaction/builtin/tooltip.d.ts +4 -8
- package/lib/interaction/index.d.ts +13 -0
- package/lib/interaction/index.js +25 -31
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushAxisHighlight.d.ts +27 -0
- package/lib/interaction/native/brushAxisHighlight.js +172 -0
- package/lib/interaction/native/brushAxisHighlight.js.map +1 -0
- package/lib/interaction/native/brushFilter.d.ts +14 -0
- package/lib/interaction/native/brushFilter.js +127 -0
- package/lib/interaction/native/brushFilter.js.map +1 -0
- package/lib/interaction/native/brushHighlight.d.ts +41 -0
- package/lib/interaction/native/brushHighlight.js +355 -0
- package/lib/interaction/native/brushHighlight.js.map +1 -0
- package/lib/interaction/native/brushXFilter.d.ts +1 -0
- package/lib/interaction/native/brushXFilter.js +10 -0
- package/lib/interaction/native/brushXFilter.js.map +1 -0
- package/lib/interaction/native/brushXHighlight.d.ts +6 -0
- package/lib/interaction/native/brushXHighlight.js +14 -0
- package/lib/interaction/native/brushXHighlight.js.map +1 -0
- package/lib/interaction/native/brushYFilter.d.ts +1 -0
- package/lib/interaction/native/brushYFilter.js +10 -0
- package/lib/interaction/native/brushYFilter.js.map +1 -0
- package/lib/interaction/native/brushYHighlight.d.ts +6 -0
- package/lib/interaction/native/brushYHighlight.js +14 -0
- package/lib/interaction/native/brushYHighlight.js.map +1 -0
- package/lib/interaction/native/elementHighlight.d.ts +10 -2
- package/lib/interaction/native/elementHighlight.js +86 -23
- package/lib/interaction/native/elementHighlight.js.map +1 -1
- package/lib/interaction/native/elementHighlightByColor.d.ts +0 -3
- package/lib/interaction/native/elementHighlightByColor.js +1 -7
- package/lib/interaction/native/elementHighlightByColor.js.map +1 -1
- package/lib/interaction/native/elementHighlightByX.d.ts +1 -8
- package/lib/interaction/native/elementHighlightByX.js +2 -9
- package/lib/interaction/native/elementHighlightByX.js.map +1 -1
- package/lib/interaction/native/elementSelect.d.ts +7 -2
- package/lib/interaction/native/elementSelect.js +58 -26
- package/lib/interaction/native/elementSelect.js.map +1 -1
- package/lib/interaction/native/elementSelectByColor.js +1 -4
- package/lib/interaction/native/elementSelectByColor.js.map +1 -1
- package/lib/interaction/native/elementSelectByX.js +1 -4
- package/lib/interaction/native/elementSelectByX.js.map +1 -1
- package/lib/interaction/native/fisheye.js +6 -4
- package/lib/interaction/native/fisheye.js.map +1 -1
- package/lib/interaction/native/legendFilter.d.ts +14 -0
- package/lib/interaction/native/legendFilter.js +205 -0
- package/lib/interaction/native/legendFilter.js.map +1 -0
- package/lib/interaction/native/legendHighlight.d.ts +1 -0
- package/lib/interaction/native/legendHighlight.js +91 -0
- package/lib/interaction/native/legendHighlight.js.map +1 -0
- package/lib/interaction/native/poptip.d.ts +5 -0
- package/lib/interaction/native/poptip.js +95 -0
- package/lib/interaction/native/poptip.js.map +1 -0
- package/lib/interaction/native/sliderFilter.d.ts +5 -0
- package/lib/interaction/native/sliderFilter.js +91 -0
- package/lib/interaction/native/sliderFilter.js.map +1 -0
- package/lib/interaction/native/tooltip.d.ts +2 -2
- package/lib/interaction/native/tooltip.js +146 -44
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +24 -5
- package/lib/interaction/native/utils.js +258 -44
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +52 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -8
- package/lib/label-transform/index.js +9 -9
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +22 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +28 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/mark/area.js +2 -2
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/boxplot.js +5 -18
- package/lib/mark/boxplot.js.map +1 -1
- package/lib/mark/cell.js +1 -1
- package/lib/mark/line.js +1 -1
- package/lib/mark/line.js.map +1 -1
- package/lib/mark/pack.js +2 -3
- package/lib/mark/pack.js.map +1 -1
- package/lib/mark/sankey.js +1 -0
- package/lib/mark/sankey.js.map +1 -1
- package/lib/mark/treemap.js +2 -3
- package/lib/mark/treemap.js.map +1 -1
- package/lib/mark/wordCloud.js +2 -2
- package/lib/mark/wordCloud.js.map +1 -1
- package/lib/runtime/component.d.ts +4 -1
- package/lib/runtime/component.js +276 -108
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/coordinate.d.ts +12 -0
- package/lib/runtime/coordinate.js +51 -17
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/layout.d.ts +1 -1
- package/lib/runtime/layout.js +146 -77
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/plot.d.ts +1 -1
- package/lib/runtime/plot.js +152 -66
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +0 -1
- package/lib/runtime/render.js +24 -47
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.d.ts +3 -1
- package/lib/runtime/scale.js +61 -5
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +17 -7
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +38 -11
- package/lib/runtime/types/component.d.ts +13 -8
- package/lib/runtime/types/mark.d.ts +1 -1
- package/lib/runtime/types/options.d.ts +14 -12
- package/lib/runtime/types/scale.d.ts +18 -0
- package/lib/runtime/types/scale.js +22 -0
- package/lib/runtime/types/scale.js.map +1 -0
- package/lib/runtime/types/theme.d.ts +8 -5
- package/lib/shape/area/curve.js +16 -16
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/area/hv.d.ts +3 -0
- package/lib/shape/area/hv.js +13 -0
- package/lib/shape/area/hv.js.map +1 -0
- package/lib/shape/area/hvh.d.ts +3 -0
- package/lib/shape/area/{step.js → hvh.js} +5 -5
- package/lib/shape/area/hvh.js.map +1 -0
- package/lib/shape/area/vh.d.ts +3 -0
- package/lib/shape/area/vh.js +13 -0
- package/lib/shape/area/vh.js.map +1 -0
- package/lib/shape/box/box.js +1 -1
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.js +3 -3
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/image/image.js +2 -2
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/index.d.ts +6 -2
- package/lib/shape/index.js +7 -3
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/color.d.ts +1 -0
- package/lib/shape/interval/color.js +69 -52
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/label/label.js +3 -3
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +18 -0
- package/lib/shape/label/{position.js → position/default.js} +24 -81
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +18 -0
- package/lib/shape/label/position/outside.js +75 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +7 -0
- package/lib/shape/label/position/spider.js +38 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +39 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/shape/line/curve.js +22 -11
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/line/line.js +5 -1
- package/lib/shape/line/line.js.map +1 -1
- package/lib/shape/line/smooth.js +5 -1
- package/lib/shape/line/smooth.js.map +1 -1
- package/lib/shape/lineXY/line.js +2 -2
- package/lib/shape/lineXY/line.js.map +1 -1
- package/lib/shape/link/arc.js +2 -2
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.js +2 -2
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.js +2 -2
- package/lib/shape/link/smooth.js.map +1 -1
- package/lib/shape/link/vhv.js +2 -2
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/point/color.js +1 -1
- package/lib/shape/point/color.js.map +1 -1
- package/lib/shape/polygon/polygon.js +3 -3
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.js +3 -3
- package/lib/shape/polygon/ribbon.js.map +1 -1
- package/lib/shape/text/advance.js +3 -3
- package/lib/shape/text/advance.js.map +1 -1
- package/lib/shape/text/badge.js +3 -3
- package/lib/shape/text/badge.js.map +1 -1
- package/lib/shape/text/text.js +1 -1
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +5 -0
- package/lib/shape/utils.js +15 -2
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.js +3 -3
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/composition.d.ts +9 -7
- package/lib/spec/coordinate.d.ts +17 -33
- package/lib/spec/data.d.ts +32 -10
- package/lib/spec/geometry.d.ts +26 -11
- package/lib/spec/interaction.d.ts +81 -27
- package/lib/spec/labelTransform.d.ts +24 -11
- package/lib/spec/theme.d.ts +5 -2
- package/lib/spec/transform.d.ts +27 -4
- package/lib/spec/utils.d.ts +7 -0
- package/lib/spec/utils.js +3 -0
- package/lib/spec/utils.js.map +1 -0
- package/lib/stdlib/index.js +3 -4
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.d.ts +3 -0
- package/lib/theme/academy.js +408 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/dark.js +163 -100
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.js +177 -101
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/filter.d.ts +7 -0
- package/lib/transform/filter.js +46 -0
- package/lib/transform/filter.js.map +1 -0
- package/lib/transform/groupN.js +2 -0
- package/lib/transform/groupN.js.map +1 -1
- package/lib/transform/index.d.ts +10 -6
- package/lib/transform/index.js +11 -7
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/maybeTooltip.js +3 -1
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/transform/sample.d.ts +8 -0
- package/lib/transform/sample.js +68 -0
- package/lib/transform/sample.js.map +1 -0
- package/lib/transform/{Select.d.ts → select.d.ts} +0 -0
- package/lib/transform/{Select.js → select.js} +2 -14
- package/lib/transform/select.js.map +1 -0
- package/lib/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
- package/lib/transform/{SelectX.js → selectX.js} +3 -3
- package/lib/transform/selectX.js.map +1 -0
- package/lib/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
- package/lib/transform/{SelectY.js → selectY.js} +3 -3
- package/lib/transform/selectY.js.map +1 -0
- package/lib/transform/sort.d.ts +1 -1
- package/lib/transform/sort.js +38 -20
- package/lib/transform/sort.js.map +1 -1
- package/lib/transform/utils/lttb.d.ts +5 -0
- package/lib/transform/utils/lttb.js +60 -0
- package/lib/transform/utils/lttb.js.map +1 -0
- package/lib/utils/angle.d.ts +2 -0
- package/lib/utils/angle.js +12 -0
- package/lib/utils/angle.js.map +1 -0
- package/lib/utils/array.d.ts +8 -0
- package/lib/utils/array.js +38 -1
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/bounds.d.ts +26 -0
- package/lib/utils/bounds.js +48 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/coordinate.d.ts +5 -0
- package/lib/utils/coordinate.js +37 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/event.d.ts +0 -2
- package/lib/utils/event.js +1 -21
- package/lib/utils/event.js.map +1 -1
- package/lib/utils/helper.d.ts +2 -0
- package/lib/utils/helper.js +12 -2
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/scale.d.ts +3 -0
- package/lib/utils/scale.js +36 -0
- package/lib/utils/scale.js.map +1 -0
- package/lib/utils/selection.d.ts +1 -0
- package/lib/utils/selection.js +5 -2
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/size.js +1 -1
- package/lib/utils/size.js.map +1 -1
- package/lib/utils/vector.d.ts +1 -1
- package/lib/utils/vector.js +1 -1
- package/package.json +9 -8
- package/src/animation/morphing.ts +35 -10
- package/src/animation/waveIn.ts +0 -1
- package/src/api/chart.ts +78 -37
- package/src/api/composition/base.ts +56 -0
- package/src/api/composition/facetCircle.ts +2 -3
- package/src/api/composition/facetRect.ts +2 -3
- package/src/api/composition/geoPath.ts +6 -9
- package/src/api/composition/geoView.ts +6 -9
- package/src/api/composition/index.ts +2 -0
- package/src/api/composition/repeatMatrix.ts +2 -3
- package/src/api/composition/spaceFlex.ts +2 -3
- package/src/api/composition/spaceLayer.ts +2 -3
- package/src/api/composition/timingKeyframe.ts +2 -3
- package/src/api/composition/view.ts +10 -8
- package/src/api/mark/base.ts +58 -0
- package/src/api/mark/mark.ts +34 -30
- package/src/api/mark/types.ts +5 -2
- package/src/api/node.ts +9 -11
- package/src/api/props.ts +4 -25
- package/src/component/axis.ts +341 -366
- package/src/component/axisArc.ts +16 -0
- package/src/component/axisRadar.ts +72 -0
- package/src/component/axisX.ts +7 -4
- package/src/component/axisY.ts +4 -4
- package/src/component/index.ts +14 -0
- package/src/component/legendCategory.ts +182 -76
- package/src/component/legendContinuous.ts +133 -33
- package/src/component/legendContinuousBlock.ts +17 -0
- package/src/component/legendContinuousBlockSize.ts +22 -0
- package/src/component/legendContinuousSize.ts +27 -0
- package/src/component/scrollbar.ts +41 -0
- package/src/component/scrollbarX.ts +16 -0
- package/src/component/scrollbarY.ts +16 -0
- package/src/component/slider.ts +52 -0
- package/src/component/sliderX.ts +16 -0
- package/src/component/sliderY.ts +16 -0
- package/src/component/title.ts +70 -31
- package/src/component/utils.ts +51 -0
- package/src/composition/facetCircle.ts +2 -2
- package/src/composition/facetRect.ts +6 -6
- package/src/composition/mark.ts +8 -4
- package/src/composition/repeatMatrix.ts +10 -3
- package/src/composition/view.ts +22 -2
- package/src/coordinate/fisheye.ts +1 -1
- package/src/coordinate/index.ts +5 -13
- package/src/coordinate/polar.ts +19 -11
- package/src/coordinate/radar.ts +24 -0
- package/src/coordinate/radial.ts +21 -11
- package/src/coordinate/theta.ts +18 -9
- package/src/coordinate/transpose.ts +1 -1
- package/src/data/filter.ts +3 -3
- package/src/data/fold.ts +6 -10
- package/src/data/index.ts +5 -3
- package/src/data/pick.ts +11 -2
- package/src/data/slice.ts +15 -0
- package/src/data/sort.ts +18 -0
- package/src/geo/{d3-projection.ts → d3Projection.ts} +0 -0
- package/src/geo/geoView.ts +4 -4
- package/src/interaction/action/service/legendItemSelection.ts +1 -2
- package/src/interaction/action/transformer/setItemState.ts +2 -3
- package/src/interaction/index.ts +29 -16
- package/src/interaction/native/brushAxisHighlight.ts +207 -0
- package/src/interaction/native/brushFilter.ts +143 -0
- package/src/interaction/native/brushHighlight.ts +447 -0
- package/src/interaction/native/brushXFilter.ts +10 -0
- package/src/interaction/native/brushXHighlight.ts +13 -0
- package/src/interaction/native/brushYFilter.ts +10 -0
- package/src/interaction/native/brushYHighlight.ts +13 -0
- package/src/interaction/native/elementHighlight.ts +99 -15
- package/src/interaction/native/elementHighlightByColor.ts +3 -20
- package/src/interaction/native/elementHighlightByX.ts +4 -23
- package/src/interaction/native/elementSelect.ts +79 -20
- package/src/interaction/native/elementSelectByColor.ts +3 -16
- package/src/interaction/native/elementSelectByX.ts +3 -16
- package/src/interaction/native/fisheye.ts +6 -4
- package/src/interaction/native/legendFilter.ts +214 -0
- package/src/interaction/native/legendHighlight.ts +100 -0
- package/src/interaction/native/poptip.ts +87 -0
- package/src/interaction/native/sliderFilter.ts +112 -0
- package/src/interaction/native/tooltip.ts +191 -49
- package/src/interaction/native/utils.ts +298 -44
- package/src/label-transform/contrastReverse.ts +56 -0
- package/src/label-transform/index.ts +8 -8
- package/src/label-transform/overflowHide.ts +23 -0
- package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +7 -7
- package/src/label-transform/overlapHide.ts +32 -0
- package/src/mark/area.ts +2 -2
- package/src/mark/boxplot.ts +3 -1
- package/src/mark/cell.ts +1 -1
- package/src/mark/line.ts +1 -1
- package/src/mark/pack.ts +1 -1
- package/src/mark/sankey.ts +1 -0
- package/src/mark/treemap.ts +1 -1
- package/src/mark/wordCloud.ts +1 -0
- package/src/runtime/component.ts +393 -143
- package/src/runtime/coordinate.ts +46 -16
- package/src/runtime/layout.ts +206 -97
- package/src/runtime/plot.ts +253 -118
- package/src/runtime/render.ts +33 -72
- package/src/runtime/scale.ts +70 -7
- package/src/runtime/transform.ts +22 -6
- package/src/runtime/types/common.ts +50 -20
- package/src/runtime/types/component.ts +18 -11
- package/src/runtime/types/mark.ts +1 -1
- package/src/runtime/types/options.ts +30 -22
- package/src/runtime/types/scale.ts +20 -0
- package/src/runtime/types/theme.ts +8 -5
- package/src/shape/area/curve.ts +22 -17
- package/src/shape/area/hv.ts +20 -0
- package/src/shape/area/{step.ts → hvh.ts} +3 -3
- package/src/shape/area/vh.ts +20 -0
- package/src/shape/box/box.ts +6 -6
- package/src/shape/connector/connector.ts +3 -4
- package/src/shape/image/image.ts +2 -2
- package/src/shape/index.ts +7 -2
- package/src/shape/interval/color.ts +95 -60
- package/src/shape/label/label.ts +4 -3
- package/src/shape/label/position/area.ts +39 -0
- package/src/shape/label/position/bottom.ts +1 -0
- package/src/shape/label/position/bottomLeft.ts +1 -0
- package/src/shape/label/position/bottomRight.ts +1 -0
- package/src/shape/label/{position.ts → position/default.ts} +26 -110
- package/src/shape/label/position/index.ts +13 -0
- package/src/shape/label/position/inside.ts +1 -0
- package/src/shape/label/position/left.ts +1 -0
- package/src/shape/label/position/outside.ts +121 -0
- package/src/shape/label/position/right.ts +1 -0
- package/src/shape/label/position/spider.ts +39 -0
- package/src/shape/label/position/surround.ts +40 -0
- package/src/shape/label/position/top.ts +1 -0
- package/src/shape/label/position/topLeft.ts +1 -0
- package/src/shape/label/position/topRight.ts +1 -0
- package/src/shape/line/curve.ts +28 -13
- package/src/shape/line/line.ts +6 -2
- package/src/shape/line/smooth.ts +11 -2
- package/src/shape/lineXY/line.ts +2 -2
- package/src/shape/link/arc.ts +2 -2
- package/src/shape/link/link.ts +2 -2
- package/src/shape/link/smooth.ts +2 -2
- package/src/shape/link/vhv.ts +2 -2
- package/src/shape/point/color.ts +6 -5
- package/src/shape/polygon/polygon.ts +3 -3
- package/src/shape/polygon/ribbon.ts +3 -3
- package/src/shape/text/advance.ts +6 -3
- package/src/shape/text/badge.ts +8 -3
- package/src/shape/text/text.ts +1 -1
- package/src/shape/utils.ts +16 -6
- package/src/shape/vector/vector.ts +3 -3
- package/src/spec/action.ts +0 -1
- package/src/spec/composition.ts +8 -8
- package/src/spec/coordinate.ts +25 -51
- package/src/spec/data.ts +36 -11
- package/src/spec/geometry.ts +31 -15
- package/src/spec/interaction.ts +120 -50
- package/src/spec/labelTransform.ts +29 -11
- package/src/spec/theme.ts +6 -2
- package/src/spec/transform.ts +47 -3
- package/src/spec/utils.ts +7 -0
- package/src/stdlib/index.ts +73 -27
- package/src/theme/academy.ts +410 -0
- package/src/theme/dark.ts +164 -101
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +177 -102
- package/src/transform/filter.ts +48 -0
- package/src/transform/groupN.ts +2 -0
- package/src/transform/index.ts +10 -6
- package/src/transform/maybeTooltip.ts +3 -1
- package/src/transform/sample.ts +80 -0
- package/src/transform/select.ts +1 -2
- package/src/transform/selectX.ts +2 -2
- package/src/transform/selectY.ts +2 -2
- package/src/transform/sort.ts +53 -21
- package/src/transform/utils/lttb.ts +73 -0
- package/src/utils/angle.ts +7 -0
- package/src/utils/array.ts +39 -0
- package/src/utils/bounds.ts +52 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/coordinate.ts +41 -0
- package/src/utils/event.ts +0 -26
- package/src/utils/helper.ts +17 -2
- package/src/utils/scale.ts +31 -0
- package/src/utils/selection.ts +7 -2
- package/src/utils/size.ts +1 -1
- package/src/utils/vector.ts +1 -1
- package/esm/coordinate/fisheyeX.d.ts +0 -7
- package/esm/coordinate/fisheyeX.js +0 -6
- package/esm/coordinate/fisheyeX.js.map +0 -1
- package/esm/coordinate/fisheyeY.d.ts +0 -7
- package/esm/coordinate/fisheyeY.js +0 -6
- package/esm/coordinate/fisheyeY.js.map +0 -1
- package/esm/coordinate/reflect.d.ts +0 -7
- package/esm/coordinate/reflect.js +0 -10
- package/esm/coordinate/reflect.js.map +0 -1
- package/esm/coordinate/reflectX.d.ts +0 -7
- package/esm/coordinate/reflectX.js +0 -10
- package/esm/coordinate/reflectX.js.map +0 -1
- package/esm/coordinate/reflectY.d.ts +0 -7
- package/esm/coordinate/reflectY.js +0 -10
- package/esm/coordinate/reflectY.js.map +0 -1
- package/esm/data/subset.d.ts +0 -7
- package/esm/data/subset.js +0 -26
- package/esm/data/subset.js.map +0 -1
- package/esm/geo/d3-projection.js.map +0 -1
- package/esm/label-transform/dodgeY.d.ts +0 -7
- package/esm/label-transform/dodgeY.js.map +0 -1
- package/esm/label-transform/hideOverlap.d.ts +0 -4
- package/esm/label-transform/hideOverlap.js +0 -48
- package/esm/label-transform/hideOverlap.js.map +0 -1
- package/esm/label-transform/spider.d.ts +0 -7
- package/esm/label-transform/spider.js +0 -30
- package/esm/label-transform/spider.js.map +0 -1
- package/esm/label-transform/surround.d.ts +0 -7
- package/esm/label-transform/surround.js +0 -30
- package/esm/label-transform/surround.js.map +0 -1
- package/esm/shape/area/step.d.ts +0 -3
- package/esm/shape/area/step.js.map +0 -1
- package/esm/shape/label/position.d.ts +0 -25
- package/esm/shape/label/position.js +0 -169
- package/esm/shape/label/position.js.map +0 -1
- package/esm/transform/Select.js.map +0 -1
- package/esm/transform/SelectX.js.map +0 -1
- package/esm/transform/SelectY.js.map +0 -1
- package/lib/coordinate/fisheyeX.d.ts +0 -7
- package/lib/coordinate/fisheyeX.js +0 -10
- package/lib/coordinate/fisheyeX.js.map +0 -1
- package/lib/coordinate/fisheyeY.d.ts +0 -7
- package/lib/coordinate/fisheyeY.js +0 -10
- package/lib/coordinate/fisheyeY.js.map +0 -1
- package/lib/coordinate/reflect.d.ts +0 -7
- package/lib/coordinate/reflect.js +0 -14
- package/lib/coordinate/reflect.js.map +0 -1
- package/lib/coordinate/reflectX.d.ts +0 -7
- package/lib/coordinate/reflectX.js +0 -14
- package/lib/coordinate/reflectX.js.map +0 -1
- package/lib/coordinate/reflectY.d.ts +0 -7
- package/lib/coordinate/reflectY.js +0 -14
- package/lib/coordinate/reflectY.js.map +0 -1
- package/lib/data/subset.d.ts +0 -7
- package/lib/data/subset.js +0 -30
- package/lib/data/subset.js.map +0 -1
- package/lib/geo/d3-projection.js.map +0 -1
- package/lib/label-transform/dodgeY.d.ts +0 -7
- package/lib/label-transform/dodgeY.js.map +0 -1
- package/lib/label-transform/hideOverlap.d.ts +0 -4
- package/lib/label-transform/hideOverlap.js +0 -52
- package/lib/label-transform/hideOverlap.js.map +0 -1
- package/lib/label-transform/spider.d.ts +0 -7
- package/lib/label-transform/spider.js +0 -34
- package/lib/label-transform/spider.js.map +0 -1
- package/lib/label-transform/surround.d.ts +0 -7
- package/lib/label-transform/surround.js +0 -34
- package/lib/label-transform/surround.js.map +0 -1
- package/lib/shape/area/step.d.ts +0 -3
- package/lib/shape/area/step.js.map +0 -1
- package/lib/shape/label/position.d.ts +0 -25
- package/lib/shape/label/position.js.map +0 -1
- package/lib/transform/Select.js.map +0 -1
- package/lib/transform/SelectX.js.map +0 -1
- package/lib/transform/SelectY.js.map +0 -1
- package/src/coordinate/fisheyeX.ts +0 -15
- package/src/coordinate/fisheyeY.ts +0 -15
- package/src/coordinate/reflect.ts +0 -15
- package/src/coordinate/reflectX.ts +0 -15
- package/src/coordinate/reflectY.ts +0 -15
- package/src/data/subset.ts +0 -35
- package/src/label-transform/hideOverlap.ts +0 -62
- package/src/label-transform/spider.ts +0 -37
- package/src/label-transform/surround.ts +0 -37
package/dist/g2-lite.min.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(v,F,w){"use strict";const M="main-layer",tt="label-layer",et="element",j="view",nt="plot",rt="component",it="label",at="area";var L=1e-6,O="undefined"!=typeof Float32Array?Float32Array:Array;function C(){var t=new O(9);return O!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var z=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],y=n[4],g=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+y*o+g*c,t[4]=p*i+y*s+g*u,t[5]=p*a+y*l+g*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function W(){var t=new O(16);return O!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function H(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function V(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=y,t[15]=g,t}function q(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function G(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function Y(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*y-f*p,O=u*g-h*p,_=u*e-d*p,S=f*g-h*y,E=f*e-d*y,A=h*e-d*g,P=m*A-v*E+b*S+x*_-w*O+k*M;return P?(t[0]=(s*A-l*E+c*S)*(P=1/P),t[1]=(i*E-r*A-a*S)*P,t[2]=(y*k-g*w+e*x)*P,t[3]=(h*w-f*k-d*x)*P,t[4]=(l*_-o*A-c*O)*P,t[5]=(n*A-i*_+a*O)*P,t[6]=(g*b-p*k-e*v)*P,t[7]=(u*k-h*b+d*v)*P,t[8]=(o*E-s*_+c*M)*P,t[9]=(r*_-n*E-a*M)*P,t[10]=(p*w-y*b+e*m)*P,t[11]=(f*b-u*w-d*m)*P,t[12]=(s*O-o*S-l*M)*P,t[13]=(n*S-r*O+i*M)*P,t[14]=(y*v-p*x-g*m)*P,t[15]=(u*x-f*v+h*m)*P,t):null}function U(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];return(e*o-n*a)*(f*t-h*y)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*y-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*y-f*d)+(r*l-i*s)*(c*p-u*d)}function X(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],y=e[12],g=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*y,t[1]=v*i+b*l+x*h+w*g,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*y,t[5]=v*i+b*l+x*h+w*g,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*y,t[9]=v*i+b*l+x*h+w*g,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*y,t[13]=v*i+b*l+x*h+w*g,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function $(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,y=n[0],g=n[1],n=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*y+s*g+f*n+e[12],t[13]=i*y+l*g+h*n+e[13],t[14]=a*y+c*g+d*n+e[14],t[15]=o*y+u*g+p*n+e[15]),t}function Z(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ot(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function st(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function lt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ct(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ut(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ft(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function ht(t,e){var n=new O(3),r=(ft(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function dt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],y=i[0],g=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+y-(m*y+h*g+p*i),t[13]=n[1]+g-(v*y+e*g+a*i),t[14]=n[2]+i-(u*y+s*g+c*i),t[15]=1,t}function pt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function yt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function gt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var mt=gt;function vt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<L&&Math.abs(c-d)<L&&Math.abs(e-n)<L?q(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function bt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var xt=Object.freeze({__proto__:null,create:W,clone:function(t){var e=new O(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:H,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y){var g=new O(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=f,g[12]=h,g[13]=d,g[14]=p,g[15]=y,g},set:V,identity:q,transpose:G,invert:Y,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(h*e-d*g)-f*(l*e-c*g)+y*(l*d-c*h),t[1]=-(r*(h*e-d*g)-f*(i*e-a*g)+y*(i*d-a*h)),t[2]=r*(l*e-c*g)-s*(i*e-a*g)+y*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*g)-u*(l*e-c*g)+p*(l*d-c*h)),t[5]=n*(h*e-d*g)-u*(i*e-a*g)+p*(i*d-a*h),t[6]=-(n*(l*e-c*g)-o*(i*e-a*g)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*y)-u*(s*e-c*y)+p*(s*d-c*f),t[9]=-(n*(f*e-d*y)-u*(r*e-a*y)+p*(r*d-a*f)),t[10]=n*(s*e-c*y)-o*(r*e-a*y)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*g-h*y)-u*(s*g-l*y)+p*(s*h-l*f)),t[13]=n*(f*g-h*y)-u*(r*g-i*y)+p*(r*h-i*f),t[14]=-(n*(s*g-l*y)-o*(r*g-i*y)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:U,multiply:X,translate:$,scale:Z,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,y,g,m,v,b,x,w,k,M,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<L?null:(O*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],y=e[10],g=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,k=_*r*i-O*S,M=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+y*r,t[3]=l*n+h*m+g*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+y*x,t[7]=l*v+h*b+g*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+f*k+y*M,t[11]=l*w+h*k+g*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:ot,rotateY:st,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:lt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<L?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:ct,fromQuat2:function(t,e){var n=new O(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),ct(t,e,n),t},getTranslation:ut,getScaling:ft,getRotation:ht,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:dt,fromQuat:pt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:yt,perspective:yt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:gt,ortho:mt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:vt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:bt,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],y=t[13],g=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],M=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],P=e[12],T=e[13],N=e[14],e=e[15];return Math.abs(n-m)<=L*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=L*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=L*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=L*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=L*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=L*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=L*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=L*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=L*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=L*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=L*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=L*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-P)<=L*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(y-T)<=L*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(g-N)<=L*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(t-e)<=L*Math.max(1,Math.abs(t),Math.abs(e))},mul:X,sub:bt});function wt(){var t=new O(3);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function kt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function b(t,e,n){var r=new O(3);return r[0]=t,r[1]=e,r[2]=n,r}function Mt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ot(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function _t(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function St(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Et(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function At(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Pt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Tt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Nt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Lt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function jt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=L*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=L*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=L*Math.max(1,Math.abs(t),Math.abs(e))}var Ct=St,Ft=kt;function It(){var t=new O(4);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Rt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Bt(){var t=new O(4);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Dt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function zt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function Wt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function Ht(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}wt(),It();var Vt=function(t,e,n,r){var i=new O(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},qt=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Gt=zt,Yt=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function Ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Xt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function $t(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function Zt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Kt(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function Qt(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}wt(),b(1,0,0),b(0,1,0),Bt(),Bt(),C();var Jt=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function te(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new O(2),O!=Float32Array&&(e[0]=0,e[1]=0);var ee=function(t,e){return(ee=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var _=function(){return(_=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function K(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ne(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function re(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var ie={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var ae={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function oe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return ae[e]===t.length-1&&"achlmqstvz".includes(e)})}function se(t){return oe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function le(t){return se(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ce(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ae[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,ae[n]))),ae[n]););}function ue(t){return 48<=t&&t<=57}function fe(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function he(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=ae[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,fe(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(ue(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&ue(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&ue(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;ue(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&ue(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&ue(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),fe(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,fe(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ce(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var de=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function pe(t){var o,s,l,c;return se(t)?te(t):(t=function(t){if(oe(t))return te(t);var e=new de(t);for(fe(e);e.index<e.max&&!e.err.length;)he(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function ye(t){if(le(t))return te(t);for(var e,n,r,i,a,o,s,l=pe(t),c=_({},ie),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function ge(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function me(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function ve(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function be(t,e,n,r,i){var a=ve([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=me([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function xe(t,e,n,r){var t=[t,e],e=[n,r],i=me(t,e,.5),e=me(e,i,.5),a=me(i,e,.5),o=me(e,a,.5),s=me(a,o,.5),t=be(t[0],t[1],i[0],i[1],a[0]).point,i=be(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function we(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(g=ge(e,n,-h)).x,n=g.y,1<(p=(y=(e-(l=(g=ge(l,c,-h)).x))/2)*y/(r*r)+(g=(n-(c=g.y))/2)*g/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*g*g-m*y*y)/(p*g*g+m*y*y))))*r*g/i+(e+l)/2,b=o*-i*y/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),y=(Math.abs(p)>f&&(m=w,g=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,g,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),g=Math.tan(p/4),o=4/3*r*g,m=4/3*i*g,v=[e,n],b=[e+o*f,n-m*y],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var k=[],M=0,O=(d=b.concat(x,w,d)).length;M<O;M+=1)k[M]=M%2?ge(d[M-1],d[M],h).y:ge(d[M],d[M+1],h).x;return k}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(xe(h,d,u,f));case"Z":return h===p&&d===y?["C",h,d,p,y,p,y]:["C"].concat(xe(h,d,p,y))}return t}function ke(t,e){var n;if(void 0===e&&(e=!1),le(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=te(t),e?[n,[]]:n;for(var r,i=ye(t),a=_({},ie),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=we(i[u],a),h=(i[u]=f,g=y=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var y=h[p],g=p;y.length;)d[p]="A",h.splice(g+=1,0,["C"].concat(y.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function Me(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,y=t,g=e,m=0,v=[y,g,m],b=[y,g],x={x:0,y:0},w=[{x:y,y:g}];p&&l<=0&&(x={x:y,y:g});for(var k,M,O,_,S,E,A,P,T,N,L=0;L<=d;L+=1)k=t,M=e,O=n,_=r,S=i,E=a,A=o,P=s,N=void 0,N=1-(T=L/d),y=(k={x:Math.pow(N,3)*k+3*Math.pow(N,2)*T*O+3*N*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(N,3)*M+3*Math.pow(N,2)*T*_+3*N*Math.pow(T,2)*E+Math.pow(T,3)*P}).x,g=k.y,f&&w.push({x:y,y:g}),h&&(m+=ve(b,[y,g])),b=[y,g],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[y,g,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Oe(t){return(c=l=s=0)<=ke(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function _e(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?Me(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=me(n,i,r),i=me(i,a,r),a=me(a,e,r),o=me(n,i,r),i=me(i,a,r),r=me(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}function Se(t){return Array.isArray?Array.isArray(t):Te(t,"Array")}function Ee(t){var e=typeof t;return null!==t&&"object"==e||"function"==e}var Ae=function(t){return null==t},Pe={}.toString,Te=function(t,e){return Pe.call(t)==="[object "+e+"]"},Ne=function(t){if(Se(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Le=function(t){if(Se(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},je=function(t){return Te(t,"String")},Ce=function(t,e,n){return t<e?e:n<t?n:t},Fe=function(t){return Te(t,"Number")};function Ie(a,o){if("function"!=typeof a)throw new TypeError("Expected a function");function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}return s.cache=new Map,s}var Re=function(t,e){return(t%e+e)%e},Be=function(t){return Te(t,"Boolean")};function De(t,e,n){(t.prototype=e.prototype=n).constructor=t}function ze(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function We(){}var e="\\s*([+-]?\\d+)\\s*",He="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ve=/^#([0-9a-f]{3,8})$/,qe=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Ge=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),Ye=new RegExp("^rgba\\("+[e,e,e,He]+"\\)$"),Ue=new RegExp("^rgba\\("+[n,n,n,He]+"\\)$"),Xe=new RegExp("^hsl\\("+[He,n,n]+"\\)$"),$e=new RegExp("^hsla\\("+[He,n,n,He]+"\\)$"),Ze={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ke(){return this.rgb().formatHex()}function Qe(){return this.rgb().formatRgb()}function Je(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ve.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tn(e):3===n?new nn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?en(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?en(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=qe.exec(t))?new nn(e[1],e[2],e[3],1):(e=Ge.exec(t))?new nn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ye.exec(t))?en(e[1],e[2],e[3],e[4]):(e=Ue.exec(t))?en(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xe.exec(t))?sn(e[1],e[2]/100,e[3]/100,1):(e=$e.exec(t))?sn(e[1],e[2]/100,e[3]/100,e[4]):Ze.hasOwnProperty(t)?tn(Ze[t]):"transparent"===t?new nn(NaN,NaN,NaN,0):null}function tn(t){return new nn(t>>16&255,t>>8&255,255&t,1)}function en(t,e,n,r){return new nn(t=r<=0?e=n=NaN:t,e,n,r)}function nn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rn(){return"#"+on(this.r)+on(this.g)+on(this.b)}function an(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function on(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function sn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new cn(t,e,n,r)}function ln(t){var e,n,r,i,a,o,s,l;return t instanceof cn?new cn(t.h,t.s,t.l,t.opacity):(t=t instanceof We?t:Je(t))?t instanceof cn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new cn(o,s,l,t.opacity)):new cn}function cn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function un(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function fn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function hn(t,e){return Math.abs(t-e)<.001}function dn(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function pn(t){return(t+2*Math.PI)%(2*Math.PI)}De(We,Je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ke,formatHex:Ke,formatHsl:function(){return ln(this).formatHsl()},formatRgb:Qe,toString:Qe}),De(nn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof We?i:Je(i))?new nn((i=i.rgb()).r,i.g,i.b,i.opacity):new nn:new nn(t,e,n,null==r?1:r);var i},ze(We,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new nn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new nn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rn,formatHex:rn,formatRgb:an,toString:an})),De(cn,function(t,e,n,r){return 1===arguments.length?ln(t):new cn(t,e,n,null==r?1:r)},ze(We,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new nn(un(240<=t?t-240:120+t,n,e),un(t,n,e),un(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var yn={box:function(t,e,n,r){return dn([t,n],[e,r])},length:fn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?fn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?fn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(Qt(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function gn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=fn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(f<1e-4);y++){var g=o-f,m=o+f,v=[i.apply(void 0,t.concat([g])),i.apply(void 0,e.concat([g]))],v=fn(l[0],l[1],v[0],v[1]);0<=g&&v<s?(o=g,s=v):(g=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=fn(l[0],l[1],g[0],g[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function mn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function vn(t,e,n){n=t+n-2*e;return hn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function bn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function xn(t,e,n,r,i,a,o){var s=mn(t,n,i,o),l=mn(e,r,a,o),c=yn.pointAt(t,e,n,r,o),n=yn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function wn(t,e,n,r,i,a,o){return 0===o?(fn(t,e,n,r)+fn(n,r,i,a)+fn(t,e,i,a))/2:(e=(t=xn(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),wn.apply(void 0,e)+wn.apply(void 0,n))}var kn={box:function(t,e,n,r,i,a){var o=vn(t,n,i)[0],s=vn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(mn(t,n,i,o)),void 0!==s&&c.push(mn(e,r,a,s)),dn(l,c)},length:function(t,e,n,r,i,a){return wn(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return gn([t,n,i],[e,r,a],o,s,mn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return fn(t.x,t.y,o,s)},interpolationAt:mn,pointAt:function(t,e,n,r,i,a,o){return{x:mn(t,n,i,o),y:mn(e,r,a,o)}},divide:xn,tangentAngle:function(t,e,n,r,i,a,o){t=bn(t,n,i,o),n=bn(e,r,a,o);return pn(Math.atan2(n,t))}};function Mn(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function On(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function _n(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return hn(r,0)?hn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):hn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function Sn(t,e,n,r,i,a,o,s,l){var c=Mn(t,n,i,o,l),u=Mn(e,r,a,s,l),f=yn.pointAt(t,e,n,r,l),n=yn.pointAt(n,r,i,a,l),r=yn.pointAt(i,a,o,s,l),i=yn.pointAt(f.x,f.y,n.x,n.y,l),a=yn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function En(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=fn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=Sn(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return En.apply(void 0,e)+En.apply(void 0,n)}var An={extrema:_n,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=_n(t,n,i,o),f=_n(e,r,a,s),h=0;h<u.length;h++)l.push(Mn(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(Mn(e,r,a,s,f[d]));return dn(l,c)},length:function(t,e,n,r,i,a,o,s){return En(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return gn([t,n,i,o],[e,r,a,s],l,c,Mn,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return fn(t.x,t.y,l,c)},interpolationAt:Mn,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Mn(t,n,i,o,l),y:Mn(e,r,a,s,l)}},divide:Sn,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=On(t,n,i,o,l),n=On(e,r,a,s,l);return pn(Math.atan2(n,t))}};function Pn(t,e){t=Math.abs(t);return 0<e?t:-1*t}var Tn=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,y=0;y<4;y++){var d=o*Math.cos(h),p=s*Math.sin(h),g=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-g,b=p-m,g=l-g,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,g);h+=x*Math.asin((v*m-b*g)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+Pn(d,n),y:e+Pn(p,r)}};function Nn(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Ln(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function jn(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Cn(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var Fn={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=Nn(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=y+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var k=Ln(0,e,n,r,i,v[w]);k<g&&(g=k),m<k&&(m=k)}return{x:l,y:g,width:c-l,height:m-g}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=Cn(s-t,l-e,-i),l=s[0],s=s[1],l=Tn(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=jn(n,r,a):o<c&&(l=jn(n,r,o)),Cn(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return fn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:Nn(t,0,n,r,i,o),y:Ln(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return pn(Math.atan2(i,s))}};function In(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=fn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Rn,Bn,Dn={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return dn(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=fn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=In(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=yn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=yn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=In(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function zn(){}function Wn(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Hn(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new Wn(n,r||t,i),r=Bn?Bn+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Vn(t,e){0==--t._eventsCount?t._events=new zn:delete t._events[e]}function qn(){this._events=new zn,this._eventsCount=0}n=e,Rn=Object.prototype.hasOwnProperty,Bn="~",Object.create&&(zn.prototype=Object.create(null),(new zn).__proto__||(Bn=!1)),qn.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Rn.call(t,e)&&n.push(Bn?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},qn.prototype.listeners=function(t){var t=Bn?Bn+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},qn.prototype.listenerCount=function(t){t=Bn?Bn+t:t,t=this._events[t];return t?t.fn?1:t.length:0},qn.prototype.emit=function(t,e,n,r,i,a){var o=Bn?Bn+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},qn.prototype.on=function(t,e,n){return Hn(this,t,e,n,!1)},qn.prototype.once=function(t,e,n){return Hn(this,t,e,n,!0)},qn.prototype.removeListener=function(t,e,n,r){t=Bn?Bn+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Vn(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:Vn(this,t)}}else Vn(this,t);return this},qn.prototype.removeAllListeners=function(t){return t?(t=Bn?Bn+t:t,this._events[t]&&Vn(this,t)):(this._events=new zn,this._eventsCount=0),this},qn.prototype.off=qn.prototype.removeListener,qn.prototype.addListener=qn.prototype.on,qn.prefixed=Bn,n.exports=qn.EventEmitter=qn;var Gn=e.exports,He="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let Yn=1;const Un="object"==typeof self&&self.self==self?self:"object"==typeof He&&He.global==He?He:{},Xn=Date.now();let $n={},Zn=Date.now();const Kn=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Zn,r=16<e?0:16-e,i=Yn++;return $n[i]=t,1<Object.keys($n).length||setTimeout(()=>{Zn=n;const e=$n;$n={},Object.keys(e).forEach(t=>e[t](Un.performance&&"function"==typeof Un.performance.now?Un.performance.now():Date.now()-Xn))},r),i}:""===t?Un.requestAnimationFrame:Un[t+"RequestAnimationFrame"],Qn=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Kn(t)),Jn=Kn(Qn),tr="string"!=typeof(n=Qn)?t=>{delete $n[t]}:""===n?Un.cancelAnimationFrame:Un[n+"CancelAnimationFrame"]||Un[n+"CancelRequestAnimationFrame"];Un.requestAnimationFrame=Jn,Un.cancelAnimationFrame=tr,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Jn,cancelAnimationFrame:tr}),(e=f=f||{}).COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>";var x,er=function(){function g(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=wt(),this.halfExtents=wt(),this.min=wt(),this.max=wt(),this.update(t,e)}g.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=g.prototype;return t.update=function(t,e){Mt(this.center,t),Mt(this.halfExtents,e),Ct(this.min,this.center,this.halfExtents),_t(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){_t(this.center,e,t),Et(this.center,this.center,.5),Ct(this.halfExtents,e,t),Et(this.halfExtents,this.halfExtents,.5),Mt(this.min,t),Mt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],y=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=y-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=y+u)&&(d=p),(y=h-(f=t[2]))<(u=a-o)&&(u=y),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(y=l-c)<(a=n-i)?y:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),y=Math.abs(o),g=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),k=Math.abs(d);Ot(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),Ot(r,p*t[0]+y*t[1]+g*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Ct(this.min,n,r),this.max=_t(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new g,i=wt(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=wt(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Mt(wt(),this.min):272===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):b(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Mt(wt(),this.max):272===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):b(this.min[0],this.min[1],this.min[2])},g}(),nr=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||b(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Pt(t,this.normal)-this.distance},e.normalize=function(){var t=1/Ft(this.normal);Et(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),rr=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new nr)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];Ot(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,Ot(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,Ot(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,Ot(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,Ot(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-y,Ot(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),ir=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),ar=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),or=((n=x=x||{}).GROUP="g",n.CIRCLE="circle",n.ELLIPSE="ellipse",n.IMAGE="image",n.RECT="rect",n.LINE="line",n.POLYLINE="polyline",n.POLYGON="polygon",n.TEXT="text",n.PATH="path",n.HTML="html",n.MESH="mesh",Ie(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function sr(t){if(!t)throw new Error}function lr(t,e){if(t===e)throw new Error}function cr(t){return"function"==typeof t}var ur={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},fr=Ie(function(t){var t=or(t),e=ur[t];return(null==e?void 0:e.alias)||t});var s,hr,dr,pr,yr="Method not implemented.";function gr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mr(t,e,n){e&&gr(t.prototype,e),n&&gr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function vr(){return(vr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function br(t,e){t.prototype=Object.create(e.prototype),xr(t.prototype.constructor=t,e)}function xr(t,e){return(xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?wr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=s=s||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(n=hr=hr||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(e=dr=dr||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",(n=pr=pr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo";function Mr(t){return t?"number"===t?s.kNumber:"percent"===t||"%"===t?s.kPercentage:(e=t,Pr.find(function(t){return t.name===e}).unit_type):s.kUnknown;var e}function Or(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function _r(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var Sr,Er,Ar,l,Pr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],n=((e=Sr=Sr||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(dr.kNo,pr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Sr.kUnitType&&this.getType()<=Sr.kClampType},t}()),e=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}br(t,n);var e=t.prototype;return e.getType=function(){return Sr.kColorType},e.to=function(t){return this},t}(n),Tr=((r=Er=Er||{})[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}br(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Sr.kColorType},t}(n)),Nr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}br(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Sr.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);(r=Ar=Ar||{}).kAdd="+",r.kSubtract="-",r.kMultiply="*",r.kDivide="/",r.kMin="min",r.kMax="max",r.kClamp="clamp",r.kInvalid="",(r=l=l||{})[r.kLength=0]="kLength",r[r.kAngle=1]="kAngle",r[r.kTime=2]="kTime",r[r.kFrequency=3]="kFrequency",r[r.kResolution=4]="kResolution",r[r.kFlex=5]="kFlex",r[r.kPercent=6]="kPercent",r[r.kNumBaseTypes=7]="kNumBaseTypes";function Lr(t){return"number"==typeof t?new zr(t,s.kNumber):t}var jr=function(){function t(t,e){void 0===t&&(t=s.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=l.kPercent,this.hasPercentHint=!1,this.exponents=new Array(l.kNumBaseTypes).fill(0),t!==s.kNumber&&this.setExponent(function(t){switch(lr(t,s.kNumber),t){case s.kEms:case s.kPixels:case s.kRems:return l.kLength;case s.kMilliseconds:case s.kSeconds:return l.kTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return l.kAngle;case s.kPercentage:return l.kPercent;default:return l.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){lr(t,l.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(l.kPercent)),this.setExponent(l.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return lr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return lr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesBaseTypePercentage=function(t){return lr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(l.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<l.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==l.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<l.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),r=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}br(d,n);var t=d.prototype;return t.getType=function(){return Sr.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Cr(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Cr(e),i=(Fr(Sr.kSumType,r,this),Rr(r,Ar.kAdd));return i||Ur.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Cr(e)).map(function(t){return t.negate()}),i=(Fr(Sr.kSumType,r,this),Rr(r,Ar.kAdd));return i||Ur.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Cr(e),i=(Fr(Sr.kProductType,r,this),Br(r));return i||Xr.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Cr(e)).map(function(t){return t.invert()}),i=(Fr(Sr.kProductType,r,this),Br(r));return i||Xr.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Cr(e),i=(Fr(Sr.kMinType,r,this),Rr(r,Ar.kMin));return i||Gr.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Cr(e),i=(Fr(Sr.kMaxType,r,this),Rr(r,Ar.kMax));return i||Yr.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Ir(e[0]))?(t="string"==typeof t?Mr(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!d.isValidUnit(Mr(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],l=kr(o);!(c=l()).done;){var c=Ir(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),sr(!!(o=Ur.create(s))),o;for(var u=[],f=0,h=e;f<h.length;f++)!function(){var t=h[f],r=Mr(t),t=(sr(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new zr(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Ur.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(l.kLength);return e&&(t.length=e),(e=this.type_.exponent(l.kAngle))&&(t.angle=e),(e=this.type_.exponent(l.kTime))&&(t.time=e),(e=this.type_.exponent(l.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(l.kResolution))&&(t.resolution=e),(e=this.type_.exponent(l.kFlex))&&(t.flex=e),(e=this.type_.exponent(l.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case l.kLength:return"length";case l.kAngle:return"angle";case l.kTime:return"time";case l.kFrequency:return"frequency";case l.kResolution:return"resolution";case l.kFlex:return"flex";case l.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===s.kNumber||t==s.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Hr.create(this)},t.invert=function(){return Wr.create(this)},d}(n);function Cr(t){return t.map(Lr)}function Fr(t,e,n){sr(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Ir(t){return 0===Object.keys(t.units).length?new zr(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new zr(t.value,Number(Object.keys(t.units)[0])):null}function Rr(t,e){sr(!!t.length);var n=t[0]instanceof zr?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof zr?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Ar.kAdd?r+=a.value:e===Ar.kMax?r=Math.max(r,a.value):e===Ar.kMin&&(r=Math.min(r,a.value))}return new zr(r,n.unit)}function Br(t){sr(!!t.length);for(var e=s.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof zr?t[r]:null;if(!i)return null;if(i.unit!==s.kNumber){if(e!==s.kNumber)return null;e=i.unit}n*=i.value}return new zr(n,e)}function Dr(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return hr.kUNumber;case s.kPercentage:return hr.kUPercent;case s.kPixels:return hr.kULength;case s.kMilliseconds:case s.kSeconds:return hr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return hr.kUAngle;default:return hr.kUOther}}(t)){case hr.kUNumber:return s.kNumber;case hr.kULength:return s.kPixels;case hr.kUPercent:return s.kPercentage;case hr.kUTime:return s.kSeconds;case hr.kUAngle:return s.kDegrees;default:return s.kUnknown}}var zr=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?s.kNumber:e)?Mr(e):e;return(n=r.call(this,new jr(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}br(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Dr(this.unit))!==Dr(t)||e===s.kUnknown?null:(e=Or(this.unit)/Or(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Sr.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==s.kNumber&&(r[t=this.unit,(e=Dr(t))===s.kUnknown?t:e]=1),n.push({value:this.value*Or(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===s.kNumber?0===this.value?null:new n(1/this.value,this.unit):Wr.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=_r(this.unit);i=a<-999999||999999<a?(r=_r(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(sr(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(r),n=function(t){function e(){return t.apply(this,arguments)||this}return br(e,t),e.prototype.isUnitValue=function(){return!1},e}(r),Wr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}br(e,n),e.create=function(t){return new e(t,jr.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Sr.kInvertType},t.equals=function(t){return t.getType()===Sr.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==pr.kNo&&(n+=t===dr.kYes?"(":"calc("),n=this.value.buildCSSText(dr.kYes,pr.kNo,n+="1 / "),e===pr.kNo&&(n+=")"),n},e}(n),Hr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}br(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Sr.kNegateType},t.equals=function(t){return t.getType()===Sr.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==pr.kNo&&(n+=t===dr.kYes?"(":"calc("),n=this.value.buildCSSText(dr.kYes,pr.kNo,n+="-"),e===pr.kNo&&(n+=")"),n},e}(n);function Vr(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function qr(t){return Qr[t]||(Qr[t]=new Nr(t)),Qr[t]}var r=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}br(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(n),Gr=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}br(e,i),e.create=function(t){return new e(t,Vr(t,jr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Sr.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=kr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,a=kr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(dr.kYes,pr.kYes,n);return n+=")"},e}(r),Yr=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}br(e,i),e.create=function(t){return new e(t,Vr(t,jr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Sr.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=kr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,a=kr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(dr.kYes,pr.kYes,n);return n+=")"},e}(r),Ur=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}br(e,i),e.create=function(t){return new e(t,Vr(t,jr.add))},e.numericTypeFromUnitMap=function(n){var r=new jr;return Object.keys(n).forEach(function(t){var e=n[t];r=jr.multiply(r,new jr(Number(t),e),!1),sr(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(sr(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return jr.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Sr.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(vr({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==pr.kNo&&(n+=t===dr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(dr.kYes,pr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Sr.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(dr.kYes,pr.kNo,n)}return e===pr.kNo&&(n+=")"),n},e}(r),Xr=function(i){function a(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}br(a,i),a.create=function(t){return new a(t,Vr(t,jr.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){lr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=a.prototype;return t.clone=function(){return new a(this.values,this.type_)},t.getType=function(){return Sr.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==pr.kNo&&(n+=t===dr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(dr.kYes,pr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Sr.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(dr.kYes,pr.kNo,n)}return e===pr.kNo&&(n+=")"),n},a}(r),$r=new zr(0,"px"),Zr=(new zr(1,"px"),new zr(0,"deg")),Kr=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}br(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(e),n=new Nr("unset"),Qr={"":n,unset:n,initial:new Nr("initial"),inherit:new Nr("inherit")},Jr=new Kr(0,0,0,0,!0),ti=new Kr(0,0,0,0),ei=Ie(function(t,e,n,r){return new Kr(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ni=Ie(function(t,e){return void 0===e&&(e=s.kNumber),new zr(t,e)},function(t,e){return""+t+(e=void 0===e?s.kNumber:e)}),ri=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,ii=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ai=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,oi=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var si={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},li=Ie(function(t){t="angular"===t.type?Number(t.value):si[t.value]||0;return ni(t,"deg")}),ci=Ie(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:ni(n,i),cy:ni(r,a)}}),ui=Ie(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return ka(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!Ae(c)&&!Ae(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:ni(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Tr(Er.LinearGradient,{angle:n?li(n):Zr,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=ci(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?qr(n):ni(n,f)),new Tr(Er.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ri.exec(t);if(n)return r=(null==(r=n[2].match(oi))?void 0:r.map(function(t){return t.split(":")}))||[],[new Tr(Er.LinearGradient,{angle:ni(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ni(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=ii.exec(t);if(t)return t=(null==(t=t[4].match(oi))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ni(50,"%"),cy:ni(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ni(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!je(n))return[new Tr(Er.RadialGradient,n)]}else if("p"===e){var r=t;if(r=ai.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});var fi=Ie(function(t){var e;return Ee(e=t)&&e.image?vr({repetition:"repeat"},t):"transparent"===(t=Ae(t)?"":t)?ti:ui(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Je(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),ei.apply(void 0,e))});function hi(t,e){if(t instanceof Kr&&e instanceof Kr)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(Ce(e[n],0,255));return e[3]=Ce(e[3],0,1),"rgba("+e.join(",")+")"}]}function di(t,e){if(Ae(e))return ni(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ni(Number(e),"px");if(0<="deg".search(t))return ni(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ni(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var pi=Ie(function(t){return di(new RegExp("px","g"),t)}),yi=(Ie(function(t){return di(new RegExp("%","g"),t)}),Ie(function(t){return Fe(t)||isFinite(Number(t))?ni(Number(t),"px"):di(new RegExp("px|%|em|rem","g"),t)})),gi=Ie(function(t){return di(new RegExp("deg|rad|grad|turn","g"),t)});function mi(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=pa(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function vi(t){return je(t)?t.split(" ").map(function(t){return yi(t)}):t.map(function(t){return yi(t.toString())})}function bi(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,er.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var xi=function(t){return di(/deg|rad|grad|turn|px|%/g,t)},wi=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ki(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<wi.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return xi(t)||fi(t)})}),n.lastIndex===t.length)return r}return[]}function Mi(t){return t.toString()}var Oi=Ie(function(t){return"number"==typeof t?ni(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ni(Number(t)):ni(0)});function _i(t,e){return[t,e,Mi]}function Si(n,r){return function(t,e){return[t,e,function(t){return Mi(Ce(t,n,r))}]}}function Ei(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Ie(function(t){return(je(t)?t.split(" "):t).map(Oi)});var Ai=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=ye(e)}catch(t){n=ye(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=Re(da(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=Ka([1,0],p),f=Ka(p,u);Za(p,u)<=-1&&(f=Math.PI);1<=Za(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:Va(t,[c,e])?0:n,ry:Va(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&Va(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,y,g,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=Ga((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(y=Ga((p=e[s-1]).currentPoint,b),g=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-y[0],b[1]-y[1]]):(u.command="SQ",u.startTangent=[b[0]-g[0],b[1]-g[1]]),u.endTangent=[n[0]-g[0],n[1]-g[1]]):"A"===c&&(y=Xa(u,0),b=y.x,g=y.y,c=Xa(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,g],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=kn.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=An.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=Fn.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=Le(n),d=Le(r),p=Ne(n),y=Ne(r);if(0!==i.length)for(var g=0;g<i.length;g++){var m=i[g],v=m.currentPoint,b=void 0;v[0]===h?(b=qa(m,e),h-=b.xExtra):v[0]===p&&(b=qa(m,e),p+=b.xExtra),v[1]===d?(b=qa(m,e),d-=b.yExtra):v[1]===y&&(b=qa(m,e),y+=b.yExtra)}return{x:h,y:d,width:p-h,height:y-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},Pi=Ie(Ai);function Ti(t,e){t=(je(t)?Pi:Ai)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Ni(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=ke(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=ke(e.absolutePath,!1),e.curve=d),[h,d]),h=Oe((t=h.length!==d.length?function t(e,n,r){var i,e=_e(e),n=_e(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Oe(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):te(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=ve(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Li(t,e){var n,r,i=je(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=Dn.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=yn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var ji=null;function Ci(t){return function(e){var n=0;return t.map(function(t){return t===ji?e[n++]:t})}}function Fi(t){return t}var Ii={matrix:["NNNNNN",[ji,ji,0,0,ji,ji,0,0,0,0,1,0,ji,ji,0,1],Fi],matrix3d:["NNNNNNNNNNNNNNNN",Fi],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Ci([ji,ji,new zr(1)]),Fi],scalex:["N",Ci([ji,new zr(1),new zr(1)]),Ci([ji,new zr(1)])],scaley:["N",Ci([new zr(1),ji,new zr(1)]),Ci([new zr(1),ji])],scalez:["N",Ci([new zr(1),new zr(1),ji])],scale3d:["NNN",Fi],skew:["Aa",null,Fi],skewx:["A",null,Ci([ji,Zr])],skewy:["A",null,Ci([Zr,ji])],translate:["Tt",Ci([ji,ji,$r]),Fi],translatex:["T",Ci([ji,$r,$r]),Ci([ji,$r])],translatey:["T",Ci([$r,ji,$r]),Ci([$r,ji])],translatez:["L",Ci([$r,$r,ji])],translate3d:["TTL",Fi]};function Ri(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=Ii[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Zr:gi(t)},N:Oi,T:yi,L:pi}[h.toUpperCase()](f):{a:Zr,n:c[0],t:$r}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Bi(t){switch(t.t){case"rotatex":return i=da(mi(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=da(mi(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=da(mi(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=da(mi(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=da(mi(t.d[0])),a=da(mi(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=da(mi(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=da(mi(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=bi(t.d[0],0,null)||0,n=bi(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=bi(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=bi(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=bi(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=bi(t.d[0],0,null)||0,n=bi(t.d[1],0,null)||0,r=bi(t.d[2],0,null)||0,1];case"perspective":a=bi(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function Di(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function zi(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(ya,t))return;if(H(ga,ya),ga[3]=0,ga[7]=0,ga[11]=0,ga[15]=1,Math.abs(U(ga))<1e-8)return;var t=ya[3],o=ya[7],s=ya[11],l=ya[12],c=ya[13],u=ya[14],f=ya[15];if(0!==t||0!==o||0!==s){if(ma[0]=t,ma[1]=o,ma[2]=s,ma[3]=f,!Y(ga,ga))return;G(ga,ga),Rt(i,ma,ga)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,ya),n[0]=kt(d[0]),At(d[0],d[0]),r[0]=Pt(d[0],d[1]),ba(d[1],d[1],d[0],1,-r[0]),n[1]=kt(d[1]),At(d[1],d[1]),r[0]/=n[1],r[1]=Pt(d[0],d[2]),ba(d[2],d[2],d[0],1,-r[1]),r[2]=Pt(d[1],d[2]),ba(d[2],d[2],d[1],1,-r[2]),n[2]=kt(d[2]),At(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Tt(va,d[1],d[2]),Pt(d[0],va)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Bi).reduce(Di),e,n,r,i,a),[[e,n,r,a,i]]}var Wi=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=Hi(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=Hi(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=Hi(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=Hi(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function Hi(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Vi(t){return t.toFixed(6).replace(".000000","")}function qi(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=zi(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=zi(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=Ce(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return Wi(t[0],t[1],t[2],e,t[4]).map(Vi).join(",")}])}function Gi(t){return t.replace(/[xy]/,"")}function Yi(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var Ui=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function Xi(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ni(n):ni(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=qi(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=Ii[u],y=Ii[f],g=void 0;if(Ui(u,f)){var m=qi([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)g=u;else if(p[2]&&y[2]&&Gi(u)===Gi(f))g=Gi(u),h=p[2](h),d=y[2](d);else{if(!p[1]||!y[1]||Yi(u)!==Yi(f)){m=qi(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}g=Yi(u),h=p[1](h),d=y[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Dr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=_r(t.unit)):(zr.isLength(t.unit)||zr.isLength(e.unit))&&(o=bi(t,i,n),s=bi(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}a.push(v),o.push(b),s.push([g,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var $i=Ie(function(t){var e;return je(t)?"text-anchor"===t?[ni(0,"px"),ni(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[yi(Zi(e[0])),yi(Zi(e[1]))]):[ni(t[0]||0,"px"),ni(t[1]||0,"px")]});function Zi(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var r=function(){function t(){this.parser=gi,this.mixer=_i}return t.prototype.calculator=function(t,e,n,r){return mi(n)},t}(),e=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Nr&&(n=null),Bo.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&Bo.sceneGraphService.dirtifyToRoot(t)}),n},t}(),n=function(){function t(){this.parser=fi,this.mixer=hi}return t.prototype.calculator=function(t,e,n,r){return n instanceof Nr?"none"===n.value?Jr:ti:n},t}(),Ki=function(){function t(){this.parser=ki}return t.prototype.calculator=function(t,e,n){return n instanceof Nr?[]:n},t}();function Qi(t){t=t.parsedStyle.fontSize;return Ae(t)?null:t}function Ji(){this.parser=$i}var a=function(){function t(){this.parser=yi,this.mixer=_i}return t.prototype.calculator=function(t,e,n,r,i){if(!zr.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=Qi(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Qi(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),o=function(){function t(){this.mixer=Ei}var e=t.prototype;return e.parser=function(t){t=vi(Fe(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ta=function(){function t(){this.mixer=Ei}var e=t.prototype;return e.parser=function(t){t=vi(Fe(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ea=function(t){function e(){return t.apply(this,arguments)||this}return br(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;Ae(a)||(l=a),Ae(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:Ae(t.parsedStyle.x)||(l=t.parsedStyle.x),Ae(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),Ae(l)&&Ae(c)&&Ae(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(Ae(l)?e:l,Ae(c)?n:c,Ae(u)?r:u))},e}(a),na=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Nr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),c=function(){function t(){this.mixer=_i,this.parser=Oi}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ra=function(){function t(){this.parser=Oi,this.mixer=Si(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),u=function(){function t(){this.parser=Oi,this.mixer=Si(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ia=function(){function t(){this.parser=Ti,this.mixer=Ni}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Nr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ar(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===x.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),aa=function(){function t(){this.parser=Li}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),oa=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=Si(0,1/0),t}return br(t,i),t}(a),sa=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Nr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),la=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),ca=function(){function t(){this.tmpMat4=W(),this.parser=Ri,this.mixer=Xi}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Nr?[]:n},e.postProcessor=function(l){var c=this,t=l.parsedStyle,e=t.transform,u=t.defX,f=t.defY;e&&e.length&&(l.resetLocalTransform(),l.setLocalPosition(u,f),e.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[$r,$r],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[$r],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[$r],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[$r],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[$r,$r,$r],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Zr],l.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[Zr],l.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[Zr],l.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[Zr],l.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(da(o[0]),da(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(da(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],da(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(V(c.tmpMat4,e,n,0,0,r,i,0,0,0,0,1,0,a+u,o+f,0,1))):"matrix3d"===s&&(V.apply(xt,[c.tmpMat4].concat(t.map(function(t){return t.value}))),c.tmpMat4[12]+=u,c.tmpMat4[13]+=f,l.setLocalTransform(c.tmpMat4)))}))},t}(),ua=function(){function t(){this.parser=Oi}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}();function fa(t){return void 0===t?0:360<t||t<-360?t%360:t}function ha(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),Fe(t)?b(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new O(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):b(t[0],t[1]||e,t[2]||n)}function da(t){return t*(Math.PI/180)}function pa(t){return t*(180/Math.PI)}var ya=W(),ga=W(),ma=It(),d=[wt(),wt(),wt()],va=wt();function ba(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}xa={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},wa="";var xa,wa,ka=function(t){return wa=t,Oa()};function Ma(t){throw new Error(wa+": "+t)}function Oa(){var t=Ca(_a);return 0<wa.length&&Ma("Invalid input not EOF"),t}function _a(){return Sa("linear-gradient",xa.linearGradient,Aa)||Sa("repeating-linear-gradient",xa.repeatingLinearGradient,Aa)||Sa("radial-gradient",xa.radialGradient,Pa)||Sa("repeating-radial-gradient",xa.repeatingRadialGradient,Pa)||Sa("conic-gradient",xa.conicGradient,Pa)}function Sa(n,t,r){return Ea(t,function(t){var e=r();return e&&!Wa(xa.comma)&&Ma("Missing comma before color stops"),{type:n,orientation:e,colorStops:Ca(Fa)}})}function Ea(t,e){t=Wa(t);if(t)return Wa(xa.startCall)||Ma("Missing ("),e=e(t),Wa(xa.endCall)||Ma("Missing )"),e}function Aa(){return za("directional",xa.sideOrCorner,1)||za("angular",xa.angleValue,1)}function Pa(){var t,e,n=Ta();return n&&((t=[]).push(n),e=wa,Wa(xa.comma))&&((n=Ta())?t.push(n):wa=e),t}function Ta(){var t,e=function(){var t=za("shape",/^(circle)/i,0);t&&(t.style=Da()||Na());return t}()||function(){var t=za("shape",/^(ellipse)/i,0);t&&(t.style=Ra()||Na());return t}();return e?e.at=La():(t=Na())?(e=t,(t=La())&&(e.at=t)):(t=ja())&&(e={type:"default-radial",at:t}),e}function Na(){return za("extent-keyword",xa.extentKeywords,1)}function La(){var t;if(za("position",/^at/,0))return(t=ja())||Ma("Missing positioning value"),t}function ja(){var t={x:Ra(),y:Ra()};if(t.x||t.y)return{type:"position",value:t}}function Ca(t){var e=t(),n=[];if(e)for(n.push(e);Wa(xa.comma);)(e=t())?n.push(e):Ma("One extra comma");return n}function Fa(){var t=za("hex",xa.hexColor,1)||Ea(xa.rgbaColor,function(){return{type:"rgba",value:Ca(Ia)}})||Ea(xa.rgbColor,function(){return{type:"rgb",value:Ca(Ia)}})||za("literal",xa.literalColor,0);return t||Ma("Expected color definition"),t.length=Ra(),t}function Ia(){return Wa(xa.number)[1]}function Ra(){return za("%",xa.percentageValue,1)||Ba()||Da()}function Ba(){return za("position-keyword",xa.positionKeywords,1)}function Da(){return za("px",xa.pixelValue,1)||za("em",xa.emValue,1)}function za(t,e,n){e=Wa(e);if(e)return{type:t,value:e[n]}}function Wa(t){var e=/^[\n\r\t\s]+/.exec(wa),e=(e&&Ha(e[0].length),t.exec(wa));return e&&Ha(e[0].length),e}function Ha(t){wa=wa.substring(t)}function Va(t,e){return t[0]===e[0]&&t[1]===e[1]}function qa(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function Ga(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Ya(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=da(r=Re(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=Ua({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Ua(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var Ua=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function Xa(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=Ya({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Ya({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function $a(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Za(t,e){return $a(t)*$a(e)?(t[0]*e[0]+t[1]*e[1])/($a(t)*$a(e)):1}function Ka(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Za(t,e))}var Qa=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=kr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return br(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(Qa)),new(function(t){function e(){return t.apply(this,arguments)||this}return br(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(Qa)),new(function(t){function e(){return t.apply(this,arguments)||this}return br(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(Qa));new(function(t){function e(){return t.apply(this,arguments)||this}return br(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(Qa));var Ja=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],to=/([\"\'])[^\'\"]+\1/;var eo,no,ro,io,ao=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:f.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:f.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:f.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:f.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:f.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:f.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:f.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:f.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:f.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:f.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:f.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:f.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:f.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:f.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:f.FILTER},{n:"clipPath",syntax:f.DEFINED_PATH},{n:"textPath",syntax:f.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:f.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:f.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:f.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:f.COORDINATE},{n:"cy",int:!0,d:"0",syntax:f.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:f.COORDINATE},{n:"y",int:!0,d:"0",syntax:f.COORDINATE},{n:"z",int:!0,d:"0",syntax:f.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:f.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:f.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:f.COORDINATE},{n:"y1",int:!0,l:!0,syntax:f.COORDINATE},{n:"z1",int:!0,l:!0,syntax:f.COORDINATE},{n:"x2",int:!0,l:!0,syntax:f.COORDINATE},{n:"y2",int:!0,l:!0,syntax:f.COORDINATE},{n:"z2",int:!0,l:!0,syntax:f.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:f.PATH,p:50},{n:"points",l:!0,syntax:f.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:f.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:f.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:f.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:f.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:f.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:f.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:f.MARKER},{n:"markerEnd",syntax:f.MARKER},{n:"markerMid",syntax:f.MARKER},{n:"markerStartOffset",syntax:f.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:f.LENGTH,l:!0,int:!0,d:"0"}],oo={},so=new WeakMap,lo={},co=Ie(function(t){return t.sort(function(t,e){return lo[t]-lo[e]})}),uo=wt(),fo=wt(),ho=wt(),Qa=function(){function t(){var e=this;ao.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){lo[t]=(oo[t]=e).p||0})},e.unregisterMetadata=function(t){delete oo[t]},e.getPropertySyntax=function(t){return Bo.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,o=Object.keys(r);o.forEach(function(t){var e=fr(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=oo[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=co(null!=t&&t.length?Array.from(new Set(o.concat(t))):o)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),o.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&o.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=oo[t],i=e;return"unset"===(e=""!==e&&!Ae(e)?e:"unset")||"initial"===e||"inherit"===e?i=qr(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=qr(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=oo[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Nr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))Ae(r)||(e=this.parseProperty(t,cr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),Ae(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Nr?e.value:e}return a},e.postProcessProperty=function(t,e){var t=oo[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=so.get(t);n||(so.set(t,[]),n=so.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=so.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=so.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),so.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,y,g,m,v=Bo.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new er),s.renderBounds||(s.renderBounds=new er),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=Ot(uo,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,g=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===x.TEXT&&delete e.anchor,d=Ot(fo,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),f=t.nodeName===x.POLYLINE||t.nodeName===x.POLYGON||t.nodeName===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&_t(p,p,Ot(ho,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),y&&g&&"inner"!==g&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,y=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,_t(s.renderBounds.halfExtents,s.renderBounds.halfExtents,b(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,g=(n?-1:1)*bi(a[0],0,t),m=(r?-1:1)*bi(a[1],1,t),g-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),Bo.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=oo[t];return!!t&&t.inh},t}(),po=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new ir,this.page=new ir,this.canvas=new ir,this.viewport=new ir,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(yr)},mr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),yo=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n),e),n}return br(t,r),t}(po),go=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}br(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(yr)},t.lookupNamespaceURI=function(t){throw new Error(yr)},t.lookupPrefix=function(t){throw new Error(yr)},t.normalize=function(){throw new Error(yr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},mr(d,[{key:"textContent",get:function(){var t="";this.nodeName===x.TEXT&&(t+=this.style.text);for(var e=kr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===x.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===x.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new Gn}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=Be(n)&&n||Ee(n)&&n.capture,n=Ee(n)&&n.once,s=cr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=cr(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=Be(n)&&n||Ee(n)&&n.capture,i=cr(e)?void 0:e;return e=cr(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new yo(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof po))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),mo=(go.DOCUMENT_POSITION_DISCONNECTED=1,go.DOCUMENT_POSITION_PRECEDING=2,go.DOCUMENT_POSITION_FOLLOWING=4,go.DOCUMENT_POSITION_CONTAINS=8,go.DOCUMENT_POSITION_CONTAINED_BY=16,go.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,0,(go=eo=eo||{}).DESTROY="destroy",go.ATTR_MODIFIED="DOMAttrModified",go.INSERTED="DOMNodeInserted",go.REMOVED="removed",go.MOUNTED="DOMNodeInsertedIntoDocument",go.UNMOUNTED="DOMNodeRemovedFromDocument",go.BOUNDS_CHANGED="bounds-changed",go.RENDER_ORDER_CHANGED="render-order-changed",go.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return br(t,c),t}(po)),vo=(mo.ADDITION=2,mo.MODIFICATION=1,mo.REMOVAL=3,new mo(eo.INSERTED,null,"","","",0,"",""),new mo(eo.REMOVED,null,"","","",0,"",""),new yo(eo.DESTROY),new mo(eo.ATTR_MODIFIED,null,null,null,null,mo.MODIFICATION,null,null),{}),bo=[],go=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return vo[t]},e.getAll=function(){return Object.keys(vo).map(function(t){return vo[t]})},e.add=function(t,e){(vo[t]=e).nodeName===x.HTML&&bo.push(e)},e.remove=function(t){var e=vo[t];e&&(delete vo[t],e.nodeName===x.HTML)&&(t=bo.indexOf(e),bo.splice(t,1))},e.getHTMLs=function(){return bo},t}();(wo=no=no||{})[wo.ORBITING=0]="ORBITING",wo[wo.EXPLORING=1]="EXPLORING",wo[wo.TRACKING=2]="TRACKING",(wo=ro=ro||{})[wo.DEFAULT=0]="DEFAULT",wo[wo.ROTATIONAL=1]="ROTATIONAL",wo[wo.TRANSLATIONAL=2]="TRANSLATIONAL",wo[wo.CINEMATIC=3]="CINEMATIC",(wo=io=io||{})[wo.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",wo[wo.PERSPECTIVE=1]="PERSPECTIVE";var xo="updated",wo=function(){function t(){this.canvas=void 0,this.eventEmitter=new Gn,this.matrix=W(),this.right=b(1,0,0),this.up=b(0,1,0),this.forward=b(0,0,1),this.position=b(0,0,1),this.focalPoint=b(0,0,0),this.distanceVector=b(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=W(),this.projectionMatrixInverse=W(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=no.EXPLORING,this.trackingMode=ro.DEFAULT,this.projectionMode=io.PERSPECTIVE,this.frustum=new rr,this.orthoMatrix=W()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===io.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===no.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===no.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==no.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return Y(W(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=lt(W(),[t,e,0]);this.jitteredProjectionMatrix=X(W(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===io.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===io.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===io.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===io.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===io.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===io.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=b(t.x-r,t.y-n,0),e=Pt(i,this.right)/kt(this.right),r=Pt(i,this.up)/kt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=io.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(da(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,Z(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=io.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),mt(this.projectionMatrix,s,n,r,e,i,a),Z(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ha(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=b(0,1,0);return this.focalPoint=ha(t,e,n),this.trackingMode===ro.CINEMATIC&&(t=(r=St(wt(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=kt(r),e=pa(Math.asin(e/r)),r=90+pa(Math.atan2(n,t)),st(n=W(),n,da(r)),ot(n,n,da(e)),i=Nt(wt(),[0,1,0],n)),Y(this.matrix,vt(W(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=wt(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=fa(t),this.computeMatrix(),this._getAxes(),this.type===no.ORBITING||this.type===no.EXPLORING?this._getPosition():this.type===no.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=fa(t),this.computeMatrix(),this._getAxes(),this.type===no.ORBITING||this.type===no.EXPLORING?this._getPosition():this.type===no.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=fa(t),this.computeMatrix(),this._getAxes(),this.type===no.ORBITING||this.type===no.EXPLORING?this._getPosition():this.type===no.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Dt(Bt(),[0,0,1],da(this.roll)),e=(q(this.matrix),Dt(Bt(),[1,0,0],da((this.rotateWorld&&this.type!==no.TRACKING||this.type===no.TRACKING?1:-1)*this.elevation))),n=Dt(Bt(),[0,1,0],da((this.rotateWorld&&this.type!==no.TRACKING||this.type===no.TRACKING?1:-1)*this.azimuth)),n=zt(Bt(),n,e),n=zt(Bt(),n,t),e=pt(W(),n);this.type===no.ORBITING||this.type===no.EXPLORING?($(this.matrix,this.matrix,this.focalPoint),X(this.matrix,this.matrix,e),$(this.matrix,this.matrix,[0,0,this.distance])):this.type===no.TRACKING&&($(this.matrix,this.matrix,this.position),X(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ha(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Mt(this.right,ha(Rt(It(),[1,0,0,0],this.matrix))),Mt(this.up,ha(Rt(It(),[0,1,0,0],this.matrix))),Mt(this.forward,ha(Rt(It(),[0,0,1,0],this.matrix))),At(this.right,this.right),At(this.up,this.up),At(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=kt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===no.TRACKING||this.rotateWorld?(this.elevation=pa(Math.asin(e/r)),this.azimuth=pa(Math.atan2(-t,-n))):(this.elevation=-pa(Math.asin(e/r)),this.azimuth=-pa(Math.atan2(-t,-n)))},e._getPosition=function(){Mt(this.position,ha(Rt(It(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Lt(this.distanceVector,[0,0,-this.distance],(t=C(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),_t(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=St(wt(),this.focalPoint,this.position),this.distance=kt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===io.ORTHOGRAPHIC&&(t=this.position,e=Dt(Bt(),[0,0,1],-this.roll*Math.PI/180),dt(this.orthoMatrix,e,b((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),b(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=X(W(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(xo))},e.rotate=function(t,e,n){throw new Error(yr)},e.pan=function(t,e){throw new Error(yr)},e.dolly=function(t){throw new Error(yr)},e.createLandmark=function(t,e){throw new Error(yr)},e.gotoLandmark=function(t,e){throw new Error(yr)},t}(),ko=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Mo=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),Oo=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),_o=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),So=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),Eo=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!je(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Ao=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!Ae(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),Po=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),To=(0,/\[\s*(.*)=(.*)\s*\]/),No=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(To),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!Ae(t))&&t.toString?t.toString():""},t}(),Lo=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,y=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new yo(eo.BOUNDS_CHANGED),this.rotate=(o=Bt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Ht(r=Bt(),e[0],e[1],e[2]),i=y.getRotation(t),a=y.getRotation(t.parentNode),qt(o,a),Wt(o,o),zt(r,o,r),zt(n.localRotation,r,i),Yt(n.localRotation,n.localRotation),y.dirtifyLocal(t,n)):y.rotateLocal(t,e)}),this.rotateLocal=(i=Bt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Ht(i,e[0],e[1],e[2]),Gt(n.localRotation,n.localRotation,i),y.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Bt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Ht(n.localRotation,e[0],e[1],e[2]),r=y.getRotation(t.parentNode),qt(a,Wt(Bt(),r)),Gt(n.localRotation,n.localRotation,a),y.dirtifyLocal(t,n)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;jt(e,wt())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,_t(n.localPosition,n.localPosition,e),y.dirtifyLocal(t,n))},this.setPosition=(r=W(),s=wt(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,jt(y.getPosition(t),s)||(Mt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,H(r,e.worldTransform),Y(r,r),Nt(n.localPosition,s,r)):Mt(n.localPosition,s),y.dirtifyLocal(t,n))}),this.setLocalPosition=(l=wt(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,jt(n.localPosition,l)||(Mt(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(c=wt(),u=wt(),f=wt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),jt(e="number"==typeof e?Ot(u,e,n,r):e,c)||(_t(f,y.getPosition(t),e),y.setPosition(t,f))}),this.setRotation=function(){var o=Bt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=Vt(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),qt(o,n),Wt(o,o),zt(a.localRotation,o,e),Yt(a.localRotation,a.localRotation),y.dirtifyLocal(t,a)):y.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=W(),h=wt(),d=Vt(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(dt(t.localTransform,t.localRotation,t.localPosition,b(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=q(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),X(t.localTransform,t.localTransform,e)),e=dt(n,d,h,t.localScale,t.origin),X(t.localTransform,t.localTransform,e)):dt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Ae(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;jt(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Ht(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=b(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=b(e[0],e[1],e[2]||n.localScale[2]);jt(e,n.localScale)||(Mt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=Vt(e,n,r,i));n=t.transformable;qt(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new O(2))[0]=i,r[1]=n,e=r);var r,i=t.transformable;n=i.localSkew,r=e,n[0]=r[0],n[1]=r[1],this.dirtifyLocal(t,i)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new mo(eo.ATTR_MODIFIED,t,n,n,e,mo.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return ut(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return ht(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return ft(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=ut(wt(),e),r=ht(Bt(),e),e=ft(wt(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return er.isEmpty(e)?null:((n=n||new er).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new er},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new er).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new er)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=W(),r=(t.parentNode.transformable&&(n=Y(W(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!er.isEmpty(r))return(e=new er).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(er.isEmpty(i)||(r=new er).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new ar(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new ar((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?X(e.worldTransform,n.worldTransform,e.localTransform):H(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),jo={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Co=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Fo=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Io=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Ro=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Io.exec(e)&&!Fo.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,jo.MetricsString+jo.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(jo.BaselineSymbol).width),s=jo.HeightMultiplier*o,o=o*jo.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=Fe(e)&&e+"px"||"16px",a=je(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!to.test(s)&&Ja.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(y.length),m=0;if(!u){for(var v=0;v<y.length;v++){var b=p.measureText(y[v]).width+(y[v].length-1)*c;g[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(y.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:y,lineWidths:g,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:g.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new ar(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength(),u.getPoint(0);for(var k=0;k<y.length;k++)p.measureText(y[k]).width,y[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},y=function(t){return r.getFromCache(t,a,p,l)},g=Array.from(u).reduce(function(t,e){return t+y(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=y(b);if(this.isNewline(b))d=0,f[++h]="";else{if(0<d&&c<d+k){if(s<=h+1){if(e.isOverflowing=!0,0<g&&g<=c){for(var M=0,O=0,_=0;_<f[h].length;_++){var S=y(f[h][_]);if(c<M+S+g){O=_;break}M+=S}f[h]=(f[h]||"").slice(0,O)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=y(x||""))}d+=k,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=jo.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=jo.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!Co.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!Co.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),Bo={},ko=(Eo=new Eo,So=new So,(Kl={})[x.CIRCLE]=new ko,Kl[x.ELLIPSE]=new Mo,Kl[x.RECT]=Eo,Kl[x.IMAGE]=Eo,Kl[x.GROUP]=Eo,Kl[x.LINE]=new Oo,Kl[x.TEXT]=new Ao(Bo),Kl[x.POLYLINE]=So,Kl[x.POLYGON]=So,Kl[x.PATH]=new _o,Kl[x.HTML]=null,Kl[x.MESH]=null,Kl),Ao=(Mo=new n,Eo=new a,(Oo={})[f.PERCENTAGE]=null,Oo[f.NUMBER]=new c,Oo[f.ANGLE]=new r,Oo[f.DEFINED_PATH]=new e,Oo[f.PAINT]=Mo,Oo[f.COLOR]=Mo,Oo[f.FILTER]=new Ki,Oo[f.LENGTH]=Eo,Oo[f.LENGTH_PERCENTAGE]=Eo,Oo[f.LENGTH_PERCENTAGE_12]=new o,Oo[f.LENGTH_PERCENTAGE_14]=new ta,Oo[f.COORDINATE]=new ea,Oo[f.OFFSET_DISTANCE]=new ra,Oo[f.OPACITY_VALUE]=new u,Oo[f.PATH]=new ia,Oo[f.LIST_OF_POINTS]=new aa,Oo[f.SHADOW_BLUR]=new oa,Oo[f.TEXT]=new sa,Oo[f.TEXT_TRANSFORM]=new la,Oo[f.TRANSFORM]=new ca,Oo[f.TRANSFORM_ORIGIN]=new Ji,Oo[f.Z_INDEX]=new ua,Oo[f.MARKER]=new na,Oo),So=(Bo.CameraContribution=wo,Bo.AnimationTimeline=null,Bo.EasingFunction=null,Bo.offscreenCanvas=new Po,Bo.displayObjectPool=new go,Bo.sceneGraphSelector=new No,Bo.sceneGraphService=new Lo(Bo),Bo.textService=new Ro(Bo),Bo.geometryUpdaterFactory=ko,Bo.CSSPropertySyntaxFactory=Ao,Bo.styleValueRegistry=new Qa,Bo.layoutRegistry=null,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function Do(){Do=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(g),a(g,i,"Generator"),a(g,r,function(){return this}),a(g,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function zo(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Wo(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){zo(r,e,n,i,a,"next",t)}function a(t){zo(r,e,n,i,a,"throw",t)}i(void 0)})}}function Ho(){return(Ho=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Vo(t,e){return(Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(_o=db=db||{}).READY="ready",_o.BEFORE_RENDER="beforerender",_o.AFTER_RENDER="afterrender",_o.BEFORE_DESTROY="beforedestroy",_o.AFTER_DESTROY="afterdestroy",_o.RESIZE="resize",_o.DIRTY_RECTANGLE="dirtyrectangle",new yo(eo.MOUNTED),new yo(eo.UNMOUNTED),new yo(db.BEFORE_RENDER),new yo(db.AFTER_RENDER);var qo=function(){function a(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return a.prototype.apply=function(t){function e(t){var e,a,o,s,l,c,u=t.target,f=u===d,h=f&&i?d:u.closest&&u.closest("[draggable=true]");h&&(e=function(){var e=Wo(Do().mark(function t(e){var n,r,i;return Do().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=ve([e.clientX,e.clientY],s),n<=m||r<=g)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,y=t.isDocumentDroppable,g=t.dragstartDistanceThreshold,m=t.dragstartTimeThreshold;n.hooks.init.tapPromise(a.tag,Wo(Do().mark(function t(){return Do().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(a.tag,function(){r.removeEventListener("pointerdown",e)})},a}(),Go=(qo.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Vo(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new qo(Ho({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(So)),Yo=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Uo={}.toString,Xo=function(t,e){return Uo.call(t)==="[object "+e+"]"},$o=function(t){return Xo(t,"Function")},Zo=function(t){return null==t},Ko=function(t){return Array.isArray?Array.isArray(t):Xo(t,"Array")},Qo=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function Jo(t,e){if(t)if(Ko(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Qo(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function ts(t){if(Ko(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])}function es(t){if(Ko(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])}var ns=function(t){return"object"==typeof t&&null!==t},rs=function(t){if(!ns(t)||!Xo(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},is=function(t){return Xo(t,"String")};function as(t,e,n){return t<e?e:n<t?n:t}var os=function(t){return Xo(t,"Number")},ss=1e-5;function ls(t,e,n){return void 0===n&&(n=ss),Math.abs(t-e)<n}function cs(t){return(t=ds(t)).charAt(0).toLowerCase()+t.substring(1)}var us=function(t,e){if(Ko(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=$o(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}},fs=function(t,e){if(Ko(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=$o(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},hs=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return Jo(n,function(t,e){$o(n)&&"prototype"===e||r.push(t)}),r},ds=function(t){return Zo(t)?"":t.toString()};function ps(t){return null===t}function ys(t){return void 0===t}function gs(t){return t instanceof Element||t instanceof HTMLDocument}var ms=function(t){t=ds(t);return t.charAt(0).toUpperCase()+t.substring(1)},vs={}.toString,bs=function(t){return vs.call(t).replace(/^\[object /,"").replace(/]$/,"")},xs=Object.prototype,ws=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xs)};function ks(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function Ms(t,e,n,r){return e&&ks(t,e),n&&ks(t,n),r&&ks(t,r),t}var Os=function(t){if("object"!=typeof t||null===t)return t;if(Ko(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=Os(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=Os(t[i]):e[i]=t[i];return e};function _s(a,o){var s;if($o(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var Ss=5;var I=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Ss,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&rs(o)?(rs(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ko(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Es=function(t,e){if(!Yo(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},As=Object.prototype.hasOwnProperty;function Ps(t,e,n){for(var r=0,i=is(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function Ts(e,t){var n;return null!==e&&rs(e)?(n={},Jo(t,function(t){Is.call(e,t)&&(n[t]=e[t])}),n):{}}function Ns(t,r){return n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={},Ko(t=t)||rs(t)?(i=e,Jo(t,function(t,e){i=n(i,t,e)}),i):t;var n,e,i}function Ls(){}function js(t){return t}var Cs,Fs=function(t,e){if(t===e)return!0;if(t&&e&&!is(t)&&!is(e)){if(Yo(t)||Yo(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Fs(t[r],e[r]));r++);return n}if(ns(t)||ns(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=Fs(t[i[r]],e[i[r]]));r++);return n}}return!1},Is=Object.prototype.hasOwnProperty,Rs=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Bs(t){return Zo(t)?0:(Yo(t)?t:Object.keys(t)).length}var Ds=_s(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Cs=Cs||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Cs.measureText(is(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],hs(e=void 0===e?{}:e)).join("")});const zs=()=>[["cartesian"]],Ws=(zs.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),Hs=(Ws.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),Vs=(Hs.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),qs=(Vs.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),Gs=(qs.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Ys=(Gs.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),Us=(Ys.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...Vs(),...Ws({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Xs=(Us.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...qs(),...Ws({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),$s=(Xs.props={},()=>[["parallel",0,1,0,1]]),Zs=($s.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),Ks=(Zs.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),Qs=(Ks.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),Js=(Qs.props={},({value:e})=>t=>t.map(()=>e)),tl=(Js.props={},({value:e})=>t=>t.map(e)),el=(tl.props={},({value:e})=>t=>t.map(t=>t[e])),nl=(el.props={},({value:t})=>()=>t);function rl(t,e){return t.parent===e.parent?1:2}function il(t,e){return t+e.x}function al(t,e){return Math.max(t,e.y)}function ol(){var s=rl,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(il,0)/e.length,t.y=1+n.reduce(al,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function sl(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function ll(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ul)):void 0===e&&(e=cl);for(var n,r,i,a,o,t=new dl(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new dl(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(hl)}function cl(t){return t.children}function ul(t){return Array.isArray(t)?t[1]:null}function fl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function hl(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function dl(t){this.data=t,this.depth=this.height=0,this.parent=null}function pl(t){return null==t?null:yl(t)}function yl(t){if("function"!=typeof t)throw new Error;return t}function gl(){return 0}function ml(t){return function(){return t}}nl.props={},dl.prototype=ll.prototype={constructor:dl,count:function(){return this.eachAfter(sl)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return ll(this).eachBefore(fl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const vl=4294967296;function bl(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&wl(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Ml(t[0],t[1]);case 3:return Ol(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(kl(e,t))return[e];for(n=0;n<t.length;++n)if(xl(e,t[n])&&kl(Ml(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(xl(Ml(t[n],t[r]),e)&&xl(Ml(t[n],e),t[r])&&xl(Ml(t[r],e),t[n])&&kl(Ol(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function xl(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function wl(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function kl(t,e){for(var n=0;n<e.length;++n)if(!wl(t,e[n]))return;return 1}function Ml(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Ol(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,y=r*r+i*i-t*t,a=y-a*a-o*o+e*e,o=y-s*s-l*l+n*n,e=u*f-c*h,y=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+y*s+l*n),a=y*y+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+y+s*o,y:i+l+n*o,r:o}}function _l(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Sl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function El(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Al(t){this._=t,this.next=null,this.previous=null}function Pl(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;_l(r,d,i=t[2]),d=new Al(d),r=new Al(r),i=new Al(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){_l(d._,r._,i=t[l]),i=new Al(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Sl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Sl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=El(d);(i=i.next)!==r;)(s=El(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=bl(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Tl(t){return Math.sqrt(t.value)}function Nl(){var n=null,r=1,i=1,a=gl;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%vl)/vl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Ll(n)).eachAfter(jl(a,.5,e)).eachBefore(Cl(1)):t.eachBefore(Ll(Tl)).eachAfter(jl(gl,1,e)).eachAfter(jl(a,t.r/Math.min(r,i),e)).eachBefore(Cl(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=pl(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:ml(+t),e):a},e}function Ll(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function jl(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Pl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Cl(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Fl(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 Il(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Rl={depth:-1},Bl={},Dl={};function zl(t){return t.id}function Wl(t){return t.parentId}function Hl(){var g,m=zl,v=Wl;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=g){const p=c.map((t,e)=>{t=g(t,e,n),e=(t=""+t).length;return"/"===(t=ql(t,e-1)&&!ql(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),y=p.map(Vl);var d=new Set(p).add("");for(const r of y)d.has(r)||(d.add(r),p.push(r),y.push(Vl(r)),c.push(Dl));u=(t,e)=>p[e],f=(t,e)=>y[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new dl(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?Bl:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===Bl)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=g){for(;i.data===Dl&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Dl;--t)o.data=null}if(i.parent=Rl,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(hl),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=pl(t),e):m},e.parentId=function(t){return arguments.length?(v=pl(t),e):v},e.path=function(t){return arguments.length?(g=pl(t),e):g},e}function Vl(t){let e=t.length;if(e<2)return"";for(;1<--e&&!ql(t,e););return t.slice(0,e)}function ql(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Gl(t,e){return t.parent===e.parent?1:2}function Yl(t){var e=t.children;return e?e[0]:t.t}function Ul(t){var e=t.children;return e?e[e.length-1]:t.t}function Xl(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function $l(){var h=Gl,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new Xl(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new Xl(r[i],i)),n.parent=e;return(t.parent=new Xl(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=Ul(o),i=Yl(i),o&&i;)s=Yl(s),(a=Ul(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(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(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!Ul(a)&&(a.t=o,a.m+=u-c),i&&!Yl(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Zl(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}Xl.prototype=Object.create(dl.prototype);var Kl=(1+Math.sqrt(5))/2;function Ql(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,y,g,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(g=(f=h=u)*u*(y=Math.max(c/l,l/c)/(k*t)),p=Math.max(h/g,g/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),g=u*u*y,p<(d=Math.max(h/g,g/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?Il(o,n,r,i,k?r+=c*u/k:a):Zl(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return m}var Jl=function e(a){function t(t,e,n,r,i){Ql(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Kl);function tc(t,e,n,r,i){var a,o,y=t.children,s=y.length,g=new Array(s+1);for(g[0]=o=a=0;a<s;++a)g[a+1]=o+=y[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=y[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=g[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;g[h]<c?u=1+h:f=h}c-g[u-1]<g[u]-c&&e+1<u&&--u;var l=g[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function ec(t,e,n,r,i){(1&t.depth?Zl:Il)(t,e,n,r,i)}var nc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Il(o,e,n,r,h?n+=(i-n)*o.value/h:i):Zl(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=Ql(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Kl);function rc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function ic(t={}){return[...rc(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function ac(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function oc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function sc(t={}){return rc(t)}function lc(){return[{type:"maybeKey"}]}function cc(t,e){return t.getBandWidth(t.invert(e))}function uc(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),y=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?cc(l,a[e]):0;var r=p?cc(c,o[e]):0,e=y&&s?(cc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function fc(t){return parseFloat(t)/100}function hc(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?fc(e)*o:+e,"string"==typeof t?fc(t)*s:+t]]})]}function dc(e){return"function"==typeof e?e:t=>t[e]}function pc(t,e){return Array.from(t,dc(e))}function yc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=pc(t,e),o=pc(t,n),s=pc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function gc(t,e){return t.getBandWidth(t.invert(e))}const mc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=gc(c,a[t]),n=e*(u?gc(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};mc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...ic({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...lc(),...oc()],interaction:{shareTooltip:!0}};const vc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function bc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function xc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=bc,o=(t,e)=>bc(n(t),e),(t,e)=>n(t)-e):(a=n===bc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:wc,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function wc(){return 0}vc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...ic({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...lc(),...oc()],interaction:{shareTooltip:!0}};n=xc(bc).right;const kc=xc(function(t){return null===t?NaN:+t}).center;var Mc=n;function Oc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function _c(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Sc(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Ec{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Ac extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Pc(this,t))}has(t){return super.has(Pc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Pc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Tc(t){return t}function Nc(t,...e){return Cc(t,Tc,Tc,e)}function Lc(t,e,...n){return Cc(t,Tc,e,n)}function jc(t,e,...n){return Cc(t,Array.from,e,n)}function Cc(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Ac,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Fc(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Rc(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Rc(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Ic(n))}function Ic(r=bc){if(r===bc)return Rc;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Rc(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Bc=Array.prototype.slice;function Dc(t){return()=>t}var zc=Math.sqrt(50),Wc=Math.sqrt(10),Hc=Math.sqrt(2);function Vc(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(zc<=n?10:Wc<=n?5:Hc<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(zc<=n?10:Wc<=n?5:Hc<=n?2:1)}function qc(t){return Math.ceil(Math.log(Oc(t))/Math.LN2)+1}function Gc(){var y=Tc,g=Sc,m=qc;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=y(t[a],a,t);var o=g(i),s=o[0],l=o[1],c=m(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(g===Sc&&([s,l]=function(t,e,n){let r;for(;;){var i=Vc(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=Vc(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=Vc(s,l,u)),c[c.length-1]>=l)if(l<=o&&g===Sc){const n=Vc(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length;c[0]<=s;)c.shift(),--f;for(;c[f-1]>l;)c.pop(),--f;var h,d,p=new Array(f+1);for(a=0;a<=f;++a)(h=p[a]=[]).x0=0<a?c[a-1]:s,h.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&p[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(d=Math.floor((s-e)*n),p[Math.min(f,d+(c[d]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&p[Mc(c,e,0,f)].push(t[a]);return p}return e.value=function(t){return arguments.length?(y="function"==typeof t?t:Dc(t),e):y},e.domain=function(t){return arguments.length?(g="function"==typeof t?t:Dc([t[0],t[1]]),e):g},e.thresholds=function(t){return arguments.length?(m="function"==typeof t?t:Array.isArray(t)?Dc(Bc.call(t)):Dc(t),e):m},e}function Yc(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function Uc(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function Xc(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function $c(n,r,i=0,a=n.length-1,o){for(o=void 0===o?Rc:Ic(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),$c(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,f=n[r];let t=i,e=a;for(Zc(n,i,r),0<o(n[a],f)&&Zc(n,i,a);t<e;){for(Zc(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?Zc(n,i,e):Zc(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function Zc(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Kc(t,e,n){var r;if(n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)return(e=+e)<=0||n<2?Xc(t):1<=e?Yc(t):(n=(n-1)*e,(r=Yc($c(t,e=Math.floor(n)).subarray(0,e+1)))+(Xc(t.subarray(e+1))-r)*(n-e))}function Qc(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function Jc(t,e){return Kc(t,.5,e)}function tu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function eu(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function nu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function ru(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function iu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function au(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function ou(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function su(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function lu(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function cu(t){return ou(t)||iu(t)}const uu=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Nc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},fu=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},hu=()=>(t,e,n,r)=>{return(su(r)?fu:uu)(t,e,n,r)};hu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...ic({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...lc(),...oc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const du=y=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=uc(e,n,y),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};du.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...ic({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...lc(),{type:"maybeSize"},...ac()]};const pu=s=>{const{cartesian:l=!1}=s;return l?hc:(t,e,n,r)=>{if(l)return hc(t,0,n,r);const{x:i,y:a}=n,o=uc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};pu.props={defaultShape:"text",defaultLabelShape:"label",channels:[...ic({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...lc(),...ac()]};const yu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};yu.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...ic({shapes:["rect","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...lc(),...ac()]};const gu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Nc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};gu.props={defaultShape:"area",defaultLabelShape:"label",channels:[...ic({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...lc(),...oc()],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const mu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=uc(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};mu.props={defaultShape:"link",defaultLabelShape:"label",channels:[...ic({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...lc(),...ac()]};const vu=s=>{var t=s["cartesian"];return t?hc:(t,e,n,r)=>{const{x:i,y:a}=n,o=uc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};vu.props={defaultShape:"image",defaultLabelShape:"label",channels:[...ic({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...lc(),...ac()]};const bu=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};bu.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...ic({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...lc(),...ac()]};const xu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,y=e.x,g=e.series;return[t,Array.from(t,t=>{var e=y.getBandWidth(y.invert(+l[t])),n=e*(g?g.getBandWidth(g.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},wu=(xu.props={defaultShape:"box",defaultLabelShape:"label",channels:[...ic({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...lc(),...oc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});wu.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...ic({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...lc(),...ac()]};const ku=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};ku.props={defaultShape:"line",defaultLabelShape:"label",channels:[...sc({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...lc()]};const Mu=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Mu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...sc({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...lc()]};const Ou=(...t)=>mu(...t);function _u(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Su(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=_u("x",r,n,e.x),o=_u("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Ou.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...sc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...lc()]};const Eu=()=>Su();Eu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...sc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...lc()]};const Au=()=>Su({extendY:!0});Au.props={defaultShape:"range",defaultLabelShape:"label",channels:[...sc({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...lc()]};const Pu=()=>Su({extendX:!0});function Tu(t){return t.target.depth}function Nu(t,e){return t.sourceLinks.length?t.depth:e-1}function Lu(t){return function(){return t}}function ju(t,e){return Fu(t.source,e.source)||t.index-e.index}function Cu(t,e){return Fu(t.target,e.target)||t.index-e.index}function Fu(t,e){return t.y0-e.y0}function Iu(t){return t.value}function Ru(t){return t.index}function Bu(t){return t.nodes}function Du(t){return t.links}function zu(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function Wu({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function Hu(){let x=0,w=0,k=1,M=1,O=24,_=8,S,E=Ru,A=Nu,P,T,N,L=Bu,j=Du,C=6;function e(e){e={nodes:L(e),links:j(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const y=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=zu(y,n)),"object"!=typeof r&&(r=t.target=zu(y,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=N)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(N),r.sort(N)}t=e.nodes;for(const g of t)g.value=void 0===g.fixedValue?Math.max(nu(g.sourceLinks,Iu),nu(g.targetLinks,Iu)):g.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(P){var s,l=Math.max(Yc(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=P.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(Yc(t,t=>t.depth)+1,0),n=(k-x-O)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+O,r[i]?r[i].push(a):r[i]=[a]}if(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(_,(M-w)/(Yc(u,t=>t.length)-1)),u),f=Xc(t,t=>(M-w-(t.length-1)*S)/nu(t,Iu));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===N)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Cu),n.sort(ju)}(m)}for(let t=0;t<C;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/C);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(Fu),o.length&&F(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(Fu),o.length&&F(o,i)}}(u,d,p)}return Wu(e),e}function F(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,M,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function I({sourceLinks:t,targetLinks:e}){if(void 0===N){for(const{source:{sourceLinks:t}}of e)t.sort(Cu);for(const{target:{targetLinks:e}}of t)e.sort(ju)}}return e.update=function(t){return Wu(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Lu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Lu(t),e):A},e.nodeDepth=function(t){return arguments.length?(P=t,e):P},e.nodeSort=function(t){return arguments.length?(T=t,e):T},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(L="function"==typeof t?t:Lu(t),e):L},e.links=function(t){return arguments.length?(j="function"==typeof t?t:Lu(t),e):j},e.linkSort=function(t){return arguments.length?(N=t,e):N},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],M=+t[1],e):[k-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[k,M]]},e.iterations=function(t){return arguments.length?(C=+t,e):C},e}Pu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...sc({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...lc()]};const Vu={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},qu={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Xc(t.sourceLinks,Tu)-1:0},justify:Nu};const Gu=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},Vu,f),l=Hu().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?qu[n]||Nu:"function"==c?n:Nu).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function Yu(t){return t}function Uu(t=""){throw new Error(t)}function Xu(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function $u(t){return null!=t&&!Number.isNaN(t)}function Q(t,e){return Zu(t,e)||{}}function Zu(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[cs(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function Ku(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}Gu.props={};const Qu=g=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=g,{links:t,nodes:l}=yc(t,e),c=Q(e,"node"),e=Q(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=Gu(Object.assign(Object.assign(Object.assign({},m),{nodeId:dc(u)}),i))({links:t,nodes:l});const h=Q(r,"label"),{text:d=u,spacing:p=5}=h,y=K(h,["text","spacing"]);return[I({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:Q(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),y),...a],animate:"object"==typeof s?Q(s,"node"):s}),I({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},Q(r,"link")),animate:"object"==typeof s?Q(s,"link"):s})]}},Ju=(Qu.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);Ju.props={defaultShape:"path",defaultLabelShape:"label",channels:[...ic({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...lc()]};const tf=t=>t?parseInt(t):0;function ef(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||tf(t.width),e=e.clientHeight||tf(t.height),{width:(i={width:i-(tf(t.paddingLeft)+tf(t.paddingRight)),height:e-(tf(t.paddingLeft)+tf(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function nf(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function rf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:tc,treemapDice:Il,treemapSlice:Zl,treemapSliceDice:ec,treemapSquarify:Jl,treemapResquarify:nc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?Hl().path(p):Hl():ll)(t));function y(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(g),l=[0],i&&t.eachBefore(Fl),t}function g(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=Jl,i=!1,s=a=1,l=[0],d=h=f=u=c=gl,y.round=function(t){return arguments.length?(i=!!t,y):i},y.size=function(t){return arguments.length?(a=+t[0],s=+t[1],y):[a,s]},y.tile=function(t){return arguments.length?(o=yl(t),y):o},y.padding=function(t){return arguments.length?y.paddingInner(t).paddingOuter(t):y.paddingInner()},y.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:ml(+t),y):c},y.paddingOuter=function(t){return arguments.length?y.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):y.paddingTop()},y.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:ml(+t),y):u},y.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:ml(+t),y):f},y.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:ml(+t),y):h},y.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:ml(+t),y):d},y.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const af=u=>t=>{var{width:t,height:e}=nf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=rf(n,I({},c,o),r),n=Q(a,"label");return[I({},t,Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l))]},of=(af.props={composite:!0},u=>t=>{var{width:t,height:e}=nf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Ko(t)?Hl().path(e.path):ll)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Nl().size(e.size).padding(e.padding)(n),n.descendants()})(n,I({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),I({},c.encode,r)),t=Q(a,"label");return[I({},c,Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l))]});function sf(t,e){return Xc(t,t=>e[t])}function lf(t,e){return Yc(t,t=>e[t])}function cf(t,e){const n=2.5*uf(t,e)-1.5*hf(t,e);return Xc(t,t=>e[t]>=n?e[t]:NaN)}function uf(t,e){return Kc(t,.25,t=>e[t])}function ff(t,e){return Kc(t,.5,t=>e[t])}function hf(t,e){return Kc(t,.75,t=>e[t])}function df(t,e){const n=2.5*hf(t,e)-1.5*uf(t,e);return Yc(t,t=>e[t]<=n?e[t]:NaN)}function pf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Nc(t,t=>a[+t]).values()).flatMap(t=>{const e=cf(t,i),n=df(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}of.props={composite:!0};const yf=o=>()=>{var{data:t,encode:e,style:n={}}=o,{extend:r=!1}=n,n=K(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},a={y1:uf,y2:ff,y3:hf};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:sf},a),{y4:lf})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=Q(n,"box"),n=Q(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:cf},a),{y4:df})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:pf}],encode:e,style:Object.assign({},n)}])},gf=(yf.props={composite:!0},s=>{var t=s["cartesian"];return t?hc:(t,e,n,r)=>{const{x:i,y:a}=n,o=uc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function mf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},y=t._x0,g=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(y+m)/2))?y=a:m=a,(u=n>=(o=(g+v)/2))?g=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(y+m)/2))?y=a:m=a,(u=n>=(o=(g+v)/2))?g=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function vf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function bf(t){return t[0]}function xf(t){return t[1]}function wf(t,e,n){e=new kf(null==e?bf:e,null==n?xf:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function kf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Mf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}gf.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};a=wf.prototype=kf.prototype;function Of(t){return function(){return t}}function _f(t){return 1e-6*(t()-.5)}function Sf(t){return t.index}function Ef(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Af(c){var u,f,a,o,h,d,s=Sf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Of(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||_f(d),o=i.y+i.vy-r.y-r.vy||_f(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Ef(r,t.source)),"object"!=typeof t.target&&(t.target=Ef(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),y()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function y(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Of(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Of(+t),y(),e):r},e}a.copy=function(){var t,e,n=new kf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Mf(e));else n._root=Mf(r);return n},a.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return mf(this.cover(e,n),e,n,t)},a.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)mf(this,i[u],a[u],t[u]);return this},a.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},a.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},a.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},a.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,y=[],g=this._root;for(g&&y.push(new vf(g,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=y.pop();)!(g=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(g.length?(y.push(new vf(g[3],a=(s+o)/2,c=(l+i)/2,o,i),new vf(g[2],s,c,a,i),new vf(g[1],a,l,o,c),new vf(g[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=y[y.length-1],y[y.length-1]=y[y.length-1-i],y[y.length-1-i]=r)):(l=(o=t-+this._x.call(null,g.data))*o+(s=e-+this._y.call(null,g.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=g.data));return u},a.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,y=this._x1,g=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+y)/2))?d=s:y=s,(c=o>=(s=(p+g)/2))?p=s:g=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},a.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},a.root=function(){return this._root},a.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},a.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new vf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new vf(e,o,s,i,a)),(e=c[2])&&l.push(new vf(e,n,s,o,a)),(e=c[1])&&l.push(new vf(e,o,r,i,s)),e=c[0])&&l.push(new vf(e,n,r,o,s));return this},a.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new vf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new vf(i,a,o,c,u)),(i=f[1])&&n.push(new vf(i,c,o,s,u)),(i=f[2])&&n.push(new vf(i,a,u,c,l)),i=f[3])&&n.push(new vf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},a.x=function(t){return arguments.length?(this._x=t,this):this._x},a.y=function(t){return arguments.length?(this._y=t,this):this._y};var Pf={value:()=>{}};function Tf(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Nf(r)}function Nf(t){this._=t}function Lf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Pf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Nf.prototype=Tf.prototype={constructor:Nf,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Lf(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Lf(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Nf(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var jf,Cf,Ff=0,If=0,Rf=0,Bf=1e3,Df=0,zf=0,Wf=0,Hf="object"==typeof performance&&performance.now?performance:Date,Vf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qf(){return zf||(Vf(Gf),zf=Hf.now()+Wf)}function Gf(){zf=0}function Yf(){this._call=this._time=this._next=null}function Uf(t,e,n){var r=new Yf;return r.restart(t,e,n),r}function Xf(){zf=(Df=Hf.now())+Wf,Ff=If=0;try{qf(),++Ff;for(var t,e=jf;e;)0<=(t=zf-e._time)&&e._call.call(void 0,t),e=e._next;--Ff}finally{for(var n,r,i=jf,a=1/(Ff=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:jf=r);Cf=n,Zf(a),zf=0}}function $f(){var t=Hf.now(),e=t-Df;Bf<e&&(Wf-=e,Df=t)}function Zf(t){Ff||(If=If&&clearTimeout(If),24<t-zf?(t<1/0&&(If=setTimeout(Xf,t-Hf.now()-Wf)),Rf=Rf&&clearInterval(Rf)):(Rf||(Df=Hf.now(),Rf=setInterval($f,Bf)),Ff=1,Vf(Xf)))}Yf.prototype=Uf.prototype={constructor:Yf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qf():+n)+(null==e?0:+e),this._next||Cf===this||(Cf?Cf._next=this:jf=this,Cf=this),this._call=t,this._time=n,Zf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zf())}};const Kf=4294967296;function Qf(t){return t.x}function Jf(t){return t.y}var th=10,eh=Math.PI*(3-Math.sqrt(5));function nh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=Uf(i),n=Tf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Kf)/Kf}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=th*Math.sqrt(.5+r),e=r*eh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function rh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=Of(-30),d=(h=1)/0,p=.81,y.initialize=function(t,e){i=t,c=e,R()},y.strength=function(t){return arguments.length?(r="function"==typeof t?t:Of(+t),R(),y):r},y.distanceMin=function(t){return arguments.length?(h=t*t,y):Math.sqrt(h)},y.distanceMax=function(t){return arguments.length?(d=t*t,y):Math.sqrt(d)},y.theta=function(t){return arguments.length?(p=t*t,y):Math.sqrt(p)},y);function y(t){var e,n=i.length,r=wf(i,Qf,Jf).visitAfter(B);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function R(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function B(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=_f(c))*i),0===a&&(s+=(a=_f(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=_f(c))*i),0===a&&(s+=(a=_f(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var g,m,v,b,x,w,k,M,O,_,S,E,A,P,n=Af(a).id(dc(n)),T=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),nh(t).force("link",n).force("charge",I));function N(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function L(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+g(m[t],t,m))?0:+x(m[t],t,m)}}function j(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(O[n]-e.x)*M[n]*t}function C(){if(k){var t,e=k.length;for(M=new Array(e),O=new Array(e),t=0;t<e;++t)M[t]=isNaN(O[t]=+w(k[t],t,k))?0:+_(k[t],t,k)}}function F(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*P,r=(r/e-E)*P,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(P=1,null==S&&(S=0),null==E&&(E=0),F.initialize=function(t){A=t},F.x=function(t){return arguments.length?(S=+t,F):S},F.y=function(t){return arguments.length?(E=+t,F):E},F.strength=function(t){return arguments.length?(P=+t,F):P},F)):T.force("x",(_=Of(.1),"function"!=typeof w&&(w=Of(null==w?0:+w)),j.initialize=function(t){k=t,C()},j.strength=function(t){return arguments.length?(_="function"==typeof t?t:Of(+t),C(),j):_},j.x=function(t){return arguments.length?(w="function"==typeof t?t:Of(+t),C(),j):w},j)).force("y",(x=Of(.1),"function"!=typeof g&&(g=Of(null==g?0:+g)),N.initialize=function(t){m=t,L()},N.strength=function(t){return arguments.length?(x="function"==typeof t?t:Of(+t),L(),N):x},N.y=function(t){return arguments.length?(g="function"==typeof t?t:Of(+t),L(),N):g},N)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const ih=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=Q(e,"node"),c=Q(e,"link"),{links:t,nodes:u}=yc(t,e),{nodesData:t,linksData:u}=rh({links:t,nodes:u},I({},{joint:!0},i),e);return[I({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:Q(r,"link"),animate:"object"==typeof s?Q(s,"link"):s}),I({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:Q(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),Q(r,"label")),...a],animate:"object"==typeof s?Q(s,"node"):s})]},ah=(ih.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=ll(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),oh=t=>ah(ol)(t),sh=(oh.props={},t=>ah($l)(t)),lh=(sh.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=sh(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[I({},h,{data:l,encode:Q(e,"link"),scale:Q(n,"link"),labels:o,style:Object.assign({stroke:"#999"},Q(r,"link")),animate:"object"==typeof s?Q(s,"link"):s}),I({},f,{data:i,scale:Q(n,"node"),encode:Q(e,"node"),labels:[Object.assign(Object.assign({},d),Q(r,"label")),...a],style:Object.assign({},Q(r,"node")),animate:"object"==typeof s?Q(s,"node"):s})]}});lh.props={composite:!0};var ch={},uh={},fh=34,hh=10,dh=13;function ph(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function yh(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function gh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function mh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+gh(-e,6):9999<e?"+"+gh(e,6):gh(e,4))+"-"+gh(t.getUTCMonth()+1,2)+"-"+gh(t.getUTCDate(),2)+(a?"T"+gh(n,2)+":"+gh(r,2)+":"+gh(i,2)+"."+gh(a,3)+"Z":i?"T"+gh(n,2)+":"+gh(r,2)+":"+gh(i,2)+"Z":r||n?"T"+gh(n,2)+":"+gh(r,2)+"Z":"")}function vh(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return uh;if(l)return l=!1,ch;var t,e,n=a;if(r.charCodeAt(n)===fh){for(;a++<i&&r.charCodeAt(a)!==fh||r.charCodeAt(++a)===fh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===hh?l=!0:e===dh&&(l=!0,r.charCodeAt(a)===hh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===hh)l=!0;else if(e===dh)l=!0,r.charCodeAt(a)===hh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===hh&&--i,r.charCodeAt(i-1)===dh&&--i;(e=c())!==uh;){for(var u=[];e!==ch&&e!==uh;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?mh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=ph(n=t),function(t,e){return r(i(t),e,n)}):ph(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?yh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?yh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function bh(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;xh&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const xh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),wh=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ne(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),vh(i).parse(t,a?bh:Yu);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};wh.props={};const kh=t=>{const{fields:a,as:n=[]}=t;return t=>{if(!a||(e=a,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<a.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:a[t],[i]:n[a[t]]}));return e},[])}};kh.props={};const Mh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)};function Oh(t,e,n){return Math.min(n,Math.max(e,t))}Mh.props={};const _h=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=Oh(n,0,t.length-1),r=Oh(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},Sh=(_h.props={},t=>{t=t.fields;return _h({fields:t})});Sh.props={};const Eh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Eh.props={};const Ah=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Ph=(Ah.props={},t=>{const e=t["value"];return()=>e}),Th=(Ph.props={},t=>{const{callback:e=Yu}=t;return t=>e(t)}),Nh=(Th.props={},t=>{const{callback:e=Yu}=t;return t=>Array.isArray(t)?t.map(e):t});Nh.props={};var Lh=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const jh={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Ch(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:y,sourceWeight:g,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},jh),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=y(t),t.sourceWeight=g(t),t.targetWeight=m(t)});const i=Nc(r,t=>t.source),a=Nc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=nu(e,t=>t.sourceWeight)+nu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:Lh[v])&&r.sort(n),!(n=(r=e).length))throw Uu("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=y(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Nc(e,t=>t.source),l=Nc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Fh=e=>t=>Ch(e)(t),Ih=(Fh.props={},Math.PI/180),Rh=64,Bh=2048;function Dh(t){return t.text}function zh(){return"serif"}function Wh(){return"normal"}function Hh(t){return t.value}function Vh(){return 90*~~(2*Math.random())}function qh(){return 1}function Gh(){}function Yh(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(Rh<<5)/c,Bh/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*Ih),h=Math.cos(o.rotate*Ih),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=Rh<<5&&(i=0,a+=n,n=0),a+e>=Bh)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*Ih),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(Rh<<5)/c,Bh/c).data,y=[];0<=--s;)if((o=r[s]).hasText){var g=o.width,m=g>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)y[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<g;t++){var v=m*e+(t>>5),b=p[(a+e)*(Rh<<5)+(i+t)<<2]?1<<31-t%32:0;y[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=y.slice(0,(o.y1-o.y0)*m)}}}function Uh(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Xh(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function $h(){return document.createElement("canvas")}function Zh(t){return"function"==typeof t?t:function(){return t}}const Kh={archimedean:Uh,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function Qh(){let b=[256,256],r=Dh,i=zh,p=Hh,y=Wh,g=Vh,m=qh,x=Uh,w=Math.random,v=Gh,k=[],M=null,O=1/0;const _=Wh,S=$h,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(Rh<<5)/e,t.height=Bh/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||Xh((b[0]>>5)*b[1]),c=k.length,u=[],f=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=g.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,Yh(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,y=t.x-(d<<4),g=127&y,m=32-g,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(y>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>g:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=Xh((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){k=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=Zh(t)},E.font=function(t){i=Zh(t)},E.fontWeight=function(t){y=Zh(t)},E.rotate=function(t){g=Zh(t)},E.spiral=function(t){x=Kh[t]||t},E.fontSize=function(t){p=Zh(t)},E.padding=function(t){m=Zh(t)},E.random=function(t){w=Zh(t)},E.on=function(t){v=Zh(t)},E}const Jh={size:[500,500],fontSize:[14,28]};function td(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const ed=h=>f=>ne(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},Jh,h),e=Qh(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ne(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[Xc(e),Yc(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",td,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=K(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function nd(e){return"string"==typeof e?t=>t[e]:e}ed.props={};const rd=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=nd(r),l=nd(t),c=Lc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};rd.props={};const id=u=>c=>ne(void 0,void 0,void 0,function*(){var{width:t,height:e}=nf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=K(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield ed(Object.assign(Object.assign({},l),o))(e);return[I({},t,Object.assign({data:n,encode:r,scale:i,style:a},s))]}),ad=(id.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),od=(ad.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),sd=(od.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),ld=(sd.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),cd=(ld.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),ud=(cd.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),fd=(ud.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),hd=(fd.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),dd=(hd.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),pd=(dd.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),yd=(pd.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),gd=(yd.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),md=(gd.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),vd=(md.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),bd=(vd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),xd=(bd.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),wd=(xd.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),kd=(wd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Md=(kd.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Od=(Md.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function _d(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Sd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Ed(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Od.props={};const Ad=Math.sqrt(50),Pd=Math.sqrt(10),Td=Math.sqrt(2);function Nd(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Ad?10:n>=Pd?5:n>=Td?2:1)*10**t:-(10**-t)/(n>=Ad?10:n>=Pd?5:n>=Td?2:1)}function Ld(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Ad?r*=10:n>=Pd?r*=5:n>=Td&&(r*=2),e<t?-r:r}const jd=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Nd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Nd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Nd(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},Cd=36e5,Fd=864e5,Id=7*Fd;Fd,Fd;function Rd(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}c=Rd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),r=Rd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),e=Rd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),Mo=Rd(Cd,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Cd*e)},t=>t.getHours()),Ki=Rd(Fd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Fd*e)},t=>t.getDate()-1);const Bd=Rd(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());Eo=Rd(Id,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Id*e)},t=>{var e=Bd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Id)}),o=Rd(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const Dd={millisecond:c,second:r,minute:e,hour:Mo,day:Ki,week:Eo,month:Bd,year:o};ta=Rd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ea=Rd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ra=Rd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),u=Rd(Cd,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Cd*e)},t=>t.getUTCHours()),ia=Rd(Fd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Fd*e)},t=>t.getUTCDate()-1);const zd=Rd(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());aa=Rd(Id,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Id*e)},t=>{var e=zd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Id)}),oa=Rd(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const Wd={millisecond:ta,second:ea,minute:ra,hour:u,day:ia,week:aa,month:zd,year:oa};function Hd(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?Wd:Dd;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Ed(i,l,0,c,s);let f;return f=u===c?[a,Ld(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Ld(t,e,n),1)]}const Vd=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Hd(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function qd(t){return!ys(t)&&!ps(t)&&!Number.isNaN(t)}const Gd=e=>t=>-e(-t),Yd=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Gd(t):t},Ud=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Gd(n):n},Xd=(t,e,n,r)=>{var i=t<0,a=Yd(r,i),r=Ud(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function $d(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return os(t)?Math.round(t):t}):i;this.output=_d(a,r,e,t)},t.prototype.invert=void 0}}var Zd,sa={exports:{}},la={exports:{}},Kd=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Qd=Array.prototype.concat,Jd=Array.prototype.slice,t0=la.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Kd(i)?e=Qd.call(e,Jd.call(i)):e.push(i)}return e},e0=(t0.wrap=function(t){return function(){return t(t0(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),n0=la.exports,r0=Object.hasOwnProperty,i0=Object.create(null);for(Zd in e0)r0.call(e0,Zd)&&(i0[e0[Zd]]=Zd);var a0=sa.exports={to:{},get:{}};function o0(t,e,n){return Math.min(Math.max(e,t),n)}function s0(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}a0.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=a0.get.hsl(t),n="hsl";break;case"hwb":e=a0.get.hwb(t),n="hwb";break;default:e=a0.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},a0.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:r0.call(e0,e[1])?((i=e0[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=o0(i[n],0,255);return i[3]=o0(i[3],0,1),i},a0.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,o0(parseFloat(t[2]),0,100),o0(parseFloat(t[3]),0,100),o0(isNaN(e)?1:e,0,1)]):null},a0.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,o0(parseFloat(t[2]),0,100),o0(parseFloat(t[3]),0,100),o0(isNaN(e)?1:e,0,1)]):null},a0.to.hex=function(){var t=n0(arguments);return"#"+s0(t[0])+s0(t[1])+s0(t[2])+(t[3]<1?s0(Math.round(255*t[3])):"")},a0.to.rgb=function(){var t=n0(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a0.to.rgb.percent=function(){var t=n0(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},a0.to.hsl=function(){var t=n0(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a0.to.hwb=function(){var t=n0(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a0.to.keyword=function(t){return i0[t.slice(0,3)]};var l0=sa.exports;function c0(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function u0(t){var e,n,r,t=l0.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*c0(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*c0(n,r,e),255*c0(n,r,e-1/3),t]):null):null}const f0=(e,n)=>t=>e*(1-t)+n*t,h0=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return f0(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=u0(n),c=u0(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},d0=(t,e)=>{const n=f0(t,e);return t=>Math.round(n(t))};function p0({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function y0(t){return"object"==typeof t?t.valueOf():t}class g0 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=y0,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(p0({map:this.map,initKey:this.initKey},t))}has(t){return super.has(p0({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class m0{constructor(t){this.options=I({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=I({},this.options,t),this.rescale(t)}rescale(t){}}const v0=Symbol("defaultUnknown");function b0(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function x0(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==v0)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function w0(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class k0 extends m0{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:v0}}map(t){return 0===this.domainIndexMap.size&&b0(this.domainIndexMap,this.getDomain(),this.domainKey),x0({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&b0(this.rangeIndexMap,this.getRange(),this.rangeKey),x0({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=w0(e),this.rangeKey=w0(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new k0(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function M0(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new g0(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),y=new g0(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let g=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=g,Math.round(1e12*v)/1e12);var v=e[t];g+=y.get(v)}return{valueBandWidth:c,valueStep:y,adjustedRange:m}}class O0 extends k0{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:v0,flex:[]}}clone(){return new O0(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return M0(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const _0=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Nd(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function S0(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const E0=[1,5,2,2.5,4,3],A0=100*Number.EPSILON;const P0=(n,r,t=5,i=!0,a=E0,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=g,p=void 0,p=Bs(h),1-Es(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<y.score)break;var x=(r-n)/(e+1)/g/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=g*m*10**t,k=(O=r,k=w*(e-1),(O-=n)<k?1-((k-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*k+o[2]*b+o[3]<y.score)break;var M=Math.floor(r/w)*g-(e-1)*g,O=Math.ceil(n/w)*g;if(M<=O){var _=O-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(w/g),E=S+w*(e-1),A=w,P=function(t,e,n,r,i,a){var o=Bs(e),e=Es(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<A0||a-t<A0)&&r<=0&&0<=i?1:s)}(m,a,g,S,E,A),T=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,N=(l=e,N=n,l=(l-1)/(E-(L=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(N,L)),2-Math.max(l/c,c/l)),L=o[0]*P+o[1]*T+o[2]*N+ +o[3];y.score<L&&(!i||S<=n&&r<=E)&&(y.lmin=S,y.lmax=E,y.lstep=A,y.score=L)}}t+=1}e+=1}}g+=1}var t=S0(y.lmax),e=S0(y.lmin),j=S0(y.lstep),C=Math.floor((t=(t-e)/j,Math.round(1e12*t)/1e12))+1,F=new Array(C);F[0]=S0(e);for(let t=1;t<C;t+=1)F[t]=S0(F[t-1]+j);return F};class T0 extends m0{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:P0}}map(t){return qd(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new T0(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return os(t)&&os(r)?n(t,r,e):[]}}const N0=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return _d(o=t<r?(a=Sd(t,r),n(e,i)):(a=Sd(r,t),n(i,e)),a)},L0=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Sd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Ed(r,t,1,i)-1,n=a[e];return _d(o[e],n)(t)}},j0=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?L0:N0)(t,e,r?d0:n)};class C0 extends m0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:f0,tickCount:5}}map(t){return qd(t)?this.output(t):this.options.unknown}invert(t){return qd(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return jd}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return js}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=j0(n.map(t),r,a,i);this.output=_d(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=j0(i,r.map(t),f0);this.input=_d(e,n,i)}}class F0 extends C0{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:h0,tickMethod:_0,tickCount:5}}chooseTransforms(){return[js,js]}clone(){return new F0(this.options)}}class I0 extends O0{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:v0,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new I0(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const R0=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class B0 extends C0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:h0,tickMethod:_0,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[js,js]:(t=.5===r?R0:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new B0(this.options)}}class D0 extends B0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:h0,tickMethod:_0,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new D0(this.options)}}class z0 extends m0{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return qd(t)?(t=Ed(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new z0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const W0=(t,e,n,r=10)=>{var i=t<0,a=Ud(r,i),o=Yd(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var y=a(u);for(let t=1;t<r;t+=1){var g=y*t;if(c<g)break;l<=g&&h.push(g)}}2*h.length<n&&(h=_0(l,c,n))}else h=_0(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class H0 extends C0{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:h0,tickMethod:W0,tickCount:5}}chooseNice(){return Xd}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[Yd(t,e),Ud(t,e)]}clone(){return new H0(this.options)}}class V0 extends z0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:P0}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=jd(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new V0(this.options)}}function q0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class G0 extends z0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:P0}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=q0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new G0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var Y0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,U0=/\[([^]*?)\]/gm;function X0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function $0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function Z0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var K0,ca=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ua=["January","February","March","April","May","June","July","August","September","October","November","December"],f=X0(ua,3),Q0=$0({},{dayNamesShort:X0(ca,3),dayNames:ca,monthNamesShort:f,monthNames:ua,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),J0={D:function(t){return String(t.getDate())},DD:function(t){return Z0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Z0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Z0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return Z0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Z0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Z0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Z0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Z0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Z0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Z0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Z0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Z0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Z0(Math.floor(Math.abs(t)/60),2)+":"+Z0(Math.abs(t)%60,2)}},tp={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const ep=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Hd(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function np(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class rp extends C0{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:ep,interpolate:f0,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Vd}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?Wd:Dd,s=t?np:js;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=tp.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=tp[t]||t).replace(U0,function(t,e){return r.push(e),"@@@"}),$0($0({},Q0),n));return(t=t.replace(Y0,function(t){return J0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new rp(this.options)}}var ip;let ap=K0=class extends F0{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:js,tickMethod:_0,tickCount:5}}constructor(t){super(t)}clone(){return new K0(this.options)}};ap=K0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([$d(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return _d(f0(0,1),Sd(t,e))})],ap);let op=ip=class extends F0{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:js,tickMethod:_0,tickCount:5}}constructor(t){super(t)}clone(){return new ip(this.options)}};op=ip=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([$d(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=_d(f0(0,.5),Sd(e,n)),a=_d(f0(.5,1),Sd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],op);const sp=t=>new O0(t),lp=(sp.props={},t=>new F0(t)),cp=(lp.props={},t=>new k0(t)),up=(cp.props={},t=>new T0(t)),fp=(up.props={},t=>new I0(t)),hp=(fp.props={},t=>new rp(t)),dp=(hp.props={},t=>new H0(t)),pp=(dp.props={},t=>new B0(t)),yp=(pp.props={},t=>new z0(t)),gp=(yp.props={},t=>new G0(t)),mp=(gp.props={},t=>new V0(t)),vp=(mp.props={},t=>new D0(t)),bp=(vp.props={},t=>new ap(t)),xp=(bp.props={},Math.PI),wp=2*xp,kp=1e-6,Mp=wp-kp;function Op(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _p(){return new Op}function Sp(t){return function(){return t}}Op.prototype=_p.prototype={constructor:Op,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){var a,o,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),f=s-t,h=l-e,d=f*f+h*h;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>kp&&(Math.abs(h*c-u*f)>kp&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((xp-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>kp&&(this._+="L"+(t+d*f)+","+(e+d*h)),this._+="A"+i+","+i+",0,0,"+ +(f*s<h*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,a=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>kp||Math.abs(this._y1-c)>kp)&&(this._+="L"+l+","+c),n&&((a=a<0?a%wp+wp:a)>Mp?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):a>kp&&(this._+="A"+n+","+n+",0,"+ +(a>=xp)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Ep=Math.abs,Ap=Math.atan2,Pp=Math.cos,Tp=Math.max,Np=Math.min,Lp=Math.sin,jp=Math.sqrt,Cp=1e-12,Fp=Math.PI,Ip=Fp/2,Rp=2*Fp;function Bp(t){return 1<=t?Ip:t<=-1?-Ip:Math.asin(t)}function Dp(t){return t.innerRadius}function zp(t){return t.outerRadius}function Wp(t){return t.startAngle}function Hp(t){return t.endAngle}function Vp(t){return t&&t.padAngle}function qp(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/jp(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*jp(Tp(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function Gp(){var A=Dp,P=zp,T=Sp(0),N=null,L=Wp,j=Hp,C=Vp,F=null;function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,m,v,b,x,w,k=+A.apply(this,arguments),M=+P.apply(this,arguments),O=L.apply(this,arguments)-Ip,_=j.apply(this,arguments)-Ip,S=Ep(_-O),E=O<_;if(F=F||(t=_p()),M<k&&(e=M,M=k,k=e),M>Cp?S>Rp-Cp?(F.moveTo(M*Pp(O),M*Lp(O)),F.arc(0,0,M,O,_,!E),k>Cp&&(F.moveTo(k*Pp(_),k*Lp(_)),F.arc(0,0,k,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=C.apply(this,arguments)/2)>Cp&&(N?+N.apply(this,arguments):jp(k*k+M*M)),w=x=s=Np(Ep(M-k)/2,+T.apply(this,arguments)),h>Cp&&(f=Bp(h/k*Lp(u)),h=Bp(h/M*Lp(u)),(a-=2*f)>Cp?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>Cp?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=M*Pp(e),f=M*Lp(e),h=k*Pp(i),O=k*Lp(i),s>Cp&&(d=M*Pp(n),p=M*Lp(n),y=k*Pp(r),g=k*Lp(r),S<Fp)&&(_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<Cp))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,y,g,d,p,h,O))&&(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/Lp((1<(S=(S*b+v*m)/(jp(S*S+v*v)*jp(b*b+m*m)))?0:S<-1?Fp:Math.acos(S))/2),b=jp(_[0]*_[0]+_[1]*_[1]),x=Np(s,(k-b)/(v-1)),w=Np(s,(M-b)/(1+v))),o>Cp?w>Cp?(l=qp(y,g,u,f,M,w,E),c=qp(d,p,h,O,M,w,E),F.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?F.arc(l.cx,l.cy,w,Ap(l.y01,l.x01),Ap(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,w,Ap(l.y01,l.x01),Ap(l.y11,l.x11),!E),F.arc(0,0,M,Ap(l.cy+l.y11,l.cx+l.x11),Ap(c.cy+c.y11,c.cx+c.x11),!E),F.arc(c.cx,c.cy,w,Ap(c.y11,c.x11),Ap(c.y01,c.x01),!E))):(F.moveTo(u,f),F.arc(0,0,M,e,n,!E)):F.moveTo(u,f),k>Cp&&a>Cp?x>Cp?(l=qp(h,O,d,p,k,-x,E),c=qp(u,f,y,g,k,-x,E),F.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?F.arc(l.cx,l.cy,x,Ap(l.y01,l.x01),Ap(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,x,Ap(l.y01,l.x01),Ap(l.y11,l.x11),!E),F.arc(0,0,k,Ap(l.cy+l.y11,l.cx+l.x11),Ap(c.cy+c.y11,c.cx+c.x11),E),F.arc(c.cx,c.cy,x,Ap(c.y11,c.x11),Ap(c.y01,c.x01),!E))):F.arc(0,0,k,i,r,E):F.lineTo(h,O)):F.moveTo(0,0),F.closePath(),t)return F=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +P.apply(this,arguments))/2,e=(+L.apply(this,arguments)+ +j.apply(this,arguments))/2-Fp/2;return[Pp(e)*t,Lp(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Sp(+t),e):A},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Sp(+t),e):P},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Sp(+t),e):T},e.padRadius=function(t){return arguments.length?(N=null==t?null:"function"==typeof t?t:Sp(+t),e):N},e.startAngle=function(t){return arguments.length?(L="function"==typeof t?t:Sp(+t),e):L},e.endAngle=function(t){return arguments.length?(j="function"==typeof t?t:Sp(+t),e):j},e.padAngle=function(t){return arguments.length?(C="function"==typeof t?t:Sp(+t),e):C},e.context=function(t){return arguments.length?(F=null==t?null:t,e):F},e}function Yp(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Up(t){this._context=t}function Xp(t){return new Up(t)}function $p(t){return t[0]}function Zp(t){return t[1]}function Kp(o,s){var l=Sp(!0),c=null,u=Xp,f=null;function e(t){var e,n,r,i=(t=Yp(t)).length,a=!1;for(null==c&&(f=u(r=_p())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?$p:Sp(o),s="function"==typeof s?s:void 0===s?Zp:Sp(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Sp(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Sp(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:Sp(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function Qp(u,f,h){var d=null,p=Sp(!0),y=null,g=Xp,m=null;function e(t){var e,n,r,i,a,o=(t=Yp(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==y&&(m=g(a=_p())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return Kp().defined(p).curve(g).context(y)}return u="function"==typeof u?u:void 0===u?$p:Sp(+u),f="function"==typeof f?f:Sp(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?Zp:Sp(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Sp(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Sp(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Sp(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:Sp(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:Sp(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:Sp(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:Sp(!!t),e):p},e.curve=function(t){return arguments.length?(g=t,null!=y&&(m=g(y)),e):g},e.context=function(t){return arguments.length?(null==t?y=m=null:m=g(y=t),e):y},e}Up.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Jp=e1(Xp);function t1(t){this._curve=t}function e1(e){function t(t){return new t1(e(t))}return t._curve=e,t}function n1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(e1(t)):e()._curve},t}function r1(){}function i1(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 a1(t,e){this._context=t,this._k=(1-e)/6}function o1(t,e){this._context=t,this._k=(1-e)/6}function s1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>Cp&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>Cp&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function l1(t,e){this._context=t,this._alpha=e}t1.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))}},a1.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:i1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:i1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new a1(t,n)}return t.tension=function(t){return e(+t)},t}(0),o1.prototype={areaStart:r1,areaEnd:r1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:i1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new o1(t,n)}return t.tension=function(t){return e(+t)},t}(0),l1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:s1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var c1=function e(n){function t(t){return n?new l1(t,n):new a1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function u1(t,e){this._context=t,this._alpha=e}u1.prototype={areaStart:r1,areaEnd:r1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:s1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var f1=function e(n){function t(t){return n?new u1(t,n):new o1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function h1(t){this._context=t}function d1(t){return new h1(t)}function p1(t,e){this._context=t,this._t=e}function y1(t){return new p1(t,.5)}function g1(t){return new p1(t,0)}function m1(t){return new p1(t,1)}function J(t){return new v1([t],null,t,t.ownerDocument)}h1.prototype={areaStart:r1,areaEnd:r1,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))}},p1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(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:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class v1{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new v1(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new v1(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new v1([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new v1(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new v1(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new v1([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Nc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var y=c.get(d);y.__data__=h,y.__facet__=!1,a.push(y),o.delete(y),c.delete(d)}else if(u.has(d)){y=u.get(d);y.__data__=h,y.__facet__=!0,a.push(y),u.delete(d)}else if(f.has(d)){const Nc=f.get(d);s.push([h,Nc]);for(const g of Nc)o.delete(g);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new v1([],i,this._parent,this._document),new v1(a,null,this._parent,this._document),new v1(o,null,this._parent,this._document),new v1([],s,this._parent,this._document),new v1(l,null,this._parent,this._document)];return new v1(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new v1(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=v1.registry[t])?new e:Uu("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new v1([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function b1([t,e],[n,r]){return[t-n,e-r]}function x1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function w1([t,e]){return Math.atan2(e,t)}function k1([t,e]){return w1([t,e])+Math.PI/2}function M1(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function O1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function _1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function S1(t){return t.map((t,e)=>e)}function B(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function E1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*x1(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function A1(t,e,n,r,i){e=w1(b1(r,e))+Math.PI,n=w1(b1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function P1(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=S1(a),[r,o]=Sc(t,t=>a[t]);const s=new F0({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function T1(t){var[t,e,n,r]=t;return[r,t,e,n]}function N1(t,e,n){var[e,r,,i]=ru(t)?T1(e):e,[n,a]=n,t=t.getCenter(),o=k1(b1(e,t)),r=k1(b1(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:x1(i,t),outerRadius:x1(e,t)}}function L1(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function j1(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}v1.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};const C1=T=>{const{colorAttribute:N,first:L=!0,last:j=!0}=T,C=K(T,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),i=N,a=r[i],o=K(r,["symbol"==typeof i?i:i+""]),r=o.lineWidth||1,{stroke:i,radius:s=0,radiusTopLeft:l=s,radiusTopRight:c=s,radiusBottomRight:u=s,radiusBottomLeft:f=s,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:y=h,innerRadiusBottomLeft:h=h,inset:g=0,insetLeft:m=g,insetRight:v=g,insetBottom:b=g,insetTop:x=g,lineWidth:r="stroke"===N||i?r:0}=C,w=K(C,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:a=a,opacity:k}=e;if(!iu(n)&&!ou(n)){var[M,,O]=!!ru(n)?T1(t):t;const[P,E]=M;var[O,M]=b1(O,M),_=(0<O?P:P+O)+m,S=(0<M?E:E+M)+x,O=Math.abs(O)-(m+v),m=Math.abs(M)-(x+b);return J(new F.Rect({})).call(B,o).style("lineWidth",r).style("x",_).style("y",S).style("width",O).style("height",m).style("stroke",void 0===i?a:i).style(j1(T),k).style(N,a).style("radius",[L?l:d,L?c:p,j?u:y,j?f:h]).call(B,w).node()}const{y:E,y1:A}=e;v=n.getCenter(),M=N1(n,t,[E,A]),x=Gp().cornerRadius(s).padAngle(g*Math.PI/180);return J(new F.Path({})).call(B,o).style("path",x(M)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",a||i).style("lineWidth",r).style(N,a).style(j1(T),k).call(B,C).node()}},F1=(C1.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>C1(Object.assign({colorAttribute:"fill"},t))),I1=(F1.props=Object.assign({},C1.props),t=>C1(Object.assign({colorAttribute:"stroke"},t)));I1.props=Object.assign({},C1.props);const R1=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(ru(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=K(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return C1(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function B1(t,e,n){var[t,r,i,a]=t;if(ru(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}R1.props=Object.assign({},C1.props);const D1=t=>R1(Object.assign({adjustPoints:B1},t));function z1(t){const e="function"==typeof t?t:t.render;return class extends F.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}D1.props=Object.assign({},C1.props);const W1=z1(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;J(t).maybeAppend("line",()=>new F.Path({})).style("d",e).call(B,r),J(t).maybeAppend("line1",()=>new F.Path({})).style("d",n).call(B,i)});const H1=t=>{const{curve:u,gradient:f=!1,gradientColor:h="between",defined:d=t=>!Number.isNaN(t)&&null!=t,connectNulls:p=!1}=t,y=K(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=K(r,["stroke","lineWidth"]),{color:r=i,size:e=a,transform:i,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?P1(a,s,l,f,h):r,s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),e&&{lineWidth:e}),i&&{transform:i}),y),l=iu(n)?[...t,t[0]]:t;const c=Kp().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>d(t)&&d(e)).curve(u);var[r,o]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(l,d),a=Q(y,"connect"),e=!!o.length;return(!e||p&&!Object.keys(a).length?J(new F.Path({})).style("d",c(r)).call(B,s):e&&!p?J(new F.Path({})).style("d",c(l)).call(B,s):J(new W1).style("style1",Object.assign(Object.assign({},s),a)).style("style2",s).style("d1",o.map(c).join(",")).style("d2",c(l))).node()}},V1=(H1.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>H1(Object.assign({curve:Xp},t))),q1=(V1.props=Object.assign({},H1.props),t=>{var{alpha:e=.5}=t,t=K(t,["alpha"]);return H1(Object.assign({curve:c1.alpha(e)},t))}),G1=(q1.props=Object.assign({},H1.props),t=>H1(Object.assign({curve:m1},t))),Y1=(G1.props=Object.assign({},H1.props),t=>H1(Object.assign({curve:g1},t))),U1=(Y1.props=Object.assign({},H1.props),t=>H1(Object.assign({curve:y1},t)));function X1(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}U1.props=Object.assign({},H1.props);var $1=Object.freeze({__proto__:null,point:X1,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const h=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,y=K(h,["colorAttribute","symbol","mode"]),g=$1[t]||X1;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=L1(r,a,o,s),a=d,o=r[a],s=r["lineWidth"],r=K(r,["symbol"==typeof a?a:a+"","lineWidth"]),a=y.stroke?s||1:s,{color:s=o,transform:o,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||lu(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||y.r||r.r;return J(new F.Path).call(B,r).style("d",g(c,u,f)).style("lineWidth",a).style("transform",o).style("stroke",s).style(j1(h),l).style(d,s).call(B,y).node()}},Z1=(h.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>h(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),K1=(Z1.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),Q1=(K1.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),J1=(Q1.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),ty=(J1.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),ey=(ty.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),ny=(ey.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),ry=(ny.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),iy=(ry.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),ay=(iy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),oy=(ay.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),sy=(oy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),ly=(sy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),cy=(ly.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),uy=(cy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"point"},t))),fy=(uy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"square"},t))),hy=(fy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),dy=(hy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),py=(dy.props=Object.assign({},h.props),t=>h(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),yy=(py.props=Object.assign({},h.props),t=>{const{arrowSize:f="40%"}=t,h=K(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=L1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),[r,t]=t,[l,c]=E1(r,t,{arrowSize:f}),u=_p();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),J(new F.Path).call(B,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(B,h).node()}});yy.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};i(vy,gy=F.CustomElement),vy.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([Number(e)||0,Number(t)||0]),this.update(),this.bindEvents(this.attributes,this)},vy.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},vy.prototype.clear=function(){this.removeChildren()},vy.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},vy.prototype.bindEvents=function(t,e){};var gy,my,na=vy;function vy(t){return gy.call(this,t)||this}function by(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,by)}function xy(){this.constructor=my}my=by,Oo=Error,xy.prototype=Oo.prototype,my.prototype=new xy,by.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var wy;function ky(t,e,n,r){var i,a,o=My(r=void 0===r?"...":r,n),s=is(t)?t:ds(t),l=e,c=[];if(My(t,n)<=e)return t;for(;;){if(i=s.substr(0,16),l<(a=My(i,n))+o)break;if(c.push(i),l-=a,!(s=s.substr(16)))return c.join("")}for(;;){if(i=s.substr(0,1),l<(a=My(i,n))+o)break;if(c.push(i),l-=a,!(s=s.substr(1)))return c.join("")}return"".concat(c.join("")).concat(r)}var My=_s(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(wy=wy||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),wy.measureText(is(t)?t:"").width},function(t,e){return re([t],R(hs(e=void 0===e?{}:e)),!1).join("")});function Oy(t,e){return"string"==typeof t?My(t,e):t}var _y=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function Sy(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Ey(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Ay(t){return t.toLocaleString()}function Py(t,e){return void 0===e&&(e=0),Math.abs(t)<1e3?String(t):"".concat(Ey(t/1e3,e).toLocaleString(),"K")}var Ty=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},Ny=function(t,e,n){return 0<t&&Number.isFinite(t)?e:n},Ly=function(t,e){return t*e},jy=Math.PI/180;function Cy(t){if(os(t))return[t,t,t,t];if(Ko(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var Fy=["default","active","selected","disabled","inactive"],Iy={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Ry(t){var e;return t?null==t?void 0:t.default:(e=Os(t)||{},Fy.forEach(function(t){t in e&&delete e[t]}),e)}function By(t,e,n){return void 0===n&&(n=!1),e?(e=Ps(t,e),n?I({},Ry(t),e):e):Ry(t)||{}}function Dy(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}Wy.prototype.selectAll=function(t){return new Wy("string"==typeof t?this.__parent__.querySelectorAll(t):t,null,this.__elements__[0],this.__document__)},Wy.prototype.select=function(t){t="string"==typeof t?this.__parent__.querySelectorAll(t)[0]||null:t;return new Wy([t],null,t,this.__document__)},Wy.prototype.append=function(n){var r=this,t="function"==typeof n?n:function(){return t=n,r.__document__?r.__document__.createElement(t,{}):(e=Wy.registry[t])?new e:new Error("Unknown node type: ".concat(t));var t,e},e=[];if(null!==this.__data__){for(var i=0;i<this.__data__.length;i++)(s=t(a=this.__data__[i],i)).__data__=a,this.__parent__.appendChild(s),e.push(s);return new Wy(e,null,this.__parent__,this.__document__)}for(i=0;i<this.__elements__.length;i++){var a,o=this.__elements__[i],s=t(a=o.__data__,i);o.appendChild(s),e.push(s)}return new Wy(e,null,e[0],this.__document__)},Wy.prototype.data=function(t,n){void 0===n&&(n=function(t){return t});for(var e=[],r=[],i=new Map(this.__elements__.map(function(t,e){return[n(t.__data__,e),t]})),a=0;a<t.length;a++){var o,s=t[a],l=n(s,a);i.has(l)?((o=i.get(l)).__data__=s,r.push(o),i.delete(l)):e.push(s)}var c=Array.from(i.values()),c=[new Wy([],e,this.__parent__,this.__document__),new Wy(r,null,this.__parent__,this.__document__),new Wy(c,null,this.__parent__,this.__document__)];return new Wy(this.__elements__,null,this.__parent__,this.__document__,c)},Wy.prototype.merge=function(t){return new Wy(re(re([],R(this.__elements__),!1),R(t.__elements__),!1),null,this.__parent__,this.__document__)},Wy.prototype.join=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this.__enter__),e=e(this.__update__),n=n(this.__exit__);return e.merge(t).merge(n)},Wy.prototype.remove=function(){var n=re([],R(this.__elements__),!1);return this.__elements__.forEach(function(t){var e;t.parentNode&&(t.parentNode.removeChild(t),e=n.indexOf(t),n.splice(e,1),null!=(e=t.parentNode)&&e.removeChild(t),t.remove())}),new Wy(n,null,this.__parent__,this.__document__)},Wy.prototype.each=function(t){for(var e=0;e<this.__elements__.length;e++){var n,r=this.__elements__[e];r&&(n=r.__data__,t.call(r,n,e))}return this},Wy.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))}),this},Wy.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))}),this},Wy.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},Wy.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,re([this.__parent__,this],R(e),!1)),this},Wy.prototype.node=function(){return this.__elements__[0]},Wy.prototype.nodes=function(){return this.__elements__},Wy.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};var zy=Wy;function Wy(t,e,n,r,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null]),this.__elements__=t=void 0===t?null:t,this.__data__=e,this.__parent__=n,this.__document__=r,this.__enter__=i[0],this.__update__=i[1],this.__exit__=i[2]}function k(t){return new zy([t],null,t,t.ownerDocument)}function S(t,e){var n,r;if(e)try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=R(a.value,2),s=o[0],l=o[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function D(t,e,n){return t.querySelector(e)?k(t).select(e):k(t).append(n)}function Hy(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function Vy(t){var t=t.getLocalBounds(),t=R([t.min,t.max],2),e=R(t[0],2),n=e[0],e=e[1],t=R(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function qy(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}var Gy=["year","month","day","hour","minute","second"],Yy=["YYYY","MM","DD","hh","mm","ss"];function Uy(t){return t instanceof Date?t:new Date(t)}function Xy(t){for(var e,t=R(t,2),n=t[0],t=t[1],n=Gy.indexOf(n),r=Gy.indexOf(t),i="",a=n;a<=r;a+=1)i+=Yy[a],a<r&&(e="-",2===a?e=" ":2<a&&(e=":"),i+=e);return i}function $y(t,e){var n={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),hh:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},r=e;return Object.keys(n).forEach(function(t){var e=n[t];r=r.replace(t,"YYYY"===t?"".concat(e):"0".concat(e).slice(-2))}),r}function Zy(t,e){t=new Date(t);return{year:function(t){t.setMonth(0),t.setHours(0,0,0,0)},month:function(t){t.setDate(1),t.setHours(0,0,0,0)},day:function(t){return t.setHours(0,0,0,0)},hour:function(t){return t.setMinutes(0,0,0)},minute:function(t){return t.setSeconds(0,0)},second:function(t){return t.setMilliseconds(0)}}[e](t),$y(t,Xy(["year",e]))}function Ky(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)Qy(t,e[r]);return t}var Qy=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=R(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?rs(t)?(rs(r[e])||(n[e]={}),a<o?Qy(r[e],t,a+1,o):n[e]=i[e]):Ko(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function Jy(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function tg(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function eg(t,e){var t=R(t,2),n=t[0],t=t[1],e=R(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function ng(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var rg=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function ig(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}wo=ig;function ag(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function og(t,e,n){return[["M",t-n,e],["L",t+n,e]]}Po=og;function sg(t){n="default",Qo(e=t)&&e instanceof Image?n="image":$o(e)?n="symbol":is(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}i(cg,lg=na),cg.prototype.render=function(t,e){t.x,t.y;var r=t.symbol,n=t.size,i=void 0===n?16:n,a=K(t,["x","y","symbol","size"]),o=sg(r);o?D(e,".".concat(o,"-marker"),o).attr("className","marker ".concat(o,"-marker")).call(function(t){var e,n;"image"===o?(e=2*i,t.style("img",r).style("width",e).style("height",e).style("x",-i).style("y",-i)):(e=i/2,n=$o(r)?r:cg.getSymbol(r),t.style("path",null==n?void 0:n(0,0,e)).call(S,a))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},cg.MARKER_SYMBOL_MAP=new Map,cg.registerSymbol=function(t,e){cg.MARKER_SYMBOL_MAP.set(t,e)},cg.getSymbol=function(t){return cg.MARKER_SYMBOL_MAP.get(t)};var lg,E=cg;function cg(){return null!==lg&&lg.apply(this,arguments)||this}E.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),E.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),E.registerSymbol("line",ag),E.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),E.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),E.registerSymbol("circle",ig),E.registerSymbol("point",wo),E.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),E.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),E.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),E.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),E.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),E.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),E.registerSymbol("line",ag),E.registerSymbol("dot",og),E.registerSymbol("dash",Po),E.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),E.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),E.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),E.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),E.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});i(hg,ug=na),hg.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=R(Cy(i),4),h=i[0],d=i[1],p=i[2],i=i[3],y=D(e,".tag-content","g").attr("className","tag-content").node(),g=D(y,".tag-marker",function(){return new E({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(g=g).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):g.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:g.style.y}),m=u.x,g=u.y,g=(D(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",g).style("text",Zo(o)?"":"".concat(o)).call(S,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,m=h,g=f||"start",s=t||"top",t=(f=y).getLocalBounds(),r=n=0,"start"===g&&(n=u),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),y.getLocalBounds());D(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(y.style.zIndex||0)-1).style("x",g.min[0]-i).style("y",g.min[1]-h).style("width",null!==c?i+d+2*g.halfExtents[0]:0).style("height",null!==c?h+p+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(S,c)},hg.defaultOptions={type:hg.tag="tag",style:{padding:4,spacing:4}};var ug,fg=hg;function hg(t){return ug.call(this,I({},hg.defaultOptions,t))||this}var dg,pg,yg={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},gg={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},mg={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}},vg=(i(bg,dg=na),Object.defineProperty(bg.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(bg.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,ky(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(bg.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=ys(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(bg.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),bg.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=I({},Ps(yg,[n,e]),By(Ps(gg,[t,e]),r),By(Ps(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in mg[e]&&(i[t]=Ps(mg,[e,t]))}),Object.keys(mg.strict[e]).forEach(function(t){i[t]=Ps(mg,["strict",e,t])}),I(i,By(Ps(this.attributes,e),"disabled"))),i},bg.prototype.render=function(t,e){var n=t.padding,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),R(Cy(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=D(e,".marker",function(){return new E({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(_(_({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=D(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:a).style("y",o/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(S,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");D(e,".background","rect").attr("className","background").style("zIndex",-1).call(S,c).style("height",o).style("width",a+(l?l+t:0)+2*n.halfExtents[0]+i).node()},bg.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},bg.prototype.setState=function(t){this.update({state:t})},bg.prototype.hide=function(){this.style.visibility="hidden"},bg.prototype.show=function(){this.style.visibility="visible"},bg.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},bg.defaultOptions={type:bg.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},bg);function bg(t){var n=dg.call(this,Ky({},bg.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function xg(t){return pg.call(this,I({},xg.defaultOptions,t))||this}i(xg,pg=na),xg.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=R(Cy(i),3),i=t[0],f=t[1],t=t[2],h=D(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,y=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new fg({className:"breadcrumb-item",style:_(_({x:d,y:p,text:Zo(n.text)?n.id:n.text,textStyle:l},Ts(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,Zo(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),y.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new F.Text({className:"".concat(xg.tag,"-separator"),id:"".concat(xg.tag,"-separator-").concat(t),style:_(_(_(_({},Iy),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},xg.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},xg.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},xg.defaultOptions={type:xg.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:_(_({},Iy),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(Mg,wg=F.DisplayObject),Mg.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Mg.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Mg.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},Mg.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new F.Path({name:"line",style:t}))})},Mg.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new F.Path({name:"area",style:t}))})};var wg,kg=Mg;function Mg(t){var e=this,n=t.style,t=K(t,["style"]);return(e=wg.call(this,I({},{type:"lines",style:{width:0,height:0}},_({style:n},t)))||this).linesGroup=new F.Group({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new F.Group({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}i(Sg,Og=F.DisplayObject),Sg.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new F.Rect({name:"column",style:t}))})})},Sg.prototype.update=function(t){this.attr(I({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Sg.prototype.clear=function(){this.removeChildren()};var Og,_g=Sg;function Sg(t){var e=this,n=t.style,t=K(t,["style"]);return(e=Og.call(this,I({},{type:"column",style:{width:0,height:0}},_({style:n},t)))||this).columnsGroup=new F.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Eg(t){return 0===t.length?[0,0]:[es(fs(t,function(t){return es(t)||0})),ts(us(t,function(t){return ts(t)||0}))]}function Ag(t){for(var e=Os(t),n=e[0].length,t=R([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function Pg(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=Xt([0,0],c,x=t[s]),u=$t([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,y,g,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=Zt(m=Jt([0,0],d,h),m,e),0!==(g=(p=Kt(x,h))+(y=Kt(x,d)))&&(p/=g,y/=g),g=Zt([0,0],m,-p),m=Zt([0,0],m,y),v=Ut([0,0],x,g),b=Xt([0,0],b=Ut([0,0],x,m),$t([0,0],d,x)),b=$t([0,0],b,Xt([0,0],d,x)),v=Xt([0,0],v=Ut([0,0],x,g=Zt([0,0],g=Jt([0,0],b,x),-p/y)),$t([0,0],h,x)),v=$t([0,0],v,Xt([0,0],h,x)),b=Ut([0,0],x,m=Zt([0,0],m=Jt([0,0],x,v),y/p)),o&&(v=Xt([0,0],v=$t([0,0],v,c),u),b=Xt([0,0],b=$t([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function Tg(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return re([e===n?"M":"L"],R(t),!1)});return e?t.reverse():t}function Ng(t,e){if(void 0===e&&(e=!1),t.length<=2)return Tg(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Fs(a,n.slice(-2))||n.push.apply(n,re([],R(a),!1))}var o=Pg(n,!1);return e?o.unshift(re(["M"],R(t[r-1]),!1)):o.unshift(re(["M"],R(t[0]),!1)),o}function Lg(t,e,n){t=Os(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(Ig,jg=na),Object.defineProperty(Ig.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Os(t),os(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Ig.prototype,"data",{get:function(){return this.attributes.isStack?Ag(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Ig.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Ig.prototype,"baseline",{get:function(){var t=this.scales.y,e=R(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Ig.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Ig.prototype,"linesCfg",{get:function(){var t,n,r,i,a,e,o,s,l,c=this,u=this.attributes,f=u.areaStyle,h=u.isStack,d=u.lineStyle,p=u.smooth,u=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,n=(e={type:"line",x:e,y:t}).x,r=e.y,i=(e=R(r.getOptions().range||[0,0],2))[0],a=e[1],i<a&&(e=R([i,a],2),a=e[0],i=e[1]),t=y.map(function(t){return t.map(function(t,e){return[n.map(e),as(r.map(t),a,i)]})}),e=[],f&&(y=this.baseline,e=h?(p?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Ng(o),l=void 0,l=0===i?Lg(s,e,n):(a=Ng(t[i-1],!0),o=o[0],a[0][0]="L",re(re(re([],R(s),!1),R(a),!1),[re(["M"],R(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Tg(t[i]),s=void 0,s=0===i?Lg(o,e,n):((a=Tg(t[i-1],!0))[0][0]="L",re(re(re([],R(o),!1),R(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,y):(o=p,s=u,l=y,t.map(function(t){return Lg((o?Ng:Tg)(t),s,l)}))),{lines:t.map(function(t,e){return _({stroke:c.getColor(e),path:(p?Ng:Tg)(t)},d)}),areas:e.map(function(t,e){return _({path:t,fill:c.getColor(e)},f)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Ig.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,a=t.isStack,o=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};a&&(s=Ag(s));var e=this.createScales(s),l=e.x,c=e.y,e=R(Eg(s),2),n=e[0],e=e[1],u=new F0({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return _(_({fill:i.getColor(r)},o),a?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Ig.prototype.render=function(t,e){this.containerShape=D(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=D(e,".".concat(r),function(){return new("line"===n?kg:_g)({className:r,style:i})}).call(S,i).node()},Ig.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},Ig.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Ig.prototype.getColor=function(t){var e=this.attributes.color;return Ko(e)?e[t%e.length]:$o(e)?e.call(null,t):e},Ig.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,a=e.nice,a=void 0===a||a,o=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,c=R(Eg(t),2),u=c[0],c=c[1];return{type:n,x:"line"===n?new F0({domain:[0,t[0].length-1],range:[0,l]}):new O0({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new F0({domain:[null!=o?o:u,null!=e?e:c],range:[s,0],nice:a})}},Ig.tag="sparkline",Ig.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var jg,Cg,Fg=Ig;function Ig(t){return jg.call(this,I({},Ig.defaultOptions,t))||this}function Rg(){return null!==Cg&&Cg.apply(this,arguments)||this}function Bg(e,n){return i(t,r=F.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(I({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,Ky({},{style:n},t))||this;return t.descriptor=e,t}var r}i(Rg,Cg=F.CustomElement);var Dg=Bg({render:function(t,e){function n(t,e,n,r,i){D(f,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",f.style.stroke).style("strokeOpacity",f.style.strokeOpacity).style("lineWidth",f.style.lineWidth)}var r=t.size,i=t.radius,a=t.stroke,o=t.fill,s=t.lineWidth,l=t.orient,c=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,u=2.4*r,f=D(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-u/2).style("width",r).style("height",u).style("fill",o||"#fff").style("fillOpacity",c||1).style("stroke",a||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),o=1/3*r,c=2/3*r,a=.25*u,s=.75*u;n(0,o,a,o,s),n(0,c,a,c,s),f.setOrigin(r/2,u/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});i(qg,zg=na),qg.prototype.render=function(t,e){var n,r,i,a=t.iconCfg,t=t.textCfg;i=e,a=((n=a)||{}).type,r="handle-icon ".concat(a,"-handle"),k(i).selectAll(".handle-icon").data(a?[a]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new E({className:r,name:"icon",style:n}):new Dg({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),D(e,".".concat(a="handle-text"),"text").attr("className",a).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(S,i)};var zg,Wg,Hg,Vg=qg;function qg(){return null!==zg&&zg.apply(this,arguments)||this}function Gg(t){var a=Wg.call(this,I({},Gg.defaultOptions,t))||this;return a.onSelectionMouseenter=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onSelectionMouseleave=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(Dy(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([r,n])),a.selectionWidth=0,a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(Dy(t)),e=t-a.prevPos;if(e){var n=a.getRatio(e);switch(a.target){case"start":a.setValuesOffset(n);break;case"end":a.setValuesOffset(0,n);break;case"selection":a.setValuesOffset(n,n);break;case"background":a.selectionWidth+=n,a.setValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort())}a.prevPos=t}},a.onDragEnd=function(){a.removeEventListener("mousemove",a.onDragging),a.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChanged=function(t){t=new F.CustomEvent("valueChanged",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function Yg(t){var o=Hg.call(this,I({},Yg.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new F.CustomEvent("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new F.CustomEvent("valueChanged",t),o.dispatchEvent(e))},o.onTrackClick=function(t){var e=o.attributes.thumbLen,n=R(o.getLocalPosition(),2),r=n[0],n=n[1],i=R(o.padding,4),a=i[0],i=i[3],r=o.getOrientVal([r+i,n+a]),i=o.getOrientVal(Dy(t))-e/2,n=o.valueOffset(i-r,!0);o.setValue(n)},o.onThumbMouseenter=function(){o.thumbShape.attr(o.getStyle("thumbStyle","active"))},o.onTrackMouseenter=function(){o.trackShape.attr(o.getStyle("trackStyle","active"))},o.onThumbMouseleave=function(){o.thumbShape.attr(o.getStyle("thumbStyle"))},o.onTrackMouseleave=function(){o.trackShape.attr(o.getStyle("trackStyle"))},o.onDragStart=function(t){t.stopPropagation(),o.prevPos=o.getOrientVal(Dy(t)),document.addEventListener("mousemove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchmove",o.onDragging),document.addEventListener("touchcancel",o.onDragEnd)},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(Dy(t)),e=t-o.prevPos;o.setOffset(e),o.prevPos=t},o.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchmove",o.onDragging),document.removeEventListener("touchcancel",o.onDragEnd)},o}i(Gg,Wg=na),Object.defineProperty(Gg.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Gg.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(Gg.prototype,"backgroundShapeCfg",{get:function(){return _(_({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(Gg.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=K(t,["padding"]),e=R(Cy(e),4),n=e[0],r=e[1],i=e[2],e=e[3],a=this.availableSpace,o=a.width,a=a.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return _(_({x:s/2+e,y:s/2+n},t),{zIndex:0,width:o-s-e-r,height:a-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(Gg.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=R(Cy(e),4),r=e[0],i=e[1],a=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),Gg.prototype.getValues=function(){return this.values},Gg.prototype.setValues=function(t){this.values=t,this.update({values:t})},Gg.prototype.getNames=function(){return this.names},Gg.prototype.setNames=function(t){this.names=t},Gg.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return D(a,".".concat(t),function(){return new Vg({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=D(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(S,this.availableSpace).call(S,By(i)).node(),a=(D(this.backgroundShape=e,".slider-sparkline",function(){return new Fg({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),D(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=D(a,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(S,this.calcMask()).call(S,By(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},Gg.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,a=R(this.getValues(),2),o=a[0],a=a[1],t=R(t||[o,a],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=R([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?o===i&&a===t?[i,t]:[i,l+i]:r<t?a===r&&o===s?[s,r]:[r-l,r]:[Ey(s,e),Ey(t,e)]},Gg.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):By(Ps(this.attributes,t),e,!0)},Gg.prototype.calcMask=function(t){var t=R(this.getSafetyValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},Gg.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=R(this.getSafetyValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},Gg.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,a=this.getHandleCfg(t),o=a.spacing,s=a.formatter,a=a.textStyle,l=this.getHandleSize(t),c=this.getSafetyValues(),u=this.availableSpace,f=u.width,u=u.height,h=this.calcMask(),d=h.x,p=h.y,y=h.width,h=h.height,r=R("start"===t?[r[0],c[0]]:[r[1],c[1]],2),c=s(r[0],r[1]),s=new F.Text({style:_(_({},a),{text:c})}),r=Hy(s),a=r.width,r=r.height,s=(s.destroy(),0),g=0,l=l/2,m="center";return"horizontal"===i?(e=(i=o+l)+a/2,m="start"===t?(s=0<(n=d-i-a)?-e:e,0<n?"end":"start"):(s=(n=a<f-d-y-i)?e:-e,n?"start":"end")):(a=o+l,g="start"===t?r<p-l?-a:a:r<u-p-h-l?a:-a),{x:s,y:g,text:c,textAlign:m}},Gg.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return _(_({},e),this.calcHandleText(t))},Gg.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,a=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",_(_({},r),{cursor:a,size:t,symbol:i})):(e="default",_(_({},r),{cursor:a,size:t}));return _({orient:n,type:e},i)},Gg.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:_(_({},this.getHandleTextShapeCfg(t)),i)}},Gg.prototype.getHandleCfg=function(t){var e=Ps(this.attributes,"handle"),n=e.start,r=e.end,e=K(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),I({},e,i)},Gg.prototype.getHandleSize=function(t){var e,t=this.getHandleCfg(t).size;return t||(e=(t=this.attributes).width,t=t.height,Math.floor((this.getOrientVal([t,e])+4)/2.4))},Gg.prototype.getOrientVal=function(t){var t=R(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Gg.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=R(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},Gg.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Gg.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},Gg.defaultOptions={type:Gg.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},i(Yg,Hg=na),Object.defineProperty(Yg.prototype,"padding",{get:function(){return Cy(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Yg.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=R(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(Yg.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(Yg.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=Ps(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),Yg.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,a=t.thumbStyle,o=t.value,s=t.thumbLen,t=t.orient,e=D(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(S,By(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=D(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(S,By(a)).node(),this.trackShape=e},Yg.prototype.getValue=function(){return this.style.value},Yg.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:as(t,r,e)}),this.onValueChanged(n)},Yg.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},Yg.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*as(t,i,n)},Yg.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),By(Ps(this.attributes,t),e)},Yg.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},Yg.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Yg.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},Yg.defaultOptions={type:Yg.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};Object.defineProperty(Xg.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Xg.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Xg.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Xg.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Xg.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Xg.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Xg.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Xg.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Xg.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Xg.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Xg.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Xg.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Xg.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Xg.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Ug=Xg;function Xg(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function $g(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=R(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=R(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function Zg(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===y?d=(a+o)/2:"bottom"!==y&&"baseline"!==y||(d=o)),R(n,4)),c=p[0],y=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-y,u+l+n,f+i+(void 0===c?y:c)),e.setEulerAngles(r),t.rotatedPoints(r*jy,h,d)}function Kg(t,e,n){t=Zg(new Ug,t,n),e=Zg(new Ug,e,n);return $g(e,[t[0],t[1],t[2],t[3]])||$g(e,[t[0],t[1],t[4],t[5]])||$g(e,[t[4],t[5],t[6],t[7]])||$g(e,[t[2],t[3],t[6],t[7]])}function Qg(t,e,n){return"top"===t||"bottom"===t?e:n}function Jg(t,e,n){return"left"===t||"right"===t?e:n}function tm(t,e,n){return"outside"===t?e:n}var em=function(t,e,n){return"left"===t?e:n},nm=function(t,e,n){return"right"===t?e:n},rm=function(t,e,n){return"left"===t||"top"===t||"inside"===t?e:n};function im(t,r){var i;return re([],R(t.reduce(function(t,e,n){return n&&i&&Kg(i,e,r)?(t.add(i),t.add(e)):i=e,t},new Set)),!1)}var go={style:{title:{content:"",rotate:void 0,maxLength:260},ticks:[],ticksThreshold:100,tickLine:{len:6},subTickLine:{len:4,count:0},label:{type:"text",alignTick:!0,tickPadding:2,margin:[0,0,0,0],overlapOrder:["autoRotate","autoEllipsis","autoHide"],autoRotate:!1,autoEllipsis:!1,autoHide:!1,autoHideTickLine:!0,showLast:!0,showFirst:!0,optionalAngles:[0,45,90],minLabel:0,minLength:14,maxLength:160,ellipsisStep:" "},verticalFactor:1}},am=(I({},go,{style:{type:"arc"}}),I({},go,{style:{}}),{year:[["year","second"],["year","day"],["month","day"],["day","day"]],month:[["month","day"],["day","day"]],day:[["month","day"],["day","day"]],hour:[["hour","second"],["hour","minute"],["hour","hour"]],minute:[["minute","second"],["second","second"]],second:[["second","second"]]});function om(t,r){for(var i,a=t.map(function(t,e){return[t.id,{text:t.style.text,value:t.style.tip||t.style.text,idx:e}]}),o=new Map(a),e=fs(a,function(t){t=R(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,n=us(a,function(t){t=R(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,s=(n=n,e=R([Uy(e=e),Uy(n)],2),n=e[0],e=e[1],n.getFullYear()!==e.getFullYear()?"year":n.getMonth()!==e.getMonth()?"month":n.getDay()!==e.getDay()?"day":n.getHours()!==e.getHours()?"hour":n.getMinutes()!==e.getMinutes()?"minute":"second"),l=new Date("1970-01-01 00:00:00"),c=_y(t[0]),u=0;u<am[s].length;u+=1){var f=am[s][u];if(Ds($y(l,Xy(f)),c)<r){i=f;break}i=f}return function(t,e){var n,e=o.get(e.id).idx;return 0===e?t:(e=null==(e=a[e-1])?void 0:e[1].text,t=new Date(t),n=i,Zy(new Date(e),s)!==Zy(t,s)&&(n=function(t,e,n,r){for(var i=[],a=R(t,2)[1],o=Gy.indexOf(a),s=0;s<=o;s+=1){var l=[Gy[s],a];if(Ds($y(e,Xy(l)),r)<n){i=l;break}}return i}(i,t,r,c)),$y(t,Xy(n)))}}function sm(o,s,t){if(!(s.length<=1))for(var e=t.ellipsisStep,n=t.minLength,r=t.maxLength,i=t.margin,l=void 0===i?[]:i,c=t.labelType,u=_y(s[0]),a=Oy(e,u)||1,f=Oy(n,u)||1,i=Oy(r,u),h=(!Zo(i)&&i!==1/0||(i=Math.max.apply(null,s.map(function(t){return t.getBBox().width}))),Date.now()),d=s.slice(),t=R(l,4),e=(t[0],t[1]),p=void 0===e?0:e,n=(t[2],t[3]),y=void 0===n?p:n,g=function(e){var t,n,r,i,a;return(d=im(s,l)).length<1||300<Date.now()-h?{value:void 0}:(a=function(t,e){return""},n=Qg(o,e-y-p,e),a="time"===c?om(s,n):"number"===c?(n=n,r=(t=s).map(function(t,e){return{text:t.style.text,value:Number(t.style.tip||t.style.text)}}),r=Number(us(r,function(t){t=t.text;return(null==t?void 0:t.length)||0}).value),t=_y(t[0]),i=Ay(r),Ds(i,t)<=n?function(t,e){return Ay(Number(t))}:(i=Py(r),Ds(i,t)<=n?function(t,e){return Py(Number(t),1)}:function(t,e){return Number(t).toExponential()})):function(t){return ky(t,e,u)},void d.forEach(function(t,e){var n=t.style.tip||t.style.text,n=(t.style.tip=n,a.call(null,n,t));t.attr("text",n)}))},m=i;f+a<m;m-=a){var v=g(m);if("object"==typeof v)return v.value}}var lm=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};function cm(t,e,n){var r=e.length;if(!(r<=1||2===r&&null!=n&&n.showFirst&&null!=n&&n.showLast)){var i,a,o,s=lm,l=2,c=e.slice(),u=e.slice(),f=Date.now(),h=Math.min.apply(null,e.map(function(t){return t.getBBox().width}))||1;for("top"!==t&&"bottom"!==t||(t=Vy(e[0]).left,e=Vy(e[r-1]).right,e=Math.abs(e-t)||1,l=Math.max(Math.floor(r*h/e),l)),null!=n&&n.showFirst&&(i=c.splice(0,1)[0]),null!=n&&n.showLast&&(a=c.splice(-1,1)[0],c.reverse());im((a?re(re([a],R(u),!1),[i],!1):re([i],R(u),!1)).filter(function(t){return rg(t)}),null==n?void 0:n.margin).length;)if(a&&!i&&l%2==0?c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}):a&&i&&c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}),u=s(((o=c).forEach(function(t){return t.style.visibility="visible"}),o),{seq:l}),l++,200<Date.now()-f)return}}function um(a,t,e){for(var n=e.optionalAngles,o=void 0===n?[0,45,90]:n,r=e.margin,i=function(i){if(t.forEach(function(t){return e=a,t=t,n=o[i],t.setEulerAngles(n),void(n&&(r=rm(e,-1,1),e=em(e,"end",nm(e,"start",Ny(Ly(r,n),"left",Ty(Ly(r,n),"right")))),t.style.textAlign=e));var e,n,r}),im(t,r).length<1)return"break"},s=0;s<o.length&&"break"!==i(s);s++);}var fm=new Map([["autoHide",{getDefault:function(){return cm},equidistance:cm,greedy:function(t,e,n){var r,i=e.length;i<=1||2===i&&null!=n&&n.showFirst&&null!=n&&n.showLast||e.slice().forEach(function(t,e){e&&r&&Kg(r,t,null==n?void 0:n.margin)?e===i-1&&null!=n&&n.showLast?r.style.visibility="hidden":t.style.visibility="hidden":r=t})}}],["autoRotate",{getDefault:function(){return um}}],["autoEllipsis",{getDefault:function(){return sm},ellipsis:sm}]]);function hm(t,e,n){var r,t=Array.from(t||[]).map(function(t,e){return _({id:"".concat(e)},t)}),i=t.length,a=t;return"number"==typeof e&&e<i&&(r=Math.ceil(i/e),a=t.filter(function(t,e){return e%r==0||e===i-1})),n&&1!==a[a.length-1].value&&a.push({value:1,id:"append"}),a}function dm(o,s){return function(i){var t,a;o&&(t=void 0===(t=o.overlapOrder)?[]:t,a=_({labelType:o.type},Ts(o,["optionalAngles","minLength","maxLength","ellipsisStep","showFirst","showLast","margin"])),t.forEach(function(t){var e,n=fm.get(t),r=o[t];n&&r&&(t=t,e=o)&&("autoRotate"!==t||Zo(e.rotate))&&(t=n.getDefault(),"function"==typeof r?t=r:"object"==typeof r?(t=n[r.type]||Ls,a=_(_({},a),r.cfg)):"string"==typeof r&&(t=n[r]||Ls),t(s,i,a))}))}}function pm(t,n,e){e&&t.forEach(function(t,e){e=n[e];e&&(e.style.visibility=t.style.visibility)})}function ym(t,e,n,r,i,a){D(t,".axis-title","text").attr("className","axis-title").style("text",(null==a?void 0:a.content)||"").style("x",e).style("y",n).style("fill","black").style("fontSize",12).style("fontWeight","lighter").style("textAlign",r).style("textBaseline",i).style("transform","rotate(".concat((null==a?void 0:a.rotate)||0,"deg)")).style("visibility",a?"visible":"hidden").call(S,(null==a?void 0:a.style)||{})}function gm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function mm(t,n,r,e){void 0===e&&(e=""),k(t).selectAll(".axis-".concat(e,"tick")).data(r?n:[],function(t){return t.id}).join(function(t){return t.append(function(t){return new F.Line({className:"axis-".concat(e,"tick"),style:t})}).style("stroke","#416180").style("lineWidth",.5).style("strokeOpacity","sub"===e?.45:.65).style("visibility","visible").each(function(t,e){this.attr(t),gm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),gm(this,e,n,null==r?void 0:r.style)}).style("visibility","visible")},function(t){return t.remove()})}function vm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function bm(t,e){var n=_y(t),e=Oy(e,n);t.attr("tip",null),rg(e)&&e<2*t.getBounds().halfExtents[0]&&(e=ky(t.style.text||"",e,n,"..."),t.attr("tip",t.style.text),t.attr("text",e))}function xm(t,e,n,r,i){k(t).selectAll(".".concat(e)).data(n,function(t){return t.id}).join(function(t){return t.append("text").attr("className",e).style("fontFamily","sans-serif").style("fontSize",12).style("fontWeight","normal").call(S,i||{}).each(function(t,e){this.attr(t),bm(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),vm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),bm(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),vm(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()})}function wm(t,e,n){xm(t,"axis-label",(n=void 0===n?{}:n)?e:[],n,{fill:"#000",fontWeight:"lighter"})}function km(t,e,n,r,i,a){D(t,".axis-".concat(e,"-arrow"),function(){return new E({})}).attr("className","axis-arrow$$ axis-".concat(e,"-arrow")).style("visibility",a?"visible":"hidden").style("symbol","axis-arrow").style("x",n).style("y",r).style("size",8).style("lineWidth",.5).style("fill","grey").style("stroke","grey").style("fillOpacity",.85).style("strokeOpacity",.85).style("transformOrigin","left").style("transform","rotate(".concat(i,"deg)")).call(S,a||{})}function Mm(t,e,n,r){var i,a,o,s;void 0===r&&(r={}),D(t,".axis-line","path").attr("className","axis-line").style("visibility",r?"visible":"hidden").style("stroke","grey").style("lineWidth",.5).style("strokeOpacity",.85).style("path",e).call(S,(null==r?void 0:r.style)||{}),n&&(r=(e=(null==r?void 0:r.arrow)||{}).start,e=e.end,n=R(n,2),i=(a=R(n[0],2))[0],a=a[1],o=(n=R(n[1],2))[0],n=n[1],s=Math.atan((n-a)/(o-i))/Math.PI*180/2,i===o?s=n<a?45:-45:a===n&&(s=o<i?0:90),km(t,"start",i,a,s,r),km(t,"end",o,n,s+90,e))}function Om(t,e,n,r){var i,a,o,s,l;return e?(a=t[0],o=e,s=(a=R(a,2))[0],a=a[1],s=(o=R(o,2))[0]-s,o=o[1]-a,i=Math.sqrt(s*s+o*o),l=r?0:1,n?"M".concat(e[0],",").concat(e[1]-i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]+i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]-i," Z"):t.reduce(function(t,e,n){return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(l,",")).concat(e[0],",").concat(e[1])},"")):""}function _m(t,e,n,r,i){return"circle"===e?Om(t,n,r,i):(e=t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},""),"".concat(e).concat(r?"Z":""))}i(Am,Sm=na),Am.prototype.render=function(t,e){var n,r,i,a,o=t.items,s=void 0===o?[]:o,l=t.type,c=t.center,o=t.lineStyle,u=t.alternateColor,f=t.closed,t=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:_m(t.points,l,c,f)}}),h=(n=t,r={style:o},k(e).selectAll(".grid-line").data(n,function(t){return t.id}).join(function(t){return t.append("path").attr("className","grid-line").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){this.attr(t),gm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),gm(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()}),[]);if(u)for(var d=Array.isArray(u)?u:[u,"transparent"],p=0;p<s.length-1;p++){0===p&&2<s[0].points.length&&(y=_m(s[0].points,l,c),h.push({path:y,fill:d[h.length%2]}));var y=_m(s[p].points,l,c,f),g=_m(s[p+1].points.slice().reverse(),l,c,f,!0),m=void 0,m=f?"".concat(y," ").concat(g):"".concat(y," L").concat(g.slice(1)," Z");h.push({path:m,fill:d[h.length%2]})}i=h,k(e).selectAll(".grid-region").data(i,function(t,e){return e}).join(function(t){return t.append("path").attr("className","grid-region").each(function(t,e){this.attr(t),gm(this,e,i,null==a?void 0:a.style)})},function(t){return t.each(function(t,e){this.attr(t),gm(this,e,i,null==a?void 0:a.style)})},function(t){return t.remove()})};var Sm,Em=Am;function Am(){return null!==Sm&&Sm.apply(this,arguments)||this}function Pm(t,e){e?D(t,".axis-grid",function(){return new Em({})}).attr("className","axis-grid").call(function(t){return t.node().update(e)}):(t=t.querySelector(".axis-grid"))&&t.remove()}function Tm(t,e,n,r){void 0===r&&(r=0);var t=R(t,2),i=R(t[0],2),a=i[0],i=i[1],t=R(t[1],2),o=t[0],t=t[1],e=R([e*(o-a)+a,e*(t-i)+i],2),s=e[0],e=e[1],o=Qt([0,0],[Math.abs(o-a),-Math.abs(t-i)]),a=rm(n,-1,1),n=R(Zt([0,0],(t=o,!(i=[])?(i[0]=t[1],i[1]=-1*t[0]):(i[0]=-1*t[1],i[1]=t[0]),i),r),2),o=n[0],t=n[1];return[[s,e],[s+Ly(a,o),e+Ly(a,t)]]}function Nm(o,s,t,e,n){var l=(null==n?void 0:n.len)||0,c=t,n=e||{},u=n.formatter,t=n.tickPadding,f=void 0===t?0:t,e=n.offset,h=void 0===e?0:e,t=n.alignTick,d=void 0===t||t,e=n.rotate,p=void 0===e?0:e,y=rm(c,-1,1);return Array.from(o).map(function(t,e){var n=t.value,r=(d||(n=((e===o.length-1?1:null==(r=o[e+1])?void 0:r.value)+n)/2+(i||0)/2),R(Tm(s,n,c,l+f),2)),i=R(r[1],2),n=i[0],i=i[1],e=u?u(t,e):t.text,a=Qg(c,"center",em(c,"end","start"));return p&&(a=em(c,"end",nm(c,"start",Ny(Ly(y,p),"left",Ty(Ly(y,p),"right"))))),{id:"label-".concat(t.id),data:t,x:n+Qg(c,h,0),y:i+Jg(c,h,0),text:e,textAlign:a,textBaseline:Jg(c,"middle","top"===c?"bottom":"top"),transform:"rotate(".concat(p||0,"deg)")}})}E.registerSymbol("axis-arrow",function(t,e,n){var r=t+2*n;return[["M",t,e],["L",r,e],["L",r-n,e-n],["L",r+n,e],["L",r-n,e+n],["L",r,e]]});var Lm=Bg({render:function(t,e){var n=t.startPos,r=t.endPos,i=t.verticalFactor,a=t.ticksThreshold,o=t.appendTick,s=t.axisLine,l=t.ticks,l=void 0===l?[]:l,c=t.label,c=void 0===c?{}:c,u=t.tickLine,f=t.subTickLine,h=t.title,t=t.grid,n=[n||[0,0],r||[0,0]],r=R(n,2),d=R(r[0],2),p=d[0],d=d[1],r=R(r[1],2),y=r[0],r=r[1],g=Qt([0,0],[y-p,r-d]),g=(void 0===(g=g)&&(g=[0,0]),void 0===(i=i||1)&&(i=1),Math.abs(g[0])>Math.abs(g[1])?1===i?"bottom":"top":-1===i?"left":"right"),i=hm(l,a,o);Pm(e,t);Mm(D(e,".axis-line-group","g").attr("className","axis-line-group").node(),"M".concat(p,",").concat(d," L").concat(y,",").concat(r),n,s);l=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=g,b=(null==u?void 0:u.len)||0;mm(l,Array.from(i).map(function(t){var e=R(Tm(m,t.value,v,b),2),n=R(e[0],2),r=n[0],n=n[1],e=R(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),u);var m,v,b,a="axis-subtick-group",o=D(e,".".concat(a),"g").attr("className",a).node();x=i,w=n,k=g,M=null==f?void 0:f.count,O=null==f?void 0:f.len,void 0===M&&(M=0),void 0===O&&(O=0);mm(o,Array.from(x).map(function(o,s){return s===x.length-1?[]:Array(M).fill(null).map(function(t,e){var n=(((null==(n=x[s+1])?void 0:n.value)||1)-o.value)/(M+1),n=o.value+n*(e+1),n=R(Tm(w,n,k,O),2),r=R(n[0],2),i=r[0],r=r[1],n=R(n[1],2),a=n[0],n=n[1];return{id:"sub-".concat(o.id,"-").concat(e),x1:i,y1:r,x2:a,y2:n}})}).flat(),f,"sub");var x,w,k,M,O,_,S,E,t="axis-label-group",p=D(e,".".concat(t),"g").attr("className",t).node(),d=(wm(p,Nm(i,n,g,c,u),c),p.querySelectorAll(".axis-label")),y=p.querySelectorAll(".axis-tick"),r=(dm(c,g)(d),pm(d,y,null==c?void 0:c.autoHideTickLine),R(l.getBounds().halfExtents,2)),a=r[0],o=r[1],f=R(p.getBounds().halfExtents,2),t=f[0],i=f[1],d=+((null==(u=null==s?void 0:s.style)?void 0:u.lineWidth)||0),c=(y=g,c=2*(a+t)+d,l=2*(o+i)+d,r=h,f=(p=R(p=n,2))[0],p=p[1],s=(f=R(f,2))[0],f=f[1],u=(p=R(p,2))[0],p=p[1],g=Math.min(s,u),a=Math.max(s,u),t=Math.min(f,p),o=Math.max(f,p),i=g,d=t,_=n=0,S="bottom",E="start","left"===y||"right"===y?(n=c+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(d=(f+p)/2),"end"===(null==r?void 0:r.titleAnchor)&&(d=o,S="top"),"left"===y&&(E="end",n*=-1)):(_=l+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(i=(s+u)/2,E="center"),"end"===(null==r?void 0:r.titleAnchor)&&(i=a,E="end"),"top"===y&&(_*=-1),"bottom"===y&&(S="top")),void 0!==(null==r?void 0:r.positionX)&&(i=g+r.positionX,E="start"),void 0!==(null==r?void 0:r.positionY)&&(d=t+r.positionY,S="bottom"),{x:i+n,y:d+_,textAlign:E,textBaseline:S});ym(e,c.x,c.y,c.textAlign,c.textBaseline,h)}},go.style),jm=Math.PI,Cm=Math.abs,Fm=Math.cos,Im=Math.sin,Rm=R([2*jm],1)[0];function Bm(t,e,n,r,i){void 0===i&&(i=0);var t=R(t,2),a=t[0],t=t[1],n=n*jy,o=e*Fm(n),s=e*Im(n),r=rm(r,-1,1);return[[a+o,t+s],[a+(e+Ly(r,i))*Fm(n),t+(e+Ly(r,i))*Im(n)]]}function Dm(t){var e;return ls(t[0],0)?e="center":0<t[0]?e="start":t[0]<0&&(e="end"),e}function zm(t,h,d,p,y,e,g,m){void 0===m&&(m=0);var v=e,b=rm(v,-1,1),e=g.tickPadding,x=void 0===e?0:e,w=g.formatter,k=g.align,M=g.rotate;return Array.from(t).map(function(t,e){var n,r=(d-h)*t.value+h,i=m+x,a=270<=(a=r)?(a-360)%360:a,o=R(Bm(y,p,r,v,i),2),o=R(o[1],2),s=o[0],o=o[1],l=w?w(t,e):t.text,c="center",u="baseline",f=[Ly(b,s-y[0]),Ly(b,o-y[1])];return"radial"===k?(u="middle",(90<=a||a<-90)&&(a+=180),c=Dm(f),ls(a,-90)&&(c=tm(v,"start","end")),ls(a,270)&&(c=tm(v,"end","start"))):"tangential"===k?(c="center",u="bottom",0<=a&&a<180?(a+=270,e="function"==typeof(null==g?void 0:g.style)?g.style(t,e):null!=(e=null==(e=null==g?void 0:g.style)?void 0:e.fontSize)?e:14,r=R(Bm(y,p,r,v,i+e),2),s=(i=R(r[1],2))[0],o=i[1]):a+=90):(a=null!=M?M:0,c=Dm(f),ls((e=f)[1],0)?n="middle":0<e[1]?n="top":e[1]<0&&(n="bottom"),u=n),{id:"label-".concat(t.id),x:s,y:o,text:l,textAlign:c,textBaseline:u,transform:"rotate(".concat((a||0).toFixed(0),"deg)"),data:t}})}var Wm,Hm=Bg({render:function(t,e){var n=t.startAngle,n=void 0===n?0:n,r=t.endAngle,r=void 0===r?0:r,i=t.center,a=t.radius,o=t.axisLine,s=t.tickLine,l=t.subTickLine,c=t.label,c=void 0===c?{}:c,u=t.ticks,I=t.title,f=t.grid,h=t.ticksThreshold,d=t.appendTick,t=t.verticalFactor,u=hm(void 0===u?[]:u,h,d),h=-1===t?"inside":"outside",d=(Pm(e,f),D(e,".axis-line-group","g").attr("className","axis-line-group").node());t=i,f=a,g=n/180*Math.PI,F=r/180*Math.PI,void 0===f&&(f=0),void 0===g&&(g=0),void 0===F&&(F=0),p=(t=R(t=void 0===t?[0,0]:t,2))[0],t=t[1],j=(C=R([f,f],2))[0],C=C[1],M=(O=R([p+f*Fm(g),t+f*Im(g)],2))[0],O=O[1],y=(f=R([p+f*Fm(F),t+f*Im(F)],2))[0],f=f[1];Mm(d,(d=Cm(F-g))===Rm?"M".concat(p,",").concat(t-C,", A").concat(j,",").concat(C,",0,1,1,").concat(p,",").concat(t+C,", A").concat(j,",").concat(C,",0,1,1,").concat(p,",").concat(t-C):(d=jm<d?1:0,F=F<g?0:1,"M".concat(p,",").concat(t,",L").concat(M,",").concat(O,",A").concat(j,",").concat(C,",0,").concat(d,",").concat(F,",").concat(y,",").concat(f,",L").concat(p,",").concat(t)),void 0,o);var p,y,g=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=r,b=a,x=i,w=h,void 0===(k=null==s?void 0:s.len)&&(k=0);mm(g,Array.from(u).map(function(t){var e=(v-m)*t.value+m,e=R(Bm(x,b,e,w,k),2),n=R(e[0],2),r=n[0],n=n[1],e=R(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),s);var m,v,b,x,w,k,M="axis-subtick-group",O=D(e,".".concat(M),"g").attr("className",M).node();_=u,S=n,E=r,A=a,P=i,T=h,N=null==l?void 0:l.count,L=null==l?void 0:l.len,void 0===N&&(N=0),void 0===L&&(L=0);mm(O,Array.from(_).map(function(o,s){return Array(N).fill(null).map(function(t,e){var n=(((null==(n=_[s+1])?void 0:n.value)||1+_[0].value)-o.value)/(N+1),n=o.value+n*(e+1),n=R(Bm(P,A,(E-S)*n+S,T,L),2),r=R(n[0],2),i=r[0],r=r[1],n=R(n[1],2),a=n[0],n=n[1];return{id:"sub-".concat(o.id,"-").concat(e),x1:i,y1:r,x2:a,y2:n}})}).flat(),l,"sub");var _,S,E,A,P,T,N,L,j="axis-label-group",C=D(e,".".concat(j),"g").attr("className",j).node(),d=(wm(C,zm(u,n,r,a,i,h,c,null==s?void 0:s.len),c),C.querySelectorAll(".axis-label")),F=C.querySelectorAll(".axis-tick");dm(c,h)(d),pm(d,F,null==c?void 0:c.autoHideTickLine),ym(e,i[0],i[1],"center","middle",I)}},Ky({startAngle:-90,endAngle:270,center:[0,0],label:{tickPadding:2,style:{},align:"normal"}},go.style||{})),Vm=(i(qm,Wm=F.CustomElement),qm.prototype.connectedCallback=function(){this.render(),this.bindEvents()},qm.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),t.disabled&&(this.active=!1,this.disabled=!0),this.render()},qm.prototype.setState=function(t){"disabled"===t?(this.active=!1,this.disabled=!0):this.disabled=!1,this.render()},qm.prototype.render=function(){var t=this.style,e=t.size,e=void 0===e?8:e,n=t.symbol,r=t.markerStyle,t=t.backgroundStyle,i=R(Cy(this.style.margin),4),a=i[0],o=i[1],s=i[2],i=i[3],l=R(Cy(this.style.padding),4),c=l[0],u=l[1],f=l[2],l=l[3],u=(e-u-l)/2,f=(e-c-f)/2,o=(D(this,".container","rect").attr("className","container").style("x",-(u+l+i)).style("y",-(f+c+a)).style("width",e+o+i).style("height",e+a+s).style("fill","transparent").style("cursor",this.disabled?"not-allowed":"pointer").style("zIndex",1),t||{}),i=o.active,a=o.disabled,s=K(o,["active","disabled"]),t=(D(this,".background","rect").attr("className","background").style("x",-(u+l)).style("y",-(f+c)).style("width",e).style("height",e).call(S,s).call(S,this.active?i:{}).call(S,this.disabled?a:{}),"function"==typeof n?n:qm.getSymbol(n||"")),o=r||{},l=o.active,c=o.disabled,e=K(o,["active","disabled"]);D(this,".marker","path").attr("className","marker").style("x",0).style("y",0).style("path",null==t?void 0:t(0,0,Math.min(u,f))).call(S,e).call(S,this.active?l:{}).call(S,this.disabled?c:{})},qm.prototype.bindEvents=function(){var e=this,n=k(this).select(".marker"),r=k(this).select(".background");k(this).on("pointerup",function(){e.disabled||(e.active=!0)}),k(this).on("pointermove",function(){var t;e.disabled||(e.active=!0,S(n,null==(t=e.style.markerStyle)?void 0:t.active),S(r,null==(t=e.style.backgroundStyle)?void 0:t.active))}),k(this).on("pointerout",function(){e.disabled||(e.active=!1,S(n,Ns(e.style.markerStyle||{},["active"])),S(r,Ns(e.style.backgroundStyle||{},["active"])))})},qm.MARKER_SYMBOL_MAP=new Map,qm.registerSymbol=function(t,e){qm.MARKER_SYMBOL_MAP.set(t,e)},qm.getSymbol=function(t){return qm.MARKER_SYMBOL_MAP.get(t)},qm);function qm(t){t=Wm.call(this,t)||this;return t.active=!1,t.disabled=!1,t.disabled=t.style.disabled||!1,t}Vm.registerSymbol("timeline-prev-button",function(t,e,n){return[["M",t+n,e+n],["L",t,e],["L",t+n,e-n],["M",t,e+n],["L",t-n,e],["L",t,e-n]]}),Vm.registerSymbol("timeline-next-button",function(t,e,n){return[["M",t,e+n],["L",t+n,e],["L",t,e-n],["M",t-n,e+n],["L",t,e],["L",t-n,e-n]]}),Vm.registerSymbol("timeline-play-button",function(t,e,n){return[["M",t+2,e+3],["L",t+2,e-3],["M",t-2,e+3],["L",t-2,e-3]]}),Vm.registerSymbol("timeline-stop-button",function(t,e,n){return[["M",t+3,e],["L",t-1.5,e-1.5*Math.sqrt(3)],["L",t-1.5,e+1.5*Math.sqrt(3)],["Z"]]});var No={margin:[2,4],markerStyle:{stroke:"#bfbfbf",active:{stroke:"#3471F9"}},backgroundStyle:{fill:"transparent"}},Gm={x:0,y:0,data:[],width:500,height:40,selection:[0,0],orient:"horizontal",singleModeControl:{width:56,size:12,labelStyle:{text:"单一时间",fontSize:10,dx:4}},speedControl:{width:32,markerSize:4,speeds:[1,2,3,4,5],labelStyle:{fontFamily:"sans-serif",fill:"rgba(0,0,0,0.45)",fontStyle:"normal",fontWeight:500,fontSize:10,textBaseline:"top"},formatter:function(t){return"".concat(t.toFixed(1),"x")}},controlPosition:"bottom",controlButton:{spacing:14,prevBtn:_(_({},No),{symbol:"timeline-prev-btn",padding:0,size:8}),nextBtn:_(_({},No),{symbol:"timeline-next-btn",padding:0,size:8}),playBtn:{margin:4,padding:0,size:20,symbol:"",markerStyle:{stroke:"#bfbfbf",fill:"#bfbfbf",active:{stroke:"#3471F9",fill:"#3471F9"}},backgroundStyle:{stroke:"#bfbfbf",lineWidth:1,fill:"#F7F7F7",active:{fill:"rgba(52, 113, 249, 0.1)",stroke:"#3471F9"}}}},padding:[0,8],playAxis:{appendPadding:[4,0],handleStyle:{r:3,lineWidth:1},label:{position:1,tickPadding:2,tickLine:{len:4,style:{stroke:"rgba(0,0,0,0.25)",lineWidth:1}},style:{fontSize:10,fillOpacity:1,fill:"rgba(0,0,0,0.45)"}},loop:!1},playInterval:2e3,autoPlay:!1},Ym=I({},{x:0,y:0,data:[],length:120,orient:"horizontal",selection:0,selectionStyle:{fill:"#5B8FF9",fillOpacity:.15},loop:!1,playInterval:1e3},Gm.playAxis),Um={axisLine:null,label:{autoRotate:!1,rotate:0,autoHide:!0,autoHideTickLine:!1,autoEllipsis:!0,minLength:50,alignTick:!0}};function Xm(t,e){void 0===t&&(t=[]);var t=R(Array.of(t).flat(),2),n=t[0],n=void 0===n?0:n,t=t[1];return e?[n,n]:[n,void 0===t?n:t]}i(Zm,$m=F.CustomElement),Zm.prototype.update=function(t){var e=I({},this.attributes,t=void 0===t?{}:t),t=(t.selection&&(this.selection=Xm(t.selection,e.singleMode)),t.singleMode&&(this.selection=Xm(e.selection,t.singleMode)),this.playTimer);t&&this.stop(),this.attr(e),this.render(),t&&this.play()},Zm.prototype.play=function(){var r=this,t=this.style,e=t.data,i=t.loop,a=t.singleMode,o=t.playMode,s=e.length,t=this.style.playInterval;Zo(t)&&(t=Ym.playInterval),this.playTimer&&clearInterval(this.playTimer),this.playTimer=setInterval(function(){var t,e,n;!i&&r.selection[1]>=s-1?r.stop(!0):a?(t=(r.selection[0]+1)%s,r.setSelection({start:t,end:t})):(t=r.selection[0],n=r.selection[1],e=r.selection[1]-r.selection[0],n=s-1<=n?"increase"===o?t:(t=0,e):("increase"!==o&&(t=(t+1)%s),(n+1)%s),r.setSelection({start:t,end:n}))},t)},Zm.prototype.stop=function(t){clearInterval(this.playTimer),this.playTimer=void 0,t&&this.dispatchEvent(new F.CustomEvent("timelineStopped",{selection:this.selection}))},Zm.prototype.prev=function(){var t,e=R(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n-1+r)%r:0===n?(t=r-(e-n)-1,r-1):(t=n-1,e-1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},Zm.prototype.next=function(){var t,e=R(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n+1)%r:e===r-1?(t=0,e-n):(t=n+1,e+1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},Zm.prototype.getSelection=function(){return this.selection},Object.defineProperty(Zm.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Zm.prototype.ifH=function(t,e){return"horizontal"===this.orient?"function"==typeof t?t():t:"function"==typeof e?e():e},Zm.prototype.destroy=function(){$m.prototype.destroy.call(this),this.playTimer&&clearInterval(this.playTimer),this.playTimer=void 0};var $m,Lo=Zm;function Zm(){var t=null!==$m&&$m.apply(this,arguments)||this;return t.selection=[0,0],t}function Km(t,e){return new I0({domain:t.map(function(t,e){return e}),range:e,padding:.1})}function Qm(t,e,n){n=Km(n,[0,e]).getStep(),e=0<t?Math.ceil:Math.floor;return 0<n?e(t/n):0}function Jm(t,e,n){return Km(n,[0,e]).map(t)}i(nv,tv=Lo),nv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(nv.prototype,"styles",{get:function(){return I({},nv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),nv.prototype.setSelection=function(t){var e,n,r=t.start,t=t.end,i=this.styles,a=i.data,a=void 0===a?[]:a,i={duration:i.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},o=this.ifH("cx","cy"),s=k(this).select(".slider-start-handle").node();void 0!==r&&(n=Jm(r,this.style.length,a),this.startHandleAnimation=s.animate([((e={})[o]=s.style[o],e),((s={})[o]=n,s)],i)),void 0!==t&&(e=k(this).select(".slider-end-handle").node(),n=Jm(t,this.style.length,a),this.endHandleAnimation=e.animate([((s={})[o]=e.style[o],s),((a={})[o]=n,a)],i)),this.selection=[null!=r?r:this.selection[0],null!=t?t:this.selection[1]],this.dispatchEvent(new F.CustomEvent("selectionChanged",{detail:{selection:this.selection}}))},nv.prototype.render=function(){var e=this,n=this.styles,t=R(this.ifH([n.length,n.size],[n.size,n.length]),2),r=t[0],i=t[1],t=D(this,".slider-background","line").attr("className","slider-background").style("x1",0).style("y1",0).style("x2",this.ifH(r,0)).style("y2",this.ifH(0,i)).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(t=n.backgroundStyle)?void 0:t.fill).style("strokeOpacity",null==(t=n.backgroundStyle)?void 0:t.fillOpacity).node(),a=Km(n.data,[0,1]),o=R(this.selection.map(function(t){return a.map(t)}),2),s=o[0],s=void 0===s?0:s,o=o[1],o=void 0===o?s:o,l=this.ifH(s*r,0),c=this.ifH(o*r,0),s=this.ifH(0,s*i),o=this.ifH(0,o*i),u=(D(t,".slider-selection","line").attr("className","slider-selection").style("x1",l).style("y1",s).style("x2",c).style("y2",o).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(f=n.selectionStyle)?void 0:f.fill).style("strokeOpacity",null==(f=n.selectionStyle)?void 0:f.fillOpacity).style("visibility",n.singleMode?"hidden":"visible").call(S,n.selectionStyle),"running"===(null==(f=this.startHandleAnimation)?void 0:f.playState)&&this.startHandleAnimation.pause(),D(t,".slider-start-handle","circle").attr("className","slider-start-handle").style("cx",l).style("cy",s).call(S,n.handleStyle),"paused"===(null==(f=this.startHandleAnimation)?void 0:f.playState)&&this.startHandleAnimation.play(),"running"===(null==(l=this.endHandleAnimation)?void 0:l.playState)&&this.endHandleAnimation.pause(),D(t,".slider-end-handle","circle").attr("className","slider-end-handle").style("cx",c).style("cy",o).style("visibility",n.singleMode?"hidden":"visible").call(S,n.handleStyle),"paused"===(null==(s=this.endHandleAnimation)?void 0:s.playState)&&this.endHandleAnimation.play(),n.data.map(function(t,e){return{value:a.map(e),text:t.date}})),f=n.label||{},l=f.position,h=void 0===l?-1:l,d=f.tickLine,p=K(f,["position","tickLine"]);D(t,".slider-axis",function(){return new Lm({className:"slider-axis"})}).call(function(t){return t.node().update(I({},Um,{startPos:[h*e.ifH(0,r+2),h*e.ifH(i+2,0)],endPos:[e.ifH(r,0)+h*e.ifH(0,r+2),e.ifH(0,i)+h*e.ifH(i+2,0)],ticks:u,verticalFactor:h,tickLine:null===n.label?null:d,label:null===n.label?null:p}))})},nv.prototype.bindEvents=function(){var t=k(this).select(".slider-background"),r=(this.dragHandle(t,"start"),this.dragHandle(t,"end"),this.dragSelection(t),t.select(".slider-selection").node()),e=t.select(".slider-start-handle").node(),t=t.select(".slider-end-handle").node();e.addEventListener(F.ElementEvent.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x1":"y1"]=t)}),t.addEventListener(F.ElementEvent.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x2":"y2"]=t)})},nv.prototype.dragHandle=function(n,a){function t(t){var e,n,r,i;c&&(c=!1,t=Qm(s?l.ifH(t.x-s[0],t.y-s[1]):0,l.style.length,l.style.data),s=void 0,e=(n=R(l.selection,2))[0],n=n[1],r=l.style.data.length-1,"start"===a?e===n&&0<t?(i=as(0,e+t,r),l.setSelection({start:i,end:i})):l.setSelection({start:as(e+t,0,n)}):e===n&&t<0?(i=as(0,n+t,r),l.setSelection({start:i,end:i})):l.setSelection({end:as(n+t,e,r)}),l.playTimer)&&l.play()}var o,s,l=this,c=!1;n.on("pointerdown",function(t){l.playTimer&&clearInterval(l.playTimer);var e=n.select(".slider-".concat(a,"-handle")).node();t.target===e&&(c=!0,s=[t.x,t.y],o=[t.x,t.y])}.bind(this)).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e,n,r,i;c&&(e=l.styles.length,n=k(l).select(".slider-".concat(a,"-handle")).node(),r=l.ifH(t.x-o[0],t.y-o[1]),i=n.getLocalPosition(),"vertical"===l.orient?n.style.cy=as(i[1]+r,0,e):n.style.cx=as(i[0]+r,0,e),o=[t.x,t.y])})},nv.prototype.dragSelection=function(t){function e(t){l.playTimer&&clearInterval(l.playTimer),t.target===a&&(f=!0,i=[t.x,t.y],s=[t.x,t.y])}function n(t){var e;f&&(f=!1,t=Qm(i?l.ifH(t.x-i[0],t.y-i[1]):0,l.style.length,l.style.data),i=void 0,e=l.selection[1]-l.selection[0],t=as(l.selection[1]+t,e,l.style.data.length-1),l.setSelection({start:t-e,end:t}),l.playTimer)&&l.play()}function r(t){var e,n,r,i,a,o;f&&(e=l.styles.length,n=l.ifH(t.x-s[0],t.y-s[1]),r=(o=R(c.getLocalPosition(),2))[0],o=o[1],i=(a=R(u.getLocalPosition(),2))[0],a=a[1],"vertical"===l.orient?(c.style.cy=as(o+n,0,e-(a=a-o)),u.style.cy=c.style.cy+a):(o=i-r,c.style.cx=as(r+n,0,e),u.style.cx=c.style.cx+o),s=[t.x,t.y])}var s,i,l=this,a=t.select(".slider-selection").node(),c=t.select(".slider-start-handle").node(),u=t.select(".slider-end-handle").node(),f=!1;t.on("mousedown",e.bind(this)).on("touchstart",e.bind(this)).on("mouseup",n.bind(this)).on("mouseupoutside",n.bind(this)).on("touchend",n.bind(this)).on("touchendoutside",n.bind(this)).on("mousemove",r.bind(this)).on("touchmove",r.bind(this))},nv.defaultOptions={style:I({},Ym,{tag:"slider-axis",size:3,handleStyle:{r:3,stroke:"#8AADF3",strokeOpacity:.75,lineWidth:1,fill:"#fff",fillOpacity:1},backgroundStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{cursor:"grabbing"}})};var tv,ev=nv;function nv(t){t=tv.call(this,I({},nv.defaultOptions,t))||this;return t.startHandleAnimation=null,t.endHandleAnimation=null,t.selection=Xm(t.style.selection,t.style.singleMode),t}function rv(t,e){return new O0({domain:t.map(function(t,e){return e}),range:e,paddingOuter:0,paddingInner:0})}i(ov,iv=Lo),ov.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(ov.prototype,"styles",{get:function(){return I({},ov.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),ov.prototype.setSelection=function(t){var e,n=R(this.selection,2),r=n[0],n=n[1];this.selection=Xm([null!=(e=t.start)?e:r,null!=(e=t.end)?e:n],this.style.singleMode),this.dispatchEvent(new F.CustomEvent("selectionChanged",{detail:{selection:this.selection}})),this.render()},ov.prototype.render=function(){var i=this,r=this.styles,a=r.size,o=r.spacing,t=R(this.ifH(["x","y","width","height"],["y","x","height","width"]),4),s=t[0],l=t[1],c=t[2],u=t[3],t=D(this,".slider-background","rect").attr("className","slider-background").style("x",0).style("y",0).style(c,r.length).style(u,a+o).call(S,r.backgroundStyle).node(),f=this.getCellScale(),h=f.getBandWidth(),e=r.data.map(function(t,e){var n;return _(((n={})[s]=f.map(e),n[l]=o/2,n[c]=h-r.cellGap,n[u]=a,n),r.cellStyle)}),e=(k(t).selectAll(".cell").data(e).join(function(t){return t.append("rect").attr("className","cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()}),e.filter(function(t,e){var n=R(i.selection,2),r=n[0],n=n[1];return r<=e&&e<=n}).map(function(t){return _(_({},t),r.selectionStyle)})),n={duration:this.style.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},d=(k(t).selectAll(".selected-cell").data(e).join(function(t){return t.append("rect").attr("className","selected-cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.animate([t],n)})},function(t){return t.remove()}),r.length-2*r.spacing+r.cellGap),p=rv(r.data,[0,d]),y=r.data.map(function(t,e){return{value:(p.map(e)+(h-r.cellGap)/2)/d,text:t.date}}),e=r.label||{},g=e.position,m=void 0===g?-1:g,v=e.tickLine,b=K(e,["position","tickLine"]),g=-1===m?-2:r.spacing+a+2,x=[r.spacing,g],w=[o+d,g];"vertical"===this.orient&&(x=[x[1],x[0]],w=[w[1],w[0]]),D(t,".slider-axis",function(){return new Lm({className:"slider-axis",style:Um})}).call(function(t){return t.node().update({startPos:x,endPos:w,ticks:y,verticalFactor:m,tickLine:null===r.label?null:v,label:null===r.label?null:b})})},ov.prototype.bindEvents=function(){this.dragSelection()},ov.prototype.getCellScale=function(){var t=this.styles.cellGap,e=this.styles.length,n=this.styles.spacing;return rv(this.style.data,[n,e-n+t])},ov.prototype.dragSelection=function(){function t(){r=!1,i.playTimer&&i.play()}var n,i=this,a=k(this).select(".slider-background"),r=!1,o=this.styles.spacing,s=function(t){var e=R(a.node().getPosition(),2),n=e[0],e=e[1],n=i.ifH(n+4,e+o),e=i.styles.cellGap,r=i.getCellScale().getStep();return Math.floor((t-n+e)/r)};a.on("pointerdown",function(t){i.playTimer&&clearInterval(i.playTimer),r=!0,n=i.ifH(t.x,t.y);t=s(n);i.setSelection({start:t,end:t})}).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e;r&&(t=s(i.ifH(t.x,t.y)),e=(t=R((e=n?s(n):t)<t?[e,t]:[t,e],2))[0],t=t[1],i.setSelection({start:e,end:t}))})},ov.defaultOptions={style:I({},Ym,{tag:"cell-axis",backgroundStyle:{fill:"#416180",fillOpacity:.05},size:16,spacing:4,cellGap:2,cellStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{fillOpacity:.45},label:{autoHideTickLine:!0}})};var iv,av=ov;function ov(t){t=iv.call(this,I({},ov.defaultOptions,t))||this;return t.selection=Xm(t.style.selection,t.style.singleMode),t}function sv(t,e){return[1.43,2.79,4.89,7.57,11.66][t]/11.66*e}var lv,Ro=I({},Gm.speedControl,{markerFill:"#8c8c8c",spacing:1,lineStyle:{stroke:"#bfbfbf",lineWidth:1}}),cv=(i(uv,lv=F.CustomElement),uv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},uv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(uv.prototype,"styles",{get:function(){return I({},uv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),uv.prototype.render=function(){var t=this.styles,e=t.initialSpeed,n=t.markerSize,r=t.markerFill,i=t.lineStyle,a=t.speeds,o=t.labelStyle,s=t.spacing,t=t.formatter,t=void 0===t?function(t){return"".concat(t)}:t,e=a.indexOf(e),l=2*n,c=sv(e=-1===e?0:e,2*l),u=n*Math.tan(Math.PI/6)*2,r=(D(this,".speed-marker","path").attr("className","speed-marker").style("fill",r).style("path",[["M",0,c-u/2],["L",n,c],["L",0,c+u/2],["Z"]]),n-.5),c=D(this,".line-group","rect").attr("className","line-group").style("x",r).style("y",0).style("width",l).style("height",2*l).style("cursor","pointer").style("fill","transparent").node(),u=a.reduce(function(t,e,n){n=sv(n,2*l);return t.push(["M",0,n],["L",l,n]),t},[]);D(c,".speed-path","path").attr("className","speed-path").style("path",u).call(S,i),D(this,".speed-label","text").attr("className","speed-label").style("x",r+l+s).style("y",2).style("text",t(a[e])).call(S,o)},uv.prototype.bindEvents=function(){var e=this,t=this.querySelector(".line-group");t.addEventListener("pointerdown",function(t){return e.onClick(t)}),t.addEventListener("touchmove",function(t){return e.onClick(t)})},uv.prototype.onClick=function(t){var a,e=this.styles,o=e.speeds,n=e.markerSize,e=e.formatter,e=void 0===e?function(t){return"".concat(t)}:e,s=2*n*2,n=this.querySelector(".line-group"),r=k(this).select(".speed-label").node(),i=k(this).select(".speed-marker").node();t.currentTarget===n&&(a=t.y-n.getBBox().y,-1!==(t=o.findIndex(function(t,e){var n=sv(e,s),r=sv(e-1,s),i=sv(e+1,s);return 0===e?a<n+(sv(1,s)-n)/2:e===o.length-1?n-(n-r)/2<a:(e=[n-(n-r)/2,n+(i-n)/2])[0]<=a&&a<e[1]})))&&(r.setAttribute("text",e(o[t])),i.setLocalPosition(0,sv(t,s)-s/8),this.dispatchEvent(new F.CustomEvent("speedChanged",{detail:{speed:o[t]}})))},uv.tag="speed-control",uv.defaultOptions={style:Ro},uv);function uv(t){return lv.call(this,I({},uv.defaultOptions,t))||this}i(pv,fv=F.CustomElement),pv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(pv.prototype,"styles",{get:function(){return I({},pv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),pv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),Zo(t.active)||(this.active=t.active),this.render()},pv.prototype.render=function(){var t,e=this.styles,n=e.size,r=e.buttonStyle,i=e.labelStyle,e=e.symbol,a=r.active,r=K(r,["active"]),r=D(this,".button","rect").attr("className","button").style("x",0).style("y",0).style("width",n).style("height",n).call(S,r).call(S,this.active?a:{}).node();D(r,".symbol","path").attr("className","symbol").style("x",n/2).style("y",n/2).style("path",[["M",(a=n/2)-(t=r=n/2)/7*4,r-t/14],["L",a-t/7,r+t/7*3],["L",a+t/7*4,r-t/7*3]]).style("lineWidth",1).style("lineCap","round").style("stroke","transparent").style("cursor","pointer").call(S,this.active?null==e?void 0:e.active:{}),D(this,".label","text").attr("className","label").style("x",n).style("y",n/2).call(S,i)},pv.prototype.bindEvents=function(){var t=this;k(this).select(".button").on("pointerdown",function(){t.dispatchEvent(new F.CustomEvent("singleModeChanged",{detail:{active:!t.active}}))})},pv.defaultOptions={style:{size:12,buttonStyle:{fill:"transparent",stroke:"#000",strokeOpacity:.15,cursor:"pointer",lineWidth:1,radius:2,active:{stroke:"#3471F9",fill:"#3471F9",strokeOpacity:1}},symbol:{active:{stroke:"#fff"}},labelStyle:{text:"",textAlign:"left",textBaseline:"middle",fill:"#000",fillOpacity:.65},cursor:"pointer"}};var fv,hv,dv=pv;function pv(t){t=fv.call(this,I({},pv.defaultOptions,t))||this;return t.active=!1,t.active=t.style.active||!1,t}function yv(t,e,n){var r,i,a,o,s,n=I({},Gm,n),l=n.type,c=n.playAxis,u=n.controlButton,f=n.speedControl,h=n.singleModeControl,d=(null==(d=null==c?void 0:c.label)?void 0:d.position)||-1,p=null!=(p=null==c?void 0:c.spacing)?p:(null==(p=null==(p=av.defaultOptions)?void 0:p.style)?void 0:p.spacing)||0,y=(null==c?void 0:c.size)||("cell"===l?null==(y=null==(y=av.defaultOptions)?void 0:y.style)?void 0:y.size:null==(y=null==(y=ev.defaultOptions)?void 0:y.style)?void 0:y.size)||4,p=(y+="cell"===l?p:0,R(Cy(null==c?void 0:c.appendPadding),4)),g=p[0],m=p[1],v=p[2],p=p[3],b=(null==u?void 0:u.spacing)||0,x=ps(u)||ps(null==u?void 0:u.playBtn)?0:null==(x=null==u?void 0:u.playBtn)?void 0:x.size,w=ps(u)||ps(null==u?void 0:u.prevBtn)?0:null==(w=null==u?void 0:u.prevBtn)?void 0:w.size,u=ps(u)||ps(null==u?void 0:u.nextBtn)?0:null==(u=null==u?void 0:u.nextBtn)?void 0:u.size,k=x/2+w/2+b,M=x/2+u/2+b,O=null===f?0:null==f?void 0:f.markerSize,_=2*O,f=null===f?0:null==f?void 0:f.width,S=2*_+O/2,E=null===h?0:null==h?void 0:h.width,h=null===h?0:(null==h?void 0:h.size)+2;return"vertical"===n.orient?{axis:{x:(n=p+(-1===d?30:0))+("cell"===l?0:y/2),y:i=(r=w+b+x/2)+x/2+b+g,length:(a=(s=(o=e-h)-4-S)-b-u/2)-b-u/2-v-i},prevBtn:{x:i=n+y/2,y:w/2,size:w},playBtn:{x:i,y:r,size:x},nextBtn:{x:i,y:a,size:u},speedControl:{x:n-f/2,y:s,size:f},singleModeControl:{x:0,y:o}}:(i=(r=e-E)-8-f,a=c,s=(a=I({},Gm.playAxis,a).label)?((null==(n=a.tickLine)?void 0:n.len)||0)+(a.tickPadding||0)+(Number(a.style.fontSize)||0)+2:0,o=(-1===d?s:0)+("cell"===l?0:y/2)+g,"bottom"===t?{axis:{x:p,y:o,length:e-(p+m)},playBtn:{x:E=e/2,y:c=o+(1===d?s:0)+y+x/2+v,size:x},prevBtn:{x:E-k,y:c,size:w},nextBtn:{x:E+M,y:c,size:u},speedControl:{x:i,y:n=o+(1===d?s:0)+y+v,size:f},singleModeControl:{x:r,y:n+_-h/2}}:(g="cell"===l?o+y/2:o,e="cell"===l&&-1===d?s+y-S:1===d?o+O/2:o-S,"left"===t?{axis:{x:n=(v=(c=(E=w/2)+k)+M)+u/2+p,y:o,length:i-m-n},prevBtn:{x:E,y:g,size:w},playBtn:{x:c,y:g,size:x},nextBtn:{x:v,y:g,size:u},speedControl:{x:i,y:e,size:f},singleModeControl:{x:r,y:e+_-h/2}}:{axis:{x:p,y:o,length:(y=(s=(l=i-(u/2+b))-M)-k)-w/2-m-p},playBtn:{x:s,y:g,size:x},prevBtn:{x:y,y:g,size:w},nextBtn:{x:l,y:g,size:u},speedControl:{x:i,y:e,size:f},singleModeControl:{x:r,y:e+_-h/2}}))}function gv(t){t=hv.call(this,I({},{style:Gm},t))||this;return t.speed=1,t.singleMode=!1,t.playing=!1,t.selection=[0,0],t.singleMode=t.style.singleMode||!1,t.selection=Xm(t.style.selection,t.singleMode),t}function mv(t){var e,n={left:0,top:0,width:0,height:0};return"html"===(null==t?void 0:t.tagName)?n={left:0,top:0,width:(e=t.style).width,height:e.height}:t&&(t=(e=t.getLocalBounds()).min,e=e.halfExtents,n={left:t[0],top:t[1],width:2*e[0],height:2*e[1]}),{left:0,top:0,right:n.width,bottom:n.height}}function vv(t,n){var r,e,i,a;return n?(r=n.useHTML,e=n.style,i="legend-title ".concat(r?"html":"text","-title"),a="<span>".concat((null==n?void 0:n.content)||"","</span>"),D(t,".".concat(i),function(){return r?new F.HTML({className:i,style:{innerHTML:a}}):new F.Text({className:i,style:e})}).call(function(t){var e;r?t.style("width",null!=(e=n.width)?e:80).style("height",null!=(e=n.height)?e:20).style("innerHTML",a):t.style("fontSize",12).style("textBaseline","top").style("text",n.content||"")}).call(S,e).node()):((t=t.querySelector(".legend-title"))&&t.remove(),null)}function bv(t,e,n,r){return D(t,".".concat(e),"g").attr("className",e).style("x",n).style("y",r).node()}function xv(t,e,n,r,i){D(t,".".concat(e),"rect").attr("className",e).style("zIndex",-1).style("width",n).style("height",r).call(S,i||{}).node()}i(gv,hv=F.CustomElement),gv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},gv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),void 0!==t.singleMode&&(this.singleMode=t.singleMode),t.selection&&(this.selection=Xm(t.selection,this.singleMode)),this.render()},Object.defineProperty(gv.prototype,"styles",{get:function(){return I({},Gm,this.attributes)},enumerable:!1,configurable:!0}),gv.prototype.render=function(){var e=this,t=this.styles,n=t.width,r=t.height,i=t.controlPosition,a=t.speedControl,o=t.singleModeControl,t=R(Cy(this.styles.padding),4),s=t[0],s=void 0===s?0:s,l=t[1],l=void 0===l?0:l,c=t[2],t=t[3],t=void 0===t?l:t,u=D(this,".container","g").attr("className","container").style("x",t).style("y",s).node(),f=yv(i,"vertical"===this.style.orient?r-(s+c):n-(t+l),this.styles);this.renderAxis(u,f),this.renderControlButton(u,f),D(u,".timeline-speed-control",function(){return new cv({})}).attr("className","timeline-speed-control").call(function(t){null===a?t.remove():t.node().update(_(_({x:f.speedControl.x,y:f.speedControl.y},a),{initialSpeed:e.speed}))}),D(u,".timeline-single-control",function(){return new dv({})}).attr("className","timeline-single-control").call(function(t){null===o?t.remove():t.node().update(_(_({x:f.singleModeControl.x,y:f.singleModeControl.y},o),{active:e.singleMode}))})},gv.prototype.renderAxis=function(t,e){var n=this,r=this.styles.data,i=this.styles.type||"slider",a=k(t).select(".timeline-axis").node(),o="cell"===i?av:ev;a&&a.style.tag!=="".concat(i,"-axis")&&(a.remove(),this.removeChild(a)),D(t,".timeline-axis",function(){return new o({})}).attr("className","timeline-axis").call(function(t){t.node().update(_({x:e.axis.x,y:e.axis.y,length:e.axis.length,data:r,selection:n.selection,orient:n.style.orient,playInterval:n.style.playInterval/n.speed,singleMode:n.singleMode},n.style.playAxis||{})),t.node().update({handleStyle:{cursor:"vertical"===n.style.orient?"ns-resize":"ew-resize"}})}).node()},gv.prototype.renderControlButton=function(t,n){var e,r=this,i=n.playBtn.size||0,a=n.prevBtn.size||0,o=(null==(e=n.nextBtn)?void 0:e.size)||0;D(t,".timeline-prev-btn",function(){return new Vm({})}).attr("className","timeline-prev-btn").call(function(t){var e;a?(t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.prevBtn)||{}),{x:n.prevBtn.x,y:n.prevBtn.y,size:a,symbol:"timeline-prev-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),D(t,".timeline-play-btn",function(){return new Vm({})}).attr("className","timeline-play-btn").call(function(t){var e;i?(t.node().update({backgroundStyle:{radius:(n.playBtn.size||0)/2}}),t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.playBtn)||{}),{x:n.playBtn.x,y:n.playBtn.y,size:i,symbol:r.playing?"timeline-play-button":"timeline-stop-button"}))):t.remove()}),D(t,".timeline-next-btn",function(){return new Vm({})}).attr("className","timeline-next-btn").call(function(t){var e;o?(t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.nextBtn)||{}),{x:n.nextBtn.x,y:n.nextBtn.y,size:o,symbol:"timeline-next-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),this.style.autoPlay&&!this.playing&&(this.playing=!0,k(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.play()}),k(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-play-button"})})),!this.style.autoPlay&&this.playing&&(this.playing=!1,k(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.stop()}),k(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-stop-button"})}))};var ko={style:{x:0,y:0,padding:0,orient:"horizontal",backgroundStyle:{fill:"transparent",lineWidth:0},title:{content:"",spacing:4,align:"left",style:{fontWeight:"bold",fontFamily:"sans-serif",fontSize:12,textAlign:"top",textBaseline:"top",fill:"#2C3542"}},label:{style:{fill:"#2C3542",fillOpacity:.65,fontSize:12}}}},wv={symbol:"circle",size:8},kv={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},Mv={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},Ov=I({},ko,{style:{type:"category",items:[],maxWidth:void 0,maxHeight:void 0,maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!(gv.prototype.bindEvents=function(){var e=this,n=k(this).select(".timeline-axis").node(),r=k(this).select(".timeline-play-btn").node();r&&k(r).on("pointerdown",function(t){e.playing?(e.playing=!1,n.stop(),r.update({symbol:"timeline-stop-button"})):(e.playing=!0,n.play(),r.update({symbol:"timeline-play-button"}))}),k(this).on("timelineStopped",function(){e.playing=!1,null!=r&&r.update({symbol:"timeline-stop-button"})}),k(this).on("speedChanged",function(t){e.speed=t.detail.speed,n.update({playInterval:e.style.playInterval/e.speed})}),k(this).select(".timeline-prev-btn").on("pointerdown",function(){return n.prev()}),k(this).select(".timeline-next-btn").on("pointerdown",function(){return n.next()}),k(this).on("singleModeChanged",function(t){e.singleMode=t.detail.active,e.selection=Xm(e.selection,e.singleMode),e.render()}),k(this).on("selectionChanged",function(t){e.selection=t.detail.selection})}),pageNavigator:{loop:!1}}}),_v={width:100,height:20,type:"color",chunked:!1,ticks:[],isGradient:"auto",backgroundColor:"#c5c5c5"},Sv={spacing:4,formatter:function(t){return String(t)},align:"rail",flush:!0,maxLength:30},Ev={size:25,stroke:"#c5c5c5",fill:"#fff",lineWidth:1},Av=I({},ko,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],label:Sv,rail:_v,slidable:!0,indicator:{size:8,spacing:10,padding:5,backgroundStyle:{fill:"#262626","background-color":"#262626","border-radius":"5px"},text:{style:{color:"white","font-size":"12px"}}}}}),Pv="legend-item-";function Tv(t,e){t&&(t.setAttribute("tip",t.style.text),null!=t)&&t.attr("text",e||"")}function Nv(n,t){return void 0===n&&(n={}),(t=void 0===t?"":t).split("-").reduce(function(t,e){return _(_({},t),Ps(n,e,{}))},{})}i(Cv,Lv=na),Cv.prototype.setState=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n=new Set((this.state||"").split("-"));e?n.add(t):n.delete(t),this.state=re([],R(n),!1).join("-"),this.update()},Cv.prototype.getState=function(){return this.state},Cv.prototype.update=function(t){Lv.prototype.update.call(this,t=void 0===t?{}:t),t.state&&(this.state=t.state)},Object.defineProperty(Cv.prototype,"styles",{get:function(){return I({},Cv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Cv.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=this.styles,u=c.backgroundStyle,f=c.itemMarker,h=c.padding,d=c.itemName,p=c.itemValue,c=c.maxItemWidth,y=this.styles.itemHeight,h=R(Cy(h),4),g=h[0],m=h[1],v=h[2],h=h[3],b=Number((null==f?void 0:f.size)||0),x=(Zo(y)&&(y=Math.max.call(null,b,Number((null==(x=null==d?void 0:d.style)?void 0:x.fontSize)||0),Number((null==(x=null==p?void 0:p.style)?void 0:x.fontSize)||0))+(g+v)),D(this,".".concat(Pv,"container"),"g").attr("className","".concat(Pv,"container")).style("x",h).style("y",y/2).node()),w=(D(x,".".concat(Pv,"marker"),function(){return new E({})}).attr("className","".concat(Pv,"marker")).call(function(t){f?t.node().update(_(_({x:b/2,y:0,size:b,symbol:f.symbol},f.style||{}),Nv(f.style,l.state))):t.remove()}),b?b+((null==d?void 0:d.spacing)||0):0),g=D(x,".".concat(Pv,"name"),"text").attr("className","".concat(Pv,"name")).call(function(t){d?t.node().attr(_(_({x:w,y:0,tip:"",text:(null==d?void 0:d.content)||"",textBaseline:"middle",textAlign:"left"},d.style||{}),Nv(d.style,l.state))):t.remove()}).node(),k=w,v=(g&&!g.destroyed&&(k=g.getLocalBounds().max[0]),D(x,".".concat(Pv,"value"),"text").attr("className","".concat(Pv,"value")).call(function(t){p?t.node().attr(_(_(_({x:k+(p.spacing||0),y:0,tip:"",text:(null==p?void 0:p.content)||"",textAlign:"left"},p.style||{}),Nv(p.style,l.state)),{textBaseline:"middle"})):t.remove()}).node()),M=(Zo(c)||(g=null!=g&&g.destroyed?null:g,v=null!=v&&v.destroyed?null:v,n=c-w-(h+m),(g||v)&&"number"==typeof n&&(Number(n)<=0?(Tv(g,""),Tv(v,"")):g&&v?(o=g.getLocalBounds(),i=v.getLocalBounds(),n<(r=2*o.halfExtents[0])+(M=2*i.halfExtents[0])+(i=r&&M?i.min[0]-o.max[0]:0)&&(a=(o=R([.5*n,.5*n],2))[0],o=o[1],s=O=!0,r<=a?(o=n-(r+i),O=!1):M<=o&&(a=n-(M+i),s=!1),O&&(Tv(g,ky(g.style.text,a,_y(g))),v.attr("x",Number(g.style.x)+a+i)),s)&&Tv(v,ky(v.style.text,o,_y(v)))):n<2*(r=g||v).getLocalBounds().halfExtents[0]&&Tv(r,ky(r.style.text,n,_y(r))))),x.getLocalBounds()),O=Math.max(2*M.halfExtents[0]+m+h,this.styles.itemWidth||0);Zo(c)||(O=Math.min(c,O)),D(this,".".concat(Pv,"background"),"rect").attr("className","".concat(Pv,"background")).style("x",M.min[0]-h).style("y",0).style("width",O).style("height",y).style("zIndex",-1).call(S,u).call(S,Nv(u,this.state))},Cv.defaultOptions={style:{id:"",value:{},itemMarker:{size:8,symbol:"circle",style:{fill:"#d3d2d3",fillOpacity:1,lineWidth:0,active:{cursor:"pointer"}}},itemName:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",fontSize:12,opacity:1,active:{cursor:"pointer"}}},itemValue:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",opacity:1,fontSize:12,active:{cursor:"pointer"}}}}};var Lv,jv=Cv;function Cv(t){t=Lv.call(this,I({},Cv.defaultOptions,t))||this;return t.state="default",t.state=t.style.state||"selected",t}function Fv(t,a,o){void 0===o&&(o=0);var s=0,l=0,c=0;return t.reduce(function(t,e){var n=R(e.getLocalBounds().halfExtents,2),r=n[0],n=n[1],i="horizontal"===a?[t,0]:[0,t];return e.setLocalPosition(i[0],i[1]),l=Math.max(l,2*n),c=Math.max(c,2*r),(s="horizontal"===a?t+2*r:t+2*n)+o},0),{totalSize:s,maxItemWidth:c,maxItemHeight:l}}Vm.registerSymbol("left",function(t,e,n){return[["M",t-n*Math.sin(Math.PI/3),e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),Vm.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n*Math.sin(Math.PI/3),e],["L",t-n,e+n],["Z"]]}),Vm.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n*Math.sin(Math.PI/3)],["L",t+n,e+n],["Z"]]}),Vm.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n*Math.sin(Math.PI/3)],["Z"]]});i(Bv,Iv=F.CustomElement),Bv.prototype.connectedCallback=function(){this.container=this.appendChild(new F.Group),this.clipView=new F.Path({style:{path:[]}}),this.container.appendChild(this.clipView),this.render(),this.bindEvents()},Bv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(Bv.prototype,"styles",{get:function(){return I({},Bv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Bv.prototype.render=function(){this.renderButtonGroup();var t=this.style.items,t=void 0===t?[]:t;this.items=k(this.container).selectAll(".legend-item").data(t||[],function(t,e){return t.id||e}).join(function(t){return t.append(function(t){return new jv({id:t.id,className:"legend-item",style:t})})},function(t){return t.each(function(t){this.update(t)})},function(t){return t.remove()}).nodes(),this.adjustLayout()},Bv.prototype.bindEvents=function(){this.prevButton.addEventListener("pointerdown",this.prev.bind(this)),this.nextButton.addEventListener("pointerdown",this.next.bind(this))},Bv.prototype.ifHorizontal=function(t,e){return"vertical"===this.style.orient?"function"==typeof e?e():e:"function"==typeof t?t():t},Bv.prototype.renderButtonGroup=function(){var t=this.styles,e=t.pageButtonStyle,n=void 0===e?{}:e,e=t.pageTextStyle,t=D(this,".page-button-group",function(){return new F.Group({className:"page-button-group"})}).node(),r="page-prev-button",i="page-next-button";this.prevButton=D(t,"#".concat(r),function(){return new Vm({})}).attr("id",r).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),D(t,".page-info","text").attr("className","page-info").call(S,e),this.nextButton=D(t,"#".concat(i),function(){return new Vm({})}).attr("id",i).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),this.updatePageButtonSymbol()},Object.defineProperty(Bv.prototype,"pageInfoBounds",{get:function(){var t,e,n,r,i=this.querySelector(".page-info");return i?(r=(t=this.styles).pageFormatter,t=t.pageInfoSpacing,e=i.style.visibility,i.style.visibility="hidden",i.style.text=r(1,this.styles.items.length),n=(r=R(i.getLocalBounds().halfExtents,2))[0],r=r[1],i.style.visibility=e,{width:2*(n+t),height:2*(r+t)}):{width:0,height:0}},enumerable:!1,configurable:!0}),Bv.prototype.layoutButton=function(t){var e,n=this.style.pageInfoSpacing,r=this.pageInfoBounds.height,n=this.pageInfoBounds.width+2*(void 0===n?0:n),i=R(this.querySelector(".page-button-group").childNodes,3),a=i[0],o=i[1],i=i[2];"horizontal"===t?(t=2*a.getLocalBounds().halfExtents[0],e=2*i.getLocalBounds().halfExtents[0],a.style.x=t/2,i.style.x=t+n+e/2,o.style.x=(Number(a.style.x)+Number(i.style.x))/2,a.style.y=0,i.style.y=0,o.style.y=0):(t=2*a.getLocalBounds().halfExtents[1],n=2*i.getLocalBounds().halfExtents[1],a.style.y=-(r+t)/2,i.style.y=(r+n)/2,o.style.y=0,e=this.pageInfoBounds.width/2,a.style.x=e,i.style.x=e,o.style.x=e)},Bv.prototype.showButtonGroup=function(){this.querySelector(".page-button-group").style.visibility="visible"},Bv.prototype.resetPageCfg=function(){this.querySelector(".page-button-group").style.visibility="hidden",this.container.style.clipPath=null,this.currPage=void 0,this.maxPages=void 0,this.pageOffsets=[],this.container.style.transform="translate(0,0)",this.clipView&&(this.clipView.style.transform="translate(0,0)")},Bv.prototype.adjustLayout=function(){var t,e,n,r;this.resetPageCfg(),this.items.length<=1||(t=(n=R(Cy(this.style.spacing),2))[0],n=n[1],t=this.ifHorizontal(t,n),t=(n=Fv(this.items,this.style.orient||"horizontal",t)).totalSize,e=n.maxItemWidth,n=n.maxItemHeight,r=this.ifHorizontal(this.style.maxWidth,this.style.maxHeight),!Zo(r)&&r!==1/0&&r<t&&(this.style.autoWrap&&"vertical"!==this.style.orient?(this.layoutButton("vertical"),this.adjustHorizontalWrap(e,n,r)):(this.layoutButton("horizontal"),this.adjustFlip(e,n,r))))},Bv.prototype.adjustFlip=function(t,e,n){this.showButtonGroup();var r=this.querySelector(".page-button-group"),i=this.style.pageSpacing,a=this.prevButton.style.size||Bv.defaultOptions.style.pageButtonSize,o=r.getLocalBounds(),s=2*o.halfExtents[0],o=2*o.halfExtents[1],e=R(this.ifHorizontal([n-(s+i),e],[t,n-(o+i)]),2),l=e[0],c=e[1];this.clipView.style.path="M-1,0 L".concat(l,",0 L").concat(l,",").concat(c," L-1,").concat(c," Z"),this.container.style.clipPath=this.clipView,r.style.x=this.ifHorizontal(n-s,0),r.style.y=this.ifHorizontal(c/2-1,c+a+i);for(var u="x"===this.ifHorizontal("x","y")?0:1,f=[0],h=1,d=0;d<this.items.length;d++){var p=this.items[d].getLocalBounds(),y=p.min;p.max[u]-function(t){if(Yo(t))return t[t.length-1]}(f)>this.ifHorizontal(l,c)+4&&(0!==y[u]&&f.push(y[u]),h+=1)}this.maxPages=h,this.currPage=1,this.pageOffsets=f,this.updatePageNavigatorState()},Bv.prototype.adjustHorizontalWrap=function(t,c,e){this.showButtonGroup();var n,r=this.querySelector(".page-button-group"),i=this.style,a=i.pageSpacing,a=void 0===a?0:a,o=i.cols,i=this.pageInfoBounds.width,u=this.style.maxRows||2,s=r.getLocalBounds(),s=Math.max(2*s.halfExtents[0],i),i=e-(s+a),l=c*u;function f(t,e){for(var n=1,r=0,i=[0],a=0;a<e.length;a++){var o=e[a],s=o.getLocalBounds(),l=s.min;s.max[0]-r>t&&(n+=1,r=l[0],n%u==1)&&i.push((n-1)*c),o.setLocalPosition(l[0]-r,(n-1)*c)}return i}o&&u&&(o*u<=this.items.length&&(i=e),n=e/o),this.clipView.style.path="M-1,0 L".concat(i,",0 L").concat(i,",").concat(l," L-1,").concat(l," Z"),this.container.style.clipPath=this.clipView;var h=[];if(o&&n)for(var d=R(Cy(this.style.spacing),1)[0],p=0,y=0,g=0;g<this.items.length;g+=o){y=0,(p+=1)%u==1&&h.push(Math.floor(p/u)*l);for(var m=0;m<o&&g+m<this.items.length;m++)this.items[g+m].update({x:y,y:(p-1)*c,maxItemWidth:n-d}),y+=n}else 1===(h=f(i,this.items)).length&&(d=(a=R(Cy(this.style.spacing),2))[0],i=a[1],y=this.ifHorizontal(d,i),Fv(this.items,this.style.orient||"horizontal",y),f(e,this.items));this.maxPages=h.length,this.currPage=1,this.pageOffsets=h,this.maxPages<=1?this.resetPageCfg():(r.style.x=e-s,r.style.y=l/2-2,this.updatePageNavigatorState())},Bv.prototype.updatePageNavigatorState=function(){this.updatePageInfo(),this.currPage===this.maxPages?this.nextButton.setState("disabled"):this.nextButton.setState("default"),1===this.currPage?this.prevButton.setState("disabled"):this.prevButton.setState("default")},Bv.prototype.updatePageButtonSymbol=function(){var t=this.style.autoWrap,t=this.ifHorizontal(t?1:0,1);this.prevButton.update({symbol:["left","up"][t]}),this.nextButton.update({symbol:["right","down"][t]})},Bv.prototype.updatePageInfo=function(){var t=this.styles.pageFormatter;k(this).select(".page-info").style("text",this.currPage&&this.maxPages?t(this.currPage,this.maxPages):"")},Bv.prototype.finished=function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},Bv.prototype.prev=function(){var t,e;this.maxPages&&this.currPage&&(t=this.style.loop,(e=this.currPage-1)<1&&(e=t?this.maxPages:1),this.goTo(e))},Bv.prototype.next=function(){var t,e,n;this.maxPages&&this.currPage&&(t=this.style.loop,e=this.maxPages,n=this.currPage+1,this.goTo(n=e<n?t?1:e:n))},Bv.prototype.goTo=function(t){var e,n,r,i,a=this;t!==this.currPage&&"idle"===this.playState&&(e=(i=this.style).effect,n=i.duration,i=i.autoWrap,r=(i=R(this.ifHorizontal(i?[0,-this.pageOffsets[t-1]]:[-this.pageOffsets[t-1],0],[0,-this.pageOffsets[t-1]]),2))[0],i=i[1],this.playState="running",this.clipView.animate([{transform:this.clipView.style.transform},{transform:"translate(".concat(-r,"px,").concat(-i,"px)")}],{duration:n,easing:e,fill:"both"}),this.container.animate([{transform:this.container.style.transform},{transform:"translate(".concat(r,"px,").concat(i,"px)")}],{duration:n,easing:e,fill:"both"}),Promise.all(this.clipView.getAnimations().map(function(t){return t.finished})).then(function(){a.currPage=t,a.updatePageNavigatorState(),a.resolveFinishedPromise(),a.playState="idle"}),this.finished())},Bv.defaultOptions={style:{spacing:[4,0],effect:"easeQuadInOut",duration:320,maxRows:2,maxCols:2,pageButtonSize:10,pageInfoSpacing:2,pageFormatter:function(t,e){return"".concat(t,"/").concat(e)},pageButtonStyle:{size:10,margin:0,padding:0,markerStyle:{fill:"black",cursor:"pointer",disabled:{fill:"#d9d9d9",cursor:"not-allowed"}},backgroundStyle:{cursor:"pointer",fill:"transparent",disabled:{cursor:"not-allowed"}}},pageTextStyle:{fontSize:12,textBaseline:"middle",textAlign:"center"}}};var Iv,Rv=Bv;function Bv(t){t=Iv.call(this,I({},Bv.defaultOptions,t))||this;return t.items=[],t.maxPages=void 0,t.currPage=void 0,t.pageOffsets=[],t.playState="idle",t}function Dv(t){var e=t.items,i=t.maxWidth,a=t.maxItemWidth,o=t.itemMarker,s=t.itemName,l=t.itemValue,n=t.reverse,c=t.itemWidth,u=t.itemHeight,f=t.itemPadding,h=t.itemBackgroundStyle,d=e.slice();return n&&d.reverse(),d.map(function(t,e){return{id:t.id||"legend-item-".concat(e),state:t.state||"default",value:t,maxItemWidth:es([null!=a?a:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE]),itemMarker:(r=$o(o)?o(t,e,d):o,I({},wv,{symbol:t.marker,style:{fill:t.color,stroke:t.color}},r)),itemName:(r=I({},{formatter:function(){return t.name}},s),n=r.formatter,r=K(r,["formatter"]),I({},kv,{content:n(t,e,d)},r)),itemValue:(n=I({},{formatter:function(){return t.value}},l),r=n.formatter,n=K(n,["formatter"]),I({},Mv,{content:r(t,e,d)},n)),itemWidth:c,itemHeight:u,padding:f,backgroundStyle:h};var n,r})}i(Hv,zv=na),Hv.prototype.render=function(e,t){var n=e.padding,r=e.title,i=e.inset,a=e.orient,o=void 0===a?"horizontal":a,s=e.spacing,l=e.autoWrap,c=e.maxRows,u=e.maxWidth,f=e.maxHeight,h=e.cols,d=e.pageNavigator,a=e.backgroundStyle,a=void 0===a?{}:a,n=R(Cy(n),4),p=n[0],y=n[1],g=n[2],n=n[3],m=bv(t,"legend-container",n,p),v=vv(m,r),r=(null==r?void 0:r.spacing)||0,i=R(Cy(i),4),b=i[0],i=i[3],v=mv(v),i=(D(bv(m,"legend-inner-group",v.left+i,v.bottom+b+r),".category-items",function(){return new Rv({})}).attr("className","category-items").call(function(t){t.node().update(_({orient:o,items:Dv(e),spacing:s,autoWrap:l,maxRows:c,maxWidth:u,maxHeight:f,cols:h},d||{}))}).node(),m.getLocalBounds()),v=i.min,b=i.max,r=b[0]-v[0],m=b[1]-v[1];xv(t,"legend-background",Math.min(r+y+n,u||Number.MAX_VALUE),Math.min(m+p+g,f||Number.MAX_VALUE),a)},Hv.prototype.getItem=function(t){return this.querySelector("[id=".concat(t,"]"))},Hv.prototype.setItemState=function(t,e,n){void 0===n&&(n=!0),null!=(t=this.getItem(t))&&t.setState(e,n)},Hv.prototype.getItemsStates=function(){return this.querySelectorAll(".legend-item").map(function(t){return{id:t.id,state:t.getState()}})};var zv,Wv=Hv;function Hv(t){return zv.call(this,I({},Ov,t))||this}function Vv(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}E.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),E.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),E.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});i(Yv,qv=F.CustomElement),Yv.prototype.connectedCallback=function(){this.draw()},Yv.prototype.attributeChangedCallback=function(){this.draw()},Yv.prototype.draw=function(){this.updateBackground(),this.updateTrack()},Yv.prototype.updateBackground=function(){var t=this.style.backgroundColor;this.path.style.path=this.getRailPath(),this.path.attr({fill:t,fillOpacity:.45})},Yv.prototype.updateTrack=function(){var t=this.style.fill,e=(this.track.style.path=this.getRailPath(),this.getClipPath());(this.track.style.clipPath=e)&&this.track.appendChild(e),this.track.style.fill=t},Object.defineProperty(Yv.prototype,"box",{get:function(){var t=this.style,e=t.orient,n=t.size,t=t.length;return Vv(e,[t,n],[n,t])},enumerable:!1,configurable:!0}),Yv.prototype.getRailPath=function(){var t=this.style.type,e=R(this.box,2),n=e[0],e=e[1];return"size"===t?[["M",0,e],["L",0+n,0],["L",0+n,e]]:[["M",0,e],["L",0,0],["L",0+n,0],["L",0+n,e]]},Yv.prototype.getClipPath=function(){var t,e,n,r,i=this.style,a=i.orient,i=i.selection;return i?(r=(t=R(this.box,2))[0],t=t[1],n=(i=R(i,2))[0],i=i[1],e=Vv(a,n*r,0),n=Vv(a,0,n*t),r=Vv(a,i*r,r),a=Vv(a,t,i*t),new F.Path({style:{path:[["M",e,n],["L",e,a],["L",r,a],["L",r,n]]}})):null};var qv,Gv=Yv;function Yv(t){t=qv.call(this,Ky({},{style:_v},t=void 0===t?{}:t))||this;return t.path=t.appendChild(new F.Path({className:"rail-path"})),t.track=t.appendChild(new F.Path({className:"rail-path"})),t}i($v,Uv=na),$v.prototype.render=function(t,e){var n=t.textStyle,r=t.visibility,i=t.symbol,a=t.size,o=t.fill,s=t.stroke,l=t.lineWidth;i&&"hidden"!==r?(D(e,".handle",function(){return new E({})}).attr("className","handle").call(function(t){t.node().update({symbol:i,size:a,fill:o,stroke:s,lineWidth:l})}),D(e,".handle-text","text").attr("className","handle-text").call(S,n)):(null!=(t=e.querySelector(".handle"))&&t.remove(),null!=(r=e.querySelector(".handle-text"))&&r.remove())};var Uv,Xv=$v;function $v(){return null!==Uv&&Uv.apply(this,arguments)||this}i(Qv,Zv=F.CustomElement),Qv.prototype.connectedCallback=function(){this.init(),this.bindEvents()},Qv.prototype.attributeChangedCallback=function(t,e,n){"textStyle"!==t&&"padding"!==t&&"position"!==t||this.init()},Qv.prototype.hide=function(){this.style.visibility="hidden"},Qv.prototype.show=function(){this.style.visibility="visible"},Qv.prototype.init=function(){var t=this.style,e=t.textStyle;"top"===t.position?this.text.attr(_({textAlign:"center"},e)):this.text.attr(_({textAlign:"left"},e))},Qv.prototype.updateBackground=function(){var t,e,n=this.text.getLocalBounds(),r=n.min,n=n.max,i=Math.min(n[0]-r[0],40),r=[r[0]-4,r[1]-2,r[0]+i+4,n[1]+2],a=(i=this.style.position,r=(n=R(n=r,4))[0],e=n[1],a=n[2],n=n[3],"top"===i?[["M",r,n],["L",r,e],["L",a,e],["L",a,n],["L",r+(i=a-r)/2+(t=as(10,i/3,i/2))/2,n],["L",r+i/2,n+4],["L",r+i/2-t/2,n],["L",r,n]]:[["M",r,e],["L",a,e],["L",a,n],["L",r,n],["L",r,e+(i=n-e)/2+(t=as(6,i/3,i/2))/2],["L",r-4,e+i/2],["L",r,e+i/2-t/2],["L",r,e]]);this.background.style.path=a},Qv.prototype.bindEvents=function(){var t=this;this.text.addEventListener(F.ElementEvent.BOUNDS_CHANGED,function(){t.updateBackground()})};var Zv,Kv=Qv;function Qv(t){t=Zv.call(this,Ky({},{style:{visibility:"hidden"}},t=void 0===t?{}:t))||this;return t.background=t.appendChild(new F.Path({style:{lineCap:"round",fill:"#262626",lineWidth:1,stroke:"#333"}})),t.text=t.appendChild(new F.Text({style:{text:"",fill:"#fff",fontSize:10,textBaseline:"middle"}})),t}function Jv(t,e){var t=R(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}function tb(t,e,n,r,i){var a=R(Vv(t,["dx","dy"],["dy","dx"]),2),o=a[0],a=a[1],s={};return s[o]=e,s[a]="start"===n?-i:r+i,s.textAlign=Vv(t,"center","start"===n?"right":"left"),s.textBaseline=Vv(t,"start"===n?"bottom":"top","middle"),s}function eb(t,e){var n,s,l,c,r,i,a,u=t.min,f=t.max,o=t.handle,h=t.orient,d=void 0===h?"horizontal":h;return null===t.label||o?[]:(s=Ky({size:24,length:200},_v,t.rail||{}),h=Ky({},Sv,t.label||{}),l=h.align,c=h.spacing,"rail"===l?(t=(o=R(Vv(d,["dx","dy"],["dy","dx"]),2))[0],h=o[1],r=(o=R(Vv(d,["right","left"],["center","center"]),2))[0],o=o[1],i=(a=R(Vv(d,["middle","middle"],["bottom","top"]),2))[0],a=a[1],[((n={id:"legend-label-0",text:"".concat(u)})[t]=-c,n[h]=s.size/2,n.textAlign=r,n.textBaseline=i,n),((r={id:"legend-label-1",text:"".concat(f)})[t]=s.length+c,r[h]=s.size/2,r.textAlign=o,r.textBaseline=a,r)]):e.map(function(t,e){o=t,n=u,r=f,i=s;var n,r,i,a=(a=void 0!==a&&a)?o*(r-n)/i.length:Ey((o-n)*(n<r?i.length/(r-n):0),2),o=tb(d,a,l,s.size,c);return _({id:"legend-label-".concat(e),text:"".concat(t)},o)}))}var nb=_s(function(t){return t.sort(function(t,e){return t-e})},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return JSON.stringify(t)});i(lb,rb=na),lb.prototype.render=function(t,e){var n=t.padding,r=t.title,i=t.inset,a=(t.orient,t.backgroundStyle),a=void 0===a?{}:a,o=t.maxWidth,s=t.maxHeight,l=t.label,n=R(Cy(n),4),c=n[0],u=n[1],f=n[2],n=n[3],h=bv(e,"legend-container",n,c),d=vv(h,r),r=(null==r?void 0:r.spacing)||0,i=R(Cy(i),4),p=i[0],i=i[3],d=mv(d),i=bv(h,"legend-inner-group",d.left+i,d.bottom+p+r),d=eb(t,this.ticks),p=(xm(i,"legend-label",d,l,{fill:"#2C3542",fillOpacity:.65,fontWeight:"normal"}),this.drawInner(),h.getLocalBounds()),r=p.min,t=p.max,i=t[0]-r[0],d=t[1]-r[1];xv(e,"legend-background",Math.min(i+u+n,o||Number.MAX_VALUE),Math.min(d+c+f,s||Number.MAX_VALUE),a)},lb.prototype.drawInner=function(){this.drawRail(),this.drawHandles(),this.createIndicator()},Object.defineProperty(lb.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(lb.prototype,"selection",{get:function(){var t=this.style,e=t.min,n=t.max;return[t.start||e,t.end||n]},enumerable:!1,configurable:!0}),Object.defineProperty(lb.prototype,"labelsCfg",{get:function(){var t=this.style.label;return Ky({},Sv,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(lb.prototype,"railCfg",{get:function(){var t=this.style.rail;return Ky({size:24,length:200},_v,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(lb.prototype,"handleCfg",{get:function(){var t=this.style,e=t.handle,t=t.label;return Ky({},Ev,e||{},{textStyle:this.labelsCfg.style,spacing:this.labelsCfg.spacing,visibility:e&&null!==t?"visible":"hidden"})},enumerable:!1,configurable:!0}),lb.prototype.ifHorizontal=function(t,e){return Vv(this.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Object.defineProperty(lb.prototype,"color",{get:function(){var t,e,i,a,o,n=this.style.color,n=Array.from(void 0===n?[]:n),r=n.length;return r?this.railCfg.chunked?(t=this.ticks,e=this.orient,i=Array.from(n),a=i.length,o=t.length,t.reduce(function(t,e,n){var r=i[n%a];return t+" ".concat(n/(o-1),":").concat(r).concat(n<o-1?" ".concat((n+1)/(o-1),":").concat(r):"")},"l(".concat("horizontal"===e?"0":"270",")"))):n.reduce(function(t,e,n){return t+" ".concat(n/(r-1),":").concat(e)},"l(".concat(this.ifHorizontal("0","270"),")")):""},enumerable:!1,configurable:!0}),Object.defineProperty(lb.prototype,"slidable",{get:function(){return!!this.style.handle},enumerable:!1,configurable:!0}),Object.defineProperty(lb.prototype,"ticks",{get:function(){var t=this.style,e=t.min,t=t.max;return nb(re(re([e],R(this.railCfg.ticks||[]),!1),[t],!1))},enumerable:!1,configurable:!0}),lb.prototype.drawRail=function(){var t=this.style,e=t.orient,n=t.min,t=t.max,r=R(this.selection,2),i=r[0],r=r[1],a=this.querySelector(".legend-inner-group");this.rail=k(this.rail||a.appendChild(new Gv)).attr("className","legend-rail").call(S,_(_({},this.railCfg),{fill:this.color,orient:e})).style("selection",this.slidable?[(i-n)/(t-n),(r-n)/(t-n)]:void 0).node()},lb.prototype.drawHandles=function(){var t=R(this.selection,2),e=t[0],t=t[1];this.startHandle=this.drawHandle("start",e),this.endHandle=this.drawHandle("end",t)},lb.prototype.drawHandle=function(t,e){var n=this,r=this.labelsCfg,i=r.align,r=r.spacing,a=this.railCfg.size,o=this.handleCfg.size,s=this.getOffset(e),l=tb(this.orient,s,i,a,-o/3),c=l.dx,u=l.dy,f=tb(this.orient,s,i,a,"start"===i?r:o/3+r),l="start"===t?this.startHandle:this.endHandle,s=this.querySelector(".legend-inner-group");return k(l||s.appendChild(new Xv({}))).attr("className","legend-handle-".concat(t)).call(function(t){return t.node().update(_(_({},n.handleCfg),{x:c,y:u,symbol:n.ifHorizontal("horizontalHandle","verticalHandle"),textStyle:_({text:"".concat(null!=e?e:""),x:+f.dx-+c,y:+f.dy-+u,textAlign:f.textAlign,textBaseline:f.textBaseline},n.handleCfg.textStyle)}))}).node()},lb.prototype.createIndicator=function(){this.indicator=this.appendChild(new Kv({zIndex:2,className:"legend-indicator",style:{position:this.ifHorizontal("top","right")}}))},lb.prototype.bindEvents=function(){var n=this,t=new Map;t.set("rail",this.rail),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){t.addEventListener("mousedown",n.onDragStart(e)),t.addEventListener("touchstart",n.onDragStart(e))}),this.startHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.endHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.rail.addEventListener("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},lb.prototype.showIndicator=function(t,e){var n,r,i,a,o,s,l;void 0===e&&(e="".concat(t)),"number"!=typeof t?this.hideIndicator():(this.indicator.show(),l=this.querySelector(".legend-container"),n=(r=this.style).min,r=r.max,t=as(t,n,r),n=this.ifHorizontal(this.getOffset(t),this.railCfg.size+12),r=this.ifHorizontal(-14,this.getOffset(t)),i=(t=this.rail.getBBox()).x,t=t.y,a=(o=l.getBBox()).x,o=o.y,s=(l=R(l.getLocalPosition(),2))[0],l=l[1],this.indicator.style.x=i-a+s+n,this.indicator.style.y=t-o+l+r,this.indicator.style.textStyle={text:e})},lb.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.hide()},lb.prototype.onDragEnd=function(){this.style.cursor="default",this.removeEventListener("mousemove",this.onDragging),this.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd)},lb.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},lb.prototype.setSelection=function(t,e){this.updateSelection(t,e)},lb.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=R(this.selection,2),c=l[0],l=l[1],t=R([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.style),c=n.min,l=n.max,u=R((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=R(n,2))[0],n=n[1],a=(c=R(c,2))[0],c=c[1],o=(l=R(l,2))[0],l=l[1],c=(a=R([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=R([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Ey(c,r),Ey(a,r)]),2),e=u[0],t=u[1];this.update({start:e,end:t}),this.dispatchSelection()},Object.defineProperty(lb.prototype,"step",{get:function(){var t=this.attributes,e=t.step,n=t.min,t=t.max;return ys(e)?Ey(.01*(t-n),0):e},enumerable:!1,configurable:!0}),lb.prototype.getTickValue=function(t){return this.railCfg.chunked?Jv(this.ticks,t).tick:(e=this.step,(n=this.style.min)+Math.round((t-n)/e)*e);var e,n},lb.prototype.getValueByCanvasPoint=function(t,e){var n=this.style,r=n.min,n=n.max,i=R(this.rail.getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,re([],R(Dy(t)),!1));return as(this.getOffset(i-a,!0)+r,r,n)},lb.prototype.getOffset=function(t,e){var n=this.style,r=n.min,n=n.max;return(e=void 0!==e&&e)?t*(n-r)/this.railCfg.length:Ey((t-r)*(r<n?this.railCfg.length/(n-r):0),2)},lb.prototype.dispatchSelection=function(){var t=new F.CustomEvent("valueChanged",{detail:{value:this.selection}});this.dispatchEvent(t)},lb.prototype.dispatchIndicated=function(t,e){t=new F.CustomEvent("onIndicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([ng(20)],lb.prototype,"dispatchSelection",null),t([ng(20)],lb.prototype,"dispatchIndicated",null);var rb,ib,ab,ob,sb=lb;function lb(t){var a=rb.call(this,Ky({type:"continuous-legend"},Av,t))||this;return a.onHovering=function(t){t.stopPropagation();var e,t=a.getValueByCanvasPoint(t);Ps(a.attributes,["rail","chunked"])?(e=Jv(a.ticks,t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(e=a.getTickValue(t),a.showIndicator(e),a.dispatchIndicated(e))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),a.addEventListener("mouseleave",a.onDragEnd),a.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),R(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"rail"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a}function cb(t){ib||(ib=document.createElement("table"),ob=document.createElement("tr"),ab=/^\s*<(\w+|!)[^>]*>/,ob={tr:document.createElement("tbody"),tbody:ib,thead:ib,tfoot:ib,td:ob,th:ob,"*":document.createElement("div")});var e=ab.test(t)&&RegExp.$1,e=(e&&e in ob||(e="*"),ob[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var ub,Ao="tooltip",fb="tooltip-title",hb="tooltip-list",Qa="tooltip-list-item",_o="tooltip-list-item-name",db="tooltip-list-item-marker",So="tooltip-list-item-name-label",Kl="tooltip-list-item-value",n="tooltip-crosshair-x",a="tooltip-crosshair-y",c={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},e=((r={})[".".concat(Ao)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},r[".".concat(fb)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(hb)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(Qa)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(db)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(_o)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(So)]=_({flex:1},c),r[".".concat(Kl)]=_({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},c),r[".".concat(n)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(a)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r),pb=(i(yb,ub=na),Object.defineProperty(yb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(yb.prototype,"position",{set:function(t){var t=R(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(yb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(yb.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=K(t,["name","value","color","index"]);return _({name:n,value:r,color:i,index:void 0===a?e:a},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(yb.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(cb((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty(yb.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return is(t)?qy(t):gs(t)?t:$o(t)?qy(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),yb.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},yb.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},yb.prototype.clear=function(){this.element.innerHTML=""},yb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},yb.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},yb.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},yb.prototype.initShape=function(){var t=this.attributes.template.container;this.element=cb(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},yb.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(fb)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=hb,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=R(t,2),e=t[0],n=t[1];re([r],R(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},yb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=R(e.offset,2),i=e[0],a=e[1],e=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=R(c,2),n=e[0],e=e[1],t=R(o[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+a)*t]}),c},yb.prototype.setOffsetPosition=function(t){var t=R(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(r+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},yb.prototype.updatePosition=function(){this.throttleUpdatePosition()},yb.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=R(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=R([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},yb.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},yb.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},yb.tag="tooltip",yb.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(Ao,'"></div>'),title:'<div class="'.concat(fb,'"></div>'),item:'<li class="'.concat(Qa,'" data-index={index}>\n <span class="').concat(_o,'">\n <span class="').concat(db,'" style="background:{color}"></span>\n <span class="').concat(So,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Kl,'" title="{value}">{value}</span>\n </li>')},style:e}},yb);function yb(t){var e=ub.call(this,I({},yb.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=Rs(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var gb,mb={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function vb(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function bb(t){return gb.call(this,I({},bb.defaultOptions,t))||this}i(bb,gb=na),bb.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=D(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=Ps(mb,n,mb.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&D(e,".switch-tag",function(){return new fg({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(I({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=_(_({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),D(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",f).style("fillOpacity",r?.4:1).call(S,h).node()),y=D(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(S,h).node();D(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",f).call(function(t){var e,t=t.node(),n=vb(p,a,o),r=vb(p,a,!o);t.attr("x")&&!Fs(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=y.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),y.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},bb.defaultOptions={type:bb.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var xb,Mo={text:"",type:"primary",height:20,width:20,buttonStyle:{default:{lineWidth:0,fill:"#fff"},active:{fill:"#fff"},disabled:{fill:"#fff"}},markerStyle:{default:{fill:"black",size:10},disabled:{fill:"#8c8c8c"}}};function p(t){var t=xb.call(this,I({},p.defaultOptions,t))||this,e=(t.playState="idle",t.attributes),n=e.view,e=e.initPageNum;return t.currPage=e,t.view=n,t.init(),t}i(p,xb=na),Object.defineProperty(p.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"maxPages",{get:function(){var t=this.attributes,e=t.pageWidth,n=t.pageHeight,r=t.orient,i=t.pageLimit;return t.pageCallback||i!==1/0?i:"horizontal"===r?Math.ceil(this.width/e):Math.ceil(this.height/n)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"view",{get:function(){return this.fullView},set:function(t){var e=this.attributes,n=e.width,e=e.height;t.setLocalPosition(0,0),this.fullView=t,n&&e||(e=(n=Hy(t)).width,t=n.height,this.width=e,this.height=t)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"width",{get:function(){var t=this.attributes.width;return t||this.viewWidth},set:function(t){this.viewWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"height",{get:function(){var t=this.attributes.height;return t||this.viewHeight},set:function(t){this.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"btnPosition",{get:function(){var t;return null!=(t=this.style.button)&&t.position?this.style.button.position:"horizontal"===this.style.orient?"right":"bottom"},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"defaultShape",{get:function(){return["left","right","left-right"].includes(this.btnPosition)?["left","right"]:["up","down"]},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"buttonCfg",{get:function(){var t=R(this.defaultShape,2),e=t[0],t=t[1],n=this.attributes.button,r=n.prev,n=n.next;return{prev:_({marker:e},r),next:_({marker:t},n)}},enumerable:!1,configurable:!0}),p.prototype.render=function(t,e){},p.prototype.init=function(){this.initShape(),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},p.prototype.update=function(t){var e=t.view;e&&(this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.currPage=this.attributes.initPageNum,this.view=e,this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack()),this.attr(I({},this.attributes,t)),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},p.prototype.clear=function(){this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.fullView=void 0,this.removeChildren()},p.prototype.destroy=function(){this.removeChildren(),xb.prototype.destroy.call(this)},p.prototype.goTo=function(t){var e,n,r,i,a,o,s,l,c,u,f=this;return"idle"===this.playState&&(e=(n=this.attributes).effect,n=n.duration,r=(c=this.calcRelativePagingOffset(t)).viewFromX,i=c.viewFromY,a=c.viewToX,o=c.viewToY,u=c.clipFromX,s=c.clipFromY,l=c.clipToX,c=c.clipToY,this.playState="running",this.clipView.animate([{transform:"translate(".concat(u,"px, ").concat(s,"px)")},{transform:"translate(".concat(l,"px, ").concat(c,"px)")}],{duration:n,easing:e,fill:"both"}),null!=(u=this.view.animate([{transform:"translate(".concat(r,"px, ").concat(i,"px)")},{transform:"translate(".concat(a,"px, ").concat(o,"px)")}],{duration:n,easing:e,fill:"both"})))&&u.finished.then(function(){f.currPage=t,f.updateButtonState(),f.resolveFinishedPromise(),f.playState="idle"}),this.finished},p.prototype.prev=function(){var t=this.attributes.loop,e=this.currPage-1;return e<1&&(e=t?this.maxPages:1),this.goTo(e)},p.prototype.next=function(){var t=this.attributes.loop,e=this.maxPages,n=this.currPage+1;return this.goTo(n=e<n?t?1:e:n)},p.prototype.initShape=function(){this.clipView=new F.Rect({name:"clipView",style:{x:0,y:0,width:0,height:0}}),this.view.style.clipPath=this.clipView,this.view.appendChild(this.clipView),this.appendChild(this.view),this.view.toBack();var t=R(this.defaultShape,2),e=t[0],t=t[1];this.prevButton=new vg({name:"prevButton",style:_(_({},p.defaultOptions.style.button.prev),{marker:e,onClick:this.prev.bind(this)})}),this.appendChild(this.prevButton),this.nextButton=new vg({name:"nextButton",style:_(_({},p.defaultOptions.style.button.next),{marker:t,onClick:this.next.bind(this)})}),this.appendChild(this.nextButton),this.paginationGroup=new F.Group({name:"paginationGroup"}),this.appendChild(this.paginationGroup)},p.prototype.updateView=function(){var t=this.getClipViewSpace(this.currPage),e=t.width,t=t.height;this.clipView.attr({width:e,height:t}),this.view.setLocalPosition(0,0),this.clipView.setLocalPosition(0,0)},p.prototype.updateButton=function(){var t=this.buttonCfg,e=t.prev,t=t.next;e&&this.prevButton.update(e),t&&this.nextButton.update(t)},p.prototype.updateButtonState=function(){this.attributes.loop?(this.nextButton.setState("default"),this.prevButton.setState("default")):(this.nextButton.setState(this.currPage===this.maxPages?"disabled":"default"),this.prevButton.setState(1===this.currPage?"disabled":"default"))},p.prototype.getClipViewSpace=function(t){var e=this.attributes,n=e.orient,r=e.pageWidth,i=e.pageHeight,e=e.pageCallback,a={x:0,y:0,width:r,height:i},o=this.maxPages;return e?_(_({},a),e(t)):(o<t||t<1||("vertical"===n?a.y=(t-1)*i:"horizontal"===n&&(a.x=(t-1)*r)),a)},p.prototype.absolute2Relative=function(t,e){var n=this.currPage,n=this.getClipViewSpace(n);return[t+n.x,e+n.y]},p.prototype.getViewPosition=function(t){var e=this.getClipViewSpace(1),n=e.x,e=e.y,t=this.getClipViewSpace(t),n=R([-t.x+n,-t.y+e],2);return{x:n[0],y:n[1]}},p.prototype.getRelativeViewPosition=function(t){var t=this.getViewPosition(t),e=t.x,t=t.y,e=R(this.absolute2Relative(e,t),2);return{x:e[0],y:e[1]}},p.prototype.calcRelativePagingOffset=function(t){var e=R(this.absolute2Relative.apply(this,re([],R(this.view.getLocalPosition().slice(0,2)),!1)),2),n=e[0],e=e[1],t=this.getRelativeViewPosition(t),r=t.x,t=t.y,i=R([-n,-e],2),a=i[0],i=i[1],o=R([-r,-t],2);return{viewFromX:n,viewFromY:e,viewToX:r,viewToY:t,clipFromX:a,clipFromY:i,clipToX:o[0],clipToY:o[1]}},p.prototype.adjustLayout=function(){this.adjustButton()},p.prototype.adjustButton=function(){var t,e=this.attributes,n=e.button,r=e.pageWidth,e=e.pageHeight,i=this.btnPosition,n=(null==n?void 0:n.spacing)||0,a=Hy(this.prevButton),o=a.width,a=a.height,s=Hy(this.nextButton),l=s.width,s=s.height,c=0,u=0,f=0,h=0;"left-right"===i?(c=-(n+o),u=(e-a)/2,f=n+r,h=(e-s)/2):"top-bottom"===i?(c=(r-o)/2,u=-(n+a),f=(r-l)/2,h=n+e):"top"===i?(c=(r-n)/2-o,u=-(n+(t=ts([a,s]))),f=(r+n)/2,h=-(n+t)):"bottom"===i?(c=(r-n)/2-o,f=(r+n)/2,h=u=n+e):"left"===i?(c=(f=-(n+l))-(n+o),h=u=(e-(t=ts([a,s])))/2):"right"===i&&(f=(c=n+r)+o,h=u=(e-(t=ts([a,s])))/2),this.prevButton.setLocalPosition(c,u),this.nextButton.setLocalPosition(f,h)},p.defaultOptions={type:p.tag="page-navigator",style:{x:0,y:0,effect:"linear",duration:200,orient:"horizontal",initPageNum:1,pageLimit:1/0,loop:!1,button:{prev:_({spacing:0},Mo),next:_({spacing:0},Mo),style:{default:{},active:{},disabled:{}},spacing:5},pagination:{type:"currTotal",style:{default:{},active:{}},separator:"/",spacing:5}}},E.registerSymbol("left",function(t,e,n){return[["M",t-n,e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),E.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]}),E.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n],["L",t+n,e+n],["Z"]]}),E.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n],["Z"]]});var wb,kb,Mb,Ob,Ki={text:{text:""},lineStyle:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,lineDash:[5,5]}},Eo=Ky({},Ki,{type:"line",text:{position:"start",align:"center",verticalAlign:"bottom"}}),o=Ky({},Ki,{type:"circle",defaultRadius:0}),ta=Ky({},Ki,{type:"polygon",defaultRadius:0,startAngle:0}),ea=(i(_b,wb=na),Object.defineProperty(_b.prototype,"localPointer",{get:function(){var t=R(this.getPosition(),2),e=t[0],t=t[1],n=R(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"tagCfg",{get:function(){var t=this.attributes.text;return t.position,K(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"crosshairCfg",{get:function(){var t=this.attributes.lineStyle;return _(_({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),_b.prototype.render=function(t,e){var n=this,e=D(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=D(e,".crosshair-tag",function(){return new fg({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=D(e,".crosshair-path","path").attr("className","crosshair-path").call(S,this.crosshairCfg).node(),this.adjustLayout()},_b.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},_b.prototype.setPointer=function(t){this.pointer=t},_b.defaultOptions={type:_b.tag="crosshair-base",style:Ki},_b);function _b(t){return wb.call(this,I({},_b.defaultOptions,t))||this}function Sb(t){return kb.call(this,Ky({},Sb.defaultOptions,t))||this}function Eb(t){return Mb.call(this,Ky({},Eb.defaultOptions,t))||this}function Ab(t){return Ob.call(this,Ky({},Ab.defaultOptions,t))||this}i(Sb,kb=ea),Object.defineProperty(Sb.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=R(t.startPos,2),n=e[0],e=e[1],t=R(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=R(this.getPosition(),2))[0],e=e[1],[(n=R(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"isVertical",{get:function(){var t=this.attributes,e=R(t.startPos,2),n=e[0],e=e[1],t=R(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"tagShapeSpace",{get:function(){var t=Hy(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Sb.prototype.update=function(t){kb.prototype.update.call(this,t)},Sb.prototype.setPointer=function(t){kb.prototype.setPointer.call(this,t),this.adjustPosition()},Sb.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},Sb.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},Sb.prototype.adjustPosition=function(){var t=R(this.localPointer,2),e=t[0],t=t[1],n=R(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},Sb.prototype.adjustTag=function(){var t,e,n=this.attributes,r=n.text,i=R(n.startPos,2),a=i[0],i=i[1],n=R(n.endPos,2),o=n[0],n=n[1];r&&""!==r?(this.tagShape.show(),r=r.position,e=(t=this.tagShapeSpace).width,t=t.height,a=(o=R(this.getOrientVal({start:[-e/2,t/2],end:[o-a+e/2,t/2]},{start:[0,0],end:[0,n-i+t]})[r],2))[0],e=o[1],this.tagShape.setLocalPosition(a,e)):this.tagShape.hide()},Sb.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},Sb.defaultOptions={type:Sb.tag="line-crosshair",style:Eo},t([ng(20)],Sb.prototype,"setPointer",null),i(Eb,Mb=ea),Object.defineProperty(Eb.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),Eb.prototype.update=function(t){Mb.prototype.update.call(this,t)},Eb.prototype.setPointer=function(t){var t=R(t,2),e=t[0],t=t[1],e=(Mb.prototype.setPointer.call(this,[e,t]),R(this.localPointer,2)),t=e[0],e=e[1],n=R(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},Eb.prototype.adjustLayout=function(){this.tagShape.hide()},Eb.prototype.createCirclePath=function(t){var e=this.attributes,n=R(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return ig(r,n,t||e)},Eb.defaultOptions={type:Eb.tag="circle-crosshair",style:o},t([ng(20)],Eb.prototype,"setPointer",null),i(Ab,Ob=ea),Object.defineProperty(Ab.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),Ab.prototype.update=function(t){Ob.prototype.update.call(this,t)},Object.defineProperty(Ab.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),Ab.prototype.setPointer=function(t){var t=R(t,2),e=t[0],t=t[1],e=(Ob.prototype.setPointer.call(this,[e,t]),R(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=R(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=eg(n,[t,e])/eg(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},Ab.prototype.adjustLayout=function(){this.tagShape.hide()},Ab.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=R(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=R(t,2),t=R(Zt([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},Ab.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=R(t,2),c=t[0],u=t[1],f=this.points,t=R(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var y=R(f[p-1],2),g=y[0],y=y[1],m=R(f[p%f.length],2),v=m[0],m=m[1],g=(i=[h,d],g=[g+h,y+d],y=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=R(r=[c,u],2))[0],r=r[1],a=(i=R(i,2))[0],i=i[1],o=(g=R(g,2))[0],g=g[1],s=(y=R(y,2))[0],y=y[1],l=[],(y-g)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(g-r)*(a-m)&&(Jy(m,a,r,i,o,g)&&tg(l,o,g),Jy(m,a,r,i,s,y)&&tg(l,s,y),Jy(o,s,g,y,m,r)&&tg(l,m,r),Jy(o,s,g,y,a,i))&&tg(l,a,i):(v=(m*(i-r)+g*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(y-g)),0<=(y=(o*(y-g)+r*(s-o)-g*(s-o)-m*(y-g))/((a-m)*(y-g)-(s-o)*(i-r)))&&y<=1&&0<=v&&v<=1&&(l[0]=m+y*(a-m),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=R(g,2))[0],n=s[1])}return[e,n]},Ab.defaultOptions={type:Ab.tag="polygon-crosshair",style:ta},t([ng(20)],Ab.prototype,"setPointer",null);i(Lb,Pb=F.DisplayObject),Object.defineProperty(Lb.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Ko(t)?t.map(function(t){return Ko(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=R(t,2),n=t[0],t=t[1];return"wavy"===t?_({path:r.getWavyPath(n)},i):"double"===t?_({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},_(_({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),Lb.prototype.update=function(t){var e=this;this.attr(Ky({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new F.Path({style:t}))})},Lb.prototype.clear=function(){this.removeChildren()},Lb.prototype.getLinePos=function(t){var e=R(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=R([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=R([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=R([0,a*r],2))[0],n):(s=(t=R([0,a*e+i/2],2))[0],t))[1];return[s,o]},Lb.prototype.getLinePath=function(t){var e=this.attributes.width,t=R(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},Lb.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=R(this.getLinePos(t),2),a=i[0],i=i[1],o=R([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=R([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=R([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=R([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},Lb.prototype.getWavyPath=function(t){return[]},Lb.tag="decoration",Lb.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var Pb,Tb,Nb=Lb;function Lb(t){t=Pb.call(this,Ky({},Lb.defaultOptions,t))||this;return t.update({}),t}function jb(t){t=Tb.call(this,Ky({},jb.defaultOptions,t))||this;return t.init(),t}i(jb,Tb=na),Object.defineProperty(jb.prototype,"textWidth",{get:function(){var e=this;return ts(this.renderText.split("\n").map(function(t){return My(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"textHeight",{get:function(){return Hy(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"height",{get:function(){var t=this.attributes.height;return os(t)&&0!==t?t:Hy(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Sy(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Sy(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return ky(t,os(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&os(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"font",{get:function(){return Ts(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return _(_(_({},Iy),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return _({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return Ky({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(jb.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),jb.prototype.init=function(){this.initShape(),this.update({})},jb.prototype.update=function(t){this.attr(Ky({},this.attributes,t)),this.render()},jb.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new Nb({style:t}))})},jb.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},jb.prototype.initShape=function(){this.backgroundShape=new F.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new F.Group({name:"decoration-group"}),this.textShape=new F.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},jb.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&os(n)&&"clip"===e&&(this.clipRect=new F.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},jb.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;os(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},jb.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},jb.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},jb.defaultOptions={type:jb.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var Cb,ra=_(_({},Iy),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),Fb={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},Ib={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function Rb(t){return Cb.call(this,I({},Rb.defaultOptions,t))||this}i(Rb,Cb=na),Rb.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,D(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=Ms({},this.checked?Fb.selected:Fb.default,r),r=Ms({},Ib,i),t=(this.checkboxBoxShape=D(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(S,e).node(),D(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(S,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;D(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(S,n)},Rb.defaultOptions={type:Rb.tag="checkbox",style:{x:0,y:0,label:_({text:""},ra),spacing:4,checked:!1}};var Bb="gui-poptip",Db="gui-poptip-arrow",zb="gui-poptip-text",Wb=((u={})[".".concat(Bb)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},u[".".concat(zb)]={"text-align":"center"},u[".".concat(Bb,"[data-position='top']")]={transform:"translate(-50%, -100%)"},u[".".concat(Bb,"[data-position='left']")]={transform:"translate(-100%, -50%)"},u[".".concat(Bb,"[data-position='right']")]={transform:"translate(0, -50%)"},u[".".concat(Bb,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},u[".".concat(Bb,"[data-position='top-left']")]={transform:"translate(0,-100%)"},u[".".concat(Bb,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},u[".".concat(Bb,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},u[".".concat(Bb,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},u[".".concat(Bb,"[data-position='right-top']")]={transform:"translate(0, 0)"},u[".".concat(Bb,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},u[".".concat(Bb,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},u[".".concat(Bb,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},u[".".concat(Db)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},u[".".concat(Bb,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},u["[data-position='top'] .".concat(Db)]={bottom:"-2px"},u[".".concat(Bb,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},u["[data-position='left'] .".concat(Db)]={right:"-2px"},u[".".concat(Bb,"[data-position='right']")]={transform:"translate(5px, -50%)"},u["[data-position='right'] .".concat(Db)]={left:"-2px"},u[".".concat(Bb,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},u["[data-position='bottom'] .".concat(Db)]={top:"-2px"},u[".".concat(Bb,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},u["[data-position='top-left'] .".concat(Db)]={left:"10px",bottom:"-2px"},u[".".concat(Bb,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},u["[data-position='top-right'] .".concat(Db)]={right:"10px",bottom:"-2px"},u[".".concat(Bb,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},u["[data-position='left-top'] .".concat(Db)]={right:"-2px",top:"8px"},u[".".concat(Bb,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},u["[data-position='left-bottom'] .".concat(Db)]={right:"-2px",bottom:"8px"},u[".".concat(Bb,"[data-position='right-top']")]={transform:"translate(5px, 0)"},u["[data-position='right-top'] .".concat(Db)]={left:"-2px",top:"8px"},u[".".concat(Bb,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},u["[data-position='right-bottom'] .".concat(Db)]={left:"-2px",bottom:"8px"},u[".".concat(Bb,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},u["[data-position='bottom-left'] .".concat(Db)]={top:"-2px",left:"8px"},u[".".concat(Bb,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},u["[data-position='bottom-right'] .".concat(Db)]={top:"-2px",right:"8px"},u),Hb=void 0;var Vb;function qb(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function Gb(t){var n,r;return n=qb,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(Hb,t)}(t)}function Yb(t){t=Vb.call(this,I({style:{id:"gui-poptip"}},Yb.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(Yb,Vb=na),Object.defineProperty(Yb.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),Yb.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},Yb.prototype.update=function(t){this.attr(I({},this.style,t)),this.render(this.attributes,this)},Yb.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=K(i,["html","target"]),n=Ms({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=R(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},Yb.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=R(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},Yb.prototype.clear=function(){this.container.innerHTML=""},Yb.prototype.destroy=function(){var t,e=this;re([],R(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},Yb.prototype.showTip=function(t,e,n){var r,i=Ps(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(zb)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},Yb.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},Yb.prototype.getContainer=function(){return this.container},Yb.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(Bb).concat(t?" ".concat(t):"")},Yb.prototype.initShape=function(){var t=this,e=this.style.id;this.container=Gb(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},Yb.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(Db,'"></span>'));t.innerHTML=n,is(r)?t.innerHTML+=r:r&&gs(r)&&t.appendChild(r),e&&(t.getElementsByClassName(zb)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},Yb.prototype.applyStyles=function(){var t,e=Ky({},Wb,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=R(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=R(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},Yb.prototype.setOffsetPosition=function(t,e,n){var n=R(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},Yb.tag="poptip",Yb.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:Wb,template:'<div class="'.concat(zb,'"></div>')}};function Ub(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return Kp()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=x1(l,t),t=x1(t,i),i=x1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),Kp()(s)}const Xb=z1(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=K(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=Q(e,"background"),h=f["padding"],f=K(f,["padding"]),d=Q(e,"connector"),{points:p=[]}=d,d=K(d,["points"]),i=[[+i,+a],[+n,+r]],a=J(t).maybeAppend("text","text").call(B,e).node(),n=Ub(J(t).maybeAppend("background","rect").style("zIndex",-1).call(B,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(B,o?f:{}).node(),i,p,u),r=l&&new E({id:"startMarker",style:Q(e,"startMarker")}),a=c&&new E({id:"endMarker",style:Q(e,"endMarker")});J(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(B,s?d:{})}),$b=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return J(new Xb).style("x",i).style("y",o).call(B,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(B,a).call(B,l).node()}};$b.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Zb=z1(t=>{var e=K(t.attributes,["class","x","y"]);const n=Q(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(J(t).maybeAppend("marker",()=>new E({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());J(t).maybeAppend("text","text").style("x",i).style("y",a).call(B,e)}),Kb=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return J(new Zb).call(B,r).style("x",e).style("y",a).call(B,o).call(B,s).node()}},Qb=(Kb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},z1(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;J(t).maybeAppend("connect-path",()=>new F.Path({})).style("d",n).call(B,i),J(t).maybeAppend("area-path",()=>new F.Path({})).style("d",e).call(B,r)}));const Jb=t=>{const{curve:u,gradient:f=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connectNulls:d=!1}=t,p=K(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=L1(n,r,i,a),r=n["fill"],i=K(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,s=(e=e,iu(s=c)?(e=e["transform"],`translate(${(s=s.getCenter())[0]}, ${s[1]}) `+(e||"")):""),e=f&&n?P1(n,r,o,f):a;const l=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:e,fill:e}),s&&{transform:s}),p);var[n,r]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,h),o=Q(p,"connect"),a=!!r.length,i=t=>J(new F.Path({})).style("d",t).call(B,l).node();return iu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=Qp().curve(Jp),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,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 n1(a())},delete t.lineX0,t.lineEndAngle=function(){return n1(o())},delete t.lineX1,t.lineInnerRadius=function(){return n1(s())},delete t.lineY0,t.lineOuterRadius=function(){return n1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(e1(t)):e()._curve},t.angle((t,e)=>k1(b1(r[e],n))).outerRadius((t,e)=>x1(r[e],n)).innerRadius((t,e)=>x1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!a||d&&!Object.keys(o).length?i(e(n)):a&&!d?i(e(t)):J(new Qb).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},o),p)).style("areaPath",e(t)).style("connectPath",r.map(e).join("")).node()):(s=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return Qp().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(h)).curve(u)(n)},!a||d&&!Object.keys(o).length?i(s(n)):a&&!d?i(s(t)):J(new Qb).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},o),p)).style("areaPath",s(t)).style("connectPath",r.map(s).join("")).node())}},t2=(Jb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=iu(n)?d1:Xp;return Jb(Object.assign({curve:i},a))(t,e,n,r)}),e2=(t2.props=Object.assign({},Jb.props),t=>{const{alpha:a=.5}=t,o=K(t,["alpha"]);return(t,e,n,r)=>{var i=iu(n)?f1:c1;return Jb(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),n2=(e2.props=Object.assign({},Jb.props),i=>(t,e,n,r)=>Jb(Object.assign({curve:y1},i))(t,e,n,r)),r2=(n2.props=Object.assign({},Jb.props),t=>{const l=t["arrowSize"],c=K(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=L1(r,a,o,s),a=r["stroke"],o=K(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=_p();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=E1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),J(new F.Path).call(B,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(B,c).node()}}),i2=(r2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=_p();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),J(new F.Path).call(B,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(B,s).node()}});i2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const a2=t=>{const{cornerRatio:u=1/3}=t,f=K(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=L1(r,o,s,l),o=r["stroke"],s=K(r,["stroke"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=_p(),iu(o)?(i=x1(t,c=o.getCenter()),i=(x1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),A1(a,t,e,c,i)):ru(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return J(new F.Path).call(B,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(B,f).node()}},o2=(a2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=_p();return t.moveTo(e[0],e[1]),iu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):A1(t,e,i,O1(e,i),x1(e,i)/2),J(new F.Path).call(B,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(B,s).node()}}),s2=(o2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return J(new F.Image).call(B,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(B,u).node()}});s2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const l2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=L1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),r=function(i,t){const a=_p();if(iu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>x1(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?A1(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return J(new F.Path).call(B,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(B,l).node()}};l2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const c2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=L1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,a]=t,o=_p();return iu(e)?(n=x1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),A1(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),A1(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return J(new F.Path).call(B,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(B,l).node()}};c2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const u2=t=>{const g=K(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=L1(r,e,f,h),{fill:e,stroke:f}=r,h=K(r,["fill","stroke"]),y=(r=t,t=n,n=_p(),iu(t)?([i,a]=t=t.getCenter(),o=w1(b1(r[0],t)),s=w1(b1(r[1],t)),y=x1(t,r[2]),l=x1(t,r[3]),c=x1(t,r[8]),u=x1(t,r[10]),t=x1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,y,o,s),n.arc(i,a,y,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return J(new F.Path).call(B,h).style("d",y.toString()).style("stroke",f).style("fill",d||e).style("transform",p).call(B,g).node()}};u2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const f2=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=K(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,iu(t=n)?(t=t.getCenter(),Gp()({startAngle:0,endAngle:2*Math.PI,outerRadius:x1(a[0],t),innerRadius:x1(a[1],t)})):Kp().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,iu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return J(new F.Path({})).call(B,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(B,s).node()}};function h2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}f2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const d2=z1(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=K(e,["points","class","endMarker","direction"]),i=Q(e,"endMarker"),n=(n=n,Kp().x(t=>t[0]).y(t=>t[1])(n));J(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new E({className:"marker",style:Object.assign(Object.assign({},i),{symbol:h2})}):null).call(B,e)});const p2=t=>{const{offset:s=0,connectLength1:l}=t,c=K(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=L1(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=l}=r,i=K(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(ru(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,o);return J(new d2).call(B,i).style("points",n).style("stroke",r||a).style("transform",e).call(B,c).node()}};function y2(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=Ku(a.x,c),i=Ku(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function g2(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=N1(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=v2(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?m2(s,h,n):O1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function m2(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function v2(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function b2(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:f=.5,offset:h=0}=e,d=N1(n,t,[i,a]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),y=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?f:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+h]})();const g=0<Math.sin(y)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=m2(p,y,t),[e,r]=m2(p,y,e),i=l?g*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:l,connectorPoints:m,dx:l?+u*g:0},v=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},v(e,"x0","y0")),v(t)),(e=r,v=0<g||au(n),t=v2(y,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function x2(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(au(r)?g2:cu(r)?b2:y2)(t,e,n,r)}p2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var w2=Object.freeze({__proto__:null,top:x2,bottom:x2,right:x2,left:x2,topLeft:x2,topRight:x2,bottomLeft:x2,bottomRight:x2,inside:x2,outside:x2,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=Uc(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=w1(b1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function k2(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:cu(a)?"inside":ru(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=w2[i.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},a),e(i,t,r,n));throw new Error("Unknown position: "+i)}const M2=t=>(t,e,n,r)=>{var i=e["text"],a=K(e,["text","x","y"]),t=k2(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=K(t,["rotate","transform"]);return J(new Xb).call(B,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(B,a).node()},O2=(M2.props={},t=>{const s=t["colorAttribute"],l=K(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=K(L1(r,i,a,o),["stroke"]),{d:i,color:a}=e;return J(new F.Path).call(B,r).style("d",i).style(s,a).call(B,l).node()}}),_2=(O2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>O2(Object.assign({colorAttribute:"fill"},t))),S2=(_2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>O2(Object.assign({fill:"none",colorAttribute:"stroke"},t))),E2=(S2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=K(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),A2=(E2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),P2={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},T2="#416180",N2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:A2[100],enter:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:T2,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:T2,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:T2,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:T2,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:T2,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:T2,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:T2,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:T2,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:T2,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:A2[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:A2[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:A2[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:A2[25],tickLineLineWidth:1,tickLineLength:4,labelFill:A2[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:A2[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:A2[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:A2[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:A2[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:A2[100],navButtonFillOpacity:1,navPageNumFill:A2[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:A2[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:A2[6],handleMarkerStroke:A2[25],handleMarkerLineWidth:1,handleLabelFill:A2[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:A2[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:T2,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:P2[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:T2,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:A2[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:A2[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:A2[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:A2[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},L2=(N2.props={},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),j2={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},C2="#F9FBFD",F2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:j2[100],enter:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:j2[65],fontSize:12,connectorStroke:C2,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:C2,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:C2,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:C2,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:C2,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:C2,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:C2,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:C2,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:C2,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:j2[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:j2[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:j2[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:j2[25],tickLineLineWidth:1,tickLineLength:4,labelFill:j2[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:j2[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:j2[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:j2[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:j2[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:j2[100],navButtonFillOpacity:1,navPageNumFill:j2[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:j2[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:j2[6],handleMarkerStroke:j2[25],handleMarkerLineWidth:1,handleLabelFill:j2[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:j2[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:C2,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:L2[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:C2,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:j2[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:j2[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:j2[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:j2[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function I2(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}F2.props={};var R2,B2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D2(t){var e;if(e=B2.exec(t))return new z2({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]});throw new Error("invalid format: "+t)}function z2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function W2(t,e){var n,e=I2(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}D2.prototype=z2.prototype,z2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var H2={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>W2(100*t,e),r:W2,s:function(t,e){var n,r,i=I2(t,e);return i?(n=i[0],(i=(i=i[1])-(R2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+I2(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function V2(t){return t}var q2,G2,Y2=Array.prototype.map,U2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function X2(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?V2:(s=Y2.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?V2:(e=Y2.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=D2(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,y=t.precision,g=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):H2[m]||(void 0===y&&(y=12),g=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=H2[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?U2[8+R2/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return O(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=D2(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=I2(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=U2[8+e/3];return function(t){return n(r*t)+i}}}}function $2(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function Z2(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Sc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new F0({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return lu(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new F0({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new F0({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return iu(s)||ru(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:ru(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,text:u(t,e,n)}}),au(s)&&"arcY"===o?i.map(({value:t,text:e})=>({value:1-t,text:e})):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),text:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n)}})}function K2(t,e,n,r,i){var a;return iu(a=n)&&ru(a)||su(n)?[]:t.map(t=>{t=function(t,e,n,r,i){var[r,a]=r,[i,o]=i,[n,s]=$2(n);let l,c,u,f;return"bottom"===e||"top"===e?(l=c=r+(i-r)*t,u=a,f="bottom"===e?a-s:a+s):(u=f=a+(o-a)*t,l=r,c="left"===e?r+n:r-n),[[l,u],[c,f]]}(t.value,e,n,r,i);return{points:iu(n)?[t[0]]:t}})}ia=X2({thousands:",",grouping:[3],currency:["$",""]}),q2=ia.format,ia.formatPrefix;const Q2=t=>{const{position:u,labelFormatter:f=t=>""+t,tickFilter:h,tickCount:d,tickMethod:p}=t,y=K(t,["position","labelFormatter","tickFilter","tickCount","tickMethod"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=Z2(t,e,d,f,h,p,u,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),{grid:c=!1}=y,c=c?function(t,e,n,r,i,a,o){const[s,l]=e;var[e,o]=$2(o),e=Math.min(e,o)/2;const c=i*e,u=a*e;return t.map(({value:t})=>{var t=(r-n)*t+n,e=Math.cos(t*Math.PI/180),t=Math.sin(t*Math.PI/180);return{points:[[s+c*e,l+c*t],[s+u*e,l+u*t]]}})}(a,i,e,o,s,l,n):[];return new Hm({style:I({},{center:i,radius:t,startAngle:e,endAngle:o,ticks:a,verticalFactor:"arc"===u?1:-1,axisLine:{style:Object.assign({lineWidth:0,strokeOpacity:0},Q(y,"line"))},grid:{items:c,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.1,lineDash:[0,0]},Q(y,"grid"))},tickLine:{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},Q(y,"tick"))},label:{align:"arcInner"===u?"radial":"tangential",tickPadding:2,style:Q(y,"label")}})})}},J2=v=>{const{position:b,title:x,labelFormatter:w=t=>""+t,direction:k="left",tickCount:M,tickFilter:O,tickMethod:_,titleAnchor:S}=v,E=K(v,["position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod","titleAnchor"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{startPos:a,endPos:o,labelOffset:s,titlePosition:l,titlePadding:c,titleRotate:u,verticalFactor:f,titleOffsetY:h,labelAlign:d,axisLine:p,label:y=void 0===v.label||v.label,tickLine:g=void 0===v.tickLine||v.tickLine}=function(t,e,n){var{x:n,y:r,width:i,height:a}=n;return"bottom"===t?{startPos:[n,r],endPos:[n+i,r],labelOffset:8,titlePosition:"end",titlePadding:2,titleRotate:0,verticalFactor:1}:"left"===t||"centerHorizontal"===t?{startPos:[n+i,r],endPos:[n+i,r+a],titlePosition:"center",titlePadding:6,titleRotate:-90,labelAlign:"end",labelOffset:4,verticalFactor:-1}:"right"===t?{startPos:[n,r],endPos:[n,r+a],titlePosition:"center",titlePadding:16,titleRotate:-90,labelAlign:"start",labelOffset:4,verticalFactor:1}:"arcY"===t?{startPos:[n,r],endPos:[n+i,r+a],titlePosition:"start",titlePadding:4,titleOffsetY:-5,titleRotate:0,labelOffset:"left"===e?4:"right"===e?-4:0,verticalFactor:-1,labelAlign:"center"===e?"center":"right"===e?"start":void 0,axisLine:!1}:{startPos:[n,r+a],endPos:[n+i,r+a],titlePosition:"end",titlePadding:2,titleRotate:0,labelOffset:4,verticalFactor:-1}}(b,k,i),e=Z2(t,e,M,w,O,_,b,n),l="arcY"===b||t.getTicks?l:"center",[,m]=n.getCenter(),{grid:t=!!t.getTicks}=E,t=t?K2(e,b,n,a,o):[],n=Q(E,"line");return new Lm({style:I(Object.assign({startPos:a,endPos:o,verticalFactor:f,ticks:e,label:y?Object.assign(Object.assign({tickPadding:s,autoHide:!1,autoRotate:!0},Q(E,"label")),{style:Object.assign(Object.assign({},d&&{textAlign:d}),Q(E,"label"))}):null,axisLine:p||Object.keys(n).length?{stroke:"#BFBFBF",style:n}:null,grid:Object.assign({items:t,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.05,lineDash:[0,0]},Q(E,"grid"))},"arcY"===b&&{type:"circle",center:[i.x,m+i.y],closed:!0}),tickLine:g?{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},Q(E,"tick"))}:null},x&&{title:{content:(a=x,Array.isArray(a)?a.join(", "):""+a),titleAnchor:S||l,style:Object.assign({fontWeight:"bold",fillOpacity:1,dy:h,textAnchor:l},Q(E,"title")),titlePadding:c,rotate:u}}))})}},tx=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?q2(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?Q2:J2)(a)(t,e,n,r)},ex=(tx.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>tx(t)),nx=(ex.props=Object.assign(Object.assign({},tx.props),{defaultPosition:"bottom"}),t=>tx(t)),rx=(nx.props=Object.assign(Object.assign({},tx.props),{defaultPosition:"left"}),t=>{const{position:c,labelFormatter:u=t=>""+t,dx:f=0,dy:h=0,title:d,cols:p=void 0,autoWrap:y=!1}=t,g=K(t,["position","labelFormatter","dx","dy","title","cols","autoWrap"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,name:u(t),color:e.map(t)})),l=y&&p?o/p:void 0,t=I({},Object.assign(Object.assign({items:t,x:i+f,y:a+h,orient:["right","left","arcCenter"].includes(c)?"vertical":"horizontal",maxWidth:o,maxHeight:s,autoWrap:y,maxItemWidth:l,itemWidth:l,spacing:[8,0],itemName:{style:{fontSize:12,fillOpacity:1,fill:"#000",fontWeight:"lighter",active:{fillOpacity:.8},inactive:{fill:"#d8d8d8"},unchecked:{fill:"#d8d8d8"}}}},d&&{title:{content:Array.isArray(d)?d[0]:d,style:{fontSize:12,fontWeight:"bold",fillOpacity:1}}}),{itemMarker:{size:8,symbol:"circle",style:{fillOpacity:1,inactive:{fillOpacity:.2},unchecked:{fill:"#d8d8d8",stroke:"#d8d8d8"}}},itemBackgroundStyle:{fill:"transparent"}}),Object.assign({},g));return new Wv({className:"category-legend",style:t})}}),ix=(rx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const c=t["title"];return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,o=(null==(o=e.getTicks)?void 0:o.call(e))||[],[s,l]=t;return new sb({style:Object.assign(Object.assign({x:i,y:a,rail:{length:120,size:12,ticks:o},min:s,max:l,indicator:null,handle:null},c&&{title:{content:Array.isArray(c)?c[0]:c,style:{fontSize:12}}}),{color:t.map(t=>e.map(t))})})}});function ax(t,e,n){return t.querySelector(e)?J(t).select(e):J(t).append(n)}ix.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};G2={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=ax(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(B,r||{}).node().getLocalBounds();ax(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===a||void 0===a?void 0:a.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},a))})}};const ox=class extends F.CustomElement{constructor(t){super(t),this.descriptor=G2}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(I({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},sx=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new ox({style:I({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:l})})}};sx.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class lx{constructor(t){this.$value=t}static of(t){return new lx(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function cx(t,e,n){return lx.of({}).call(ux,t).call(ux,e).call(ux,n).value()}function ux(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function fx(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const hx=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],dx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ru(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,cx(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},px=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ru(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,cx(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},yx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ru(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,cx(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},gx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ru(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,cx(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},mx=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],cx(i,n,l))},vx=(mx.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],cx(i,n,l))});function bx(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function xx(t,e){var[n,r,i,t]=bx(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(g,j,y){"use strict";const N="main-layer",rt="label-layer",it="element",G="view",at="plot",ot="component",st="label",lt="area";var C="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function F(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,f=e[n],h=r,d=i;for(R(e,r,n),0<a(e[i],f)&&R(e,r,i);h<d;){for(R(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?R(e,r,d):R(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||I)}function R(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function I(t,e){return t<e?-1:e<t?1:0}function D(t,e){z(t,0,t.children.length,e,t)}function z(t,e,n,r,i){(i=i||X(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];W(i,t.leaf?r(o):o)}return i}function W(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function H(t,e){return t.minX-e.minX}function V(t,e){return t.minY-e.minY}function q(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Y(t){return t.maxX-t.minX+(t.maxY-t.minY)}function $(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function U(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function X(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(F(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(U(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;U(t,s)&&(e.leaf?n.push(o):$(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(U(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(U(t,a)){if(e.leaf||$(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=X([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!$(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)D(i=X(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=X([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));K(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);K(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}D(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=q(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var f,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),W(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=X(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,D(n,this.toBBox),D(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=X([t,e]),this.data.height=t.height+1,this.data.leaf=!1,D(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=z(t,0,c,this.toBBox),f=z(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=q(u)+q(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:H,i=t.leaf?this.compareMinY:V;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=z(t,0,e,i),o=z(t,n-e,n,i),s=Y(a)+Y(o),l=e;l<n-e;l++){var c=t.children[l];W(a,t.leaf?i(c):c),s+=Y(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];W(o,t.leaf?i(f):f),s+=Y(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)W(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():D(t[e],this.toBBox)};var Z=1e-6,J="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new J(9);return J!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ut=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function ft(){var t=new J(16);return J!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function yt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*g-f*p,O=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,T=m*A-v*E+b*S+x*_-w*O+k*M;return T?(t[0]=(s*A-l*E+c*S)*(T=1/T),t[1]=(i*E-r*A-a*S)*T,t[2]=(g*k-y*w+e*x)*T,t[3]=(h*w-f*k-d*x)*T,t[4]=(l*_-o*A-c*O)*T,t[5]=(n*A-i*_+a*O)*T,t[6]=(y*b-p*k-e*v)*T,t[7]=(u*k-h*b+d*v)*T,t[8]=(o*E-s*_+c*M)*T,t[9]=(r*_-n*E-a*M)*T,t[10]=(p*w-g*b+e*m)*T,t[11]=(f*b-u*w-d*m)*T,t[12]=(s*O-o*S-l*M)*T,t[13]=(n*S-r*O+i*M)*T,t[14]=(g*v-p*x-y*m)*T,t[15]=(u*x-f*v+h*m)*T,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function vt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*g,t[1]=v*i+b*l+x*h+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*g,t[5]=v*i+b*l+x*h+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*g,t[9]=v*i+b*l+x*h+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*g,t[13]=v*i+b*l+x*h+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function Mt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Ot(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Et(t,e){var n=new J(3),r=(St(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],y=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(m*g+h*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Tt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Pt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Lt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var Nt=Lt;function Ct(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function jt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Bt=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new J(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new J(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k,M,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<Z?null:(O*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,k=_*r*i-O*S,M=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+g*r,t[3]=l*n+h*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+g*x,t[7]=l*v+h*b+y*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+f*k+g*M,t[11]=l*w+h*k+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:kt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Mt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:Ot,fromQuat2:function(t,e){var n=new J(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),Ot(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:At,fromQuat:Tt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Pt,perspective:Pt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Lt,ortho:Nt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Ct,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:jt,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],M=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],T=e[12],P=e[13],L=e[14],e=e[15];return Math.abs(n-m)<=Z*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=Z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=Z*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=Z*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=Z*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=Z*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=Z*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=Z*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=Z*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=Z*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-L)<=Z*Math.max(1,Math.abs(y),Math.abs(L))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:jt});function m(){var t=new J(3);return J!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ft(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function b(t,e,n){var r=new J(3);return r[0]=t,r[1]=e,r[2]=n,r}function Rt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function It(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Dt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function zt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Wt(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Gt(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Ht(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Vt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function qt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Yt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function $t(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var Ut=zt,Xt=Ft;function Kt(){var t=new J(4);return J!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Jt(){var t=new J(4);return J!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Qt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function te(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function ee(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function ne(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}m(),Kt();var re=function(t,e,n,r){var i=new J(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function se(t,e){var n=new J(2);return n[0]=t,n[1]=e,n}function le(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ce(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ue(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function fe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function he(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function de(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}m(),b(1,0,0),b(0,1,0),Jt(),Jt(),ct();var pe=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function ge(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new J(2),J!=Float32Array&&(e[0]=0,e[1]=0);var ye=function(t,e){return(ye=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function me(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ye(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Q(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ve(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function be(r,i){var a,o,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},c={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function t(n){return function(t){var e=[n,t];if(a)throw new TypeError("Generator is already executing.");for(;l=c&&e[c=0]?0:l;)try{if(a=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,o=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3]))l.label=e[1];else if(6===e[0]&&l.label<s[1])l.label=s[1],s=e;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(e)}}e=i.call(r,l)}catch(t){e=[6,t],o=0}finally{a=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}}function xe(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function k(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function we(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var ke={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var Me={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Oe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return Me[e]===t.length-1&&"achlmqstvz".includes(e)})}function _e(t){return Oe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Se(t){return _e(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Ee(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Me[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,Me[n]))),Me[n]););}function Ae(t){return 48<=t&&t<=57}function Te(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Pe(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=Me[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,Te(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Ae(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&Ae(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Ae(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;Ae(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&Ae(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Ae(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Te(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,Te(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Ee(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Le=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Ne(t){var o,s,l,c;return _e(t)?ge(t):(t=function(t){if(Oe(t))return ge(t);var e=new Le(t);for(Te(e);e.index<e.max&&!e.err.length;)Pe(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function Ce(t){if(Se(t))return ge(t);for(var e,n,r,i,a,o,s,l=Ne(t),c=v({},ke),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function je(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Be(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Fe(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Re(t,e,n,r,i){var a=Fe([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=Be([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Ie(t,e,n,r){var t=[t,e],e=[n,r],i=Be(t,e,.5),e=Be(e,i,.5),a=Be(i,e,.5),o=Be(e,a,.5),s=Be(a,o,.5),t=Re(t[0],t[1],i[0],i[1],a[0]).point,i=Re(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function De(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(y=je(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=je(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*y*y-m*g*g)/(p*y*y+m*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),g=(Math.abs(p)>f&&(m=w,y=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,y,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),y=Math.tan(p/4),o=4/3*r*y,m=4/3*i*y,v=[e,n],b=[e+o*f,n-m*g],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var k=[],M=0,O=(d=b.concat(x,w,d)).length;M<O;M+=1)k[M]=M%2?je(d[M-1],d[M],h).y:je(d[M],d[M+1],h).x;return k}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Ie(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(Ie(h,d,p,g))}return t}function ze(t,e){var n;if(void 0===e&&(e=!1),Se(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ge(t),e?[n,[]]:n;for(var r,i=Ce(t),a=v({},ke),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=De(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function We(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var k,M,O,_,S,E,A,T,P,L,N=0;N<=d;N+=1)k=t,M=e,O=n,_=r,S=i,E=a,A=o,T=s,L=void 0,L=1-(P=N/d),g=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*P*O+3*L*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(L,3)*M+3*Math.pow(L,2)*P*_+3*L*Math.pow(P,2)*E+Math.pow(P,3)*T}).x,y=k.y,f&&w.push({x:g,y:y}),h&&(m+=Fe(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[g,y,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Ge(t){return(c=l=s=0)<=ze(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function He(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?We(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=Be(n,i,r),i=Be(i,a,r),a=Be(a,e,r),o=Be(n,i,r),i=Be(i,a,r),r=Be(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Ve=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},qe=function(t){return"function"==typeof t},x=function(t){return null==t},Ye={}.toString,$e=function(t,e){return Ye.call(t)==="[object "+e+"]"},Ue=function(t){return Array.isArray?Array.isArray(t):$e(t,"Array")},Xe=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function Ke(t,e){if(t)if(Ue(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Xe(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Ze=function(t){return"object"==typeof t&&null!==t},Je=function(t){if(!Ze(t)||!$e(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Qe=function(t){if(Ue(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},tn=function(t){if(Ue(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},en=function(t){return $e(t,"String")},nn=function(t,e,n){return t<e?e:n<t?n:t},rn=function(t){return $e(t,"Number")};var an=function(t,e){return(t%e+e)%e},on=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return Ke(n,function(t,e){qe(n)&&"prototype"===e||r.push(t)}),r};var sn=function(t){return $e(t,"Boolean")},ln=function(t){return void 0===t},cn=function(t){return t instanceof Element||t instanceof HTMLDocument};function un(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function fn(t,e,n,r){return e&&un(t,e),n&&un(t,n),r&&un(t,r),t}function hn(t){if("object"!=typeof t||null===t)return t;if(Ue(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=hn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=hn(t[i]):e[i]=t[i];return e}var dn=hn;function pn(a,o){var s;if(qe(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var gn=5;function yn(t,e){if(t===e)return!0;if(t&&e&&!en(t)&&!en(e)){if(Ve(t)||Ve(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=yn(t[r],e[r]));r++);return n}if(Ze(t)||Ze(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=yn(t[i[r]],e[i[r]]));r++);return n}}return!1}function mn(e,t){var n;return null!==e&&Je(e)?(n={},Ke(t,function(t){kn.call(e,t)&&(n[t]=e[t])}),n):{}}function vn(){}var bn=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||gn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Je(o)?(Je(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ue(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},xn=yn,wn=function(t,e,n){for(var r=0,i=en(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},kn=Object.prototype.hasOwnProperty;function Mn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function On(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function _n(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sn=/^#([0-9a-f]{3,8})$/,En=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),An=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),Tn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),Pn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Ln=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Nn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Cn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function jn(){return this.rgb().formatHex()}function Bn(){return this.rgb().formatRgb()}function Fn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Sn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Rn(e):3===n?new Dn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?In(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?In(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=En.exec(t))?new Dn(e[1],e[2],e[3],1):(e=An.exec(t))?new Dn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Tn.exec(t))?In(e[1],e[2],e[3],e[4]):(e=Pn.exec(t))?In(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ln.exec(t))?Hn(e[1],e[2]/100,e[3]/100,1):(e=Nn.exec(t))?Hn(e[1],e[2]/100,e[3]/100,e[4]):Cn.hasOwnProperty(t)?Rn(Cn[t]):"transparent"===t?new Dn(NaN,NaN,NaN,0):null}function Rn(t){return new Dn(t>>16&255,t>>8&255,255&t,1)}function In(t,e,n,r){return new Dn(t=r<=0?e=n=NaN:t,e,n,r)}function Dn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function zn(){return"#"+Gn(this.r)+Gn(this.g)+Gn(this.b)}function Wn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Gn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Hn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new qn(t,e,n,r)}function Vn(t){var e,n,r,i,a,o,s,l;return t instanceof qn?new qn(t.h,t.s,t.l,t.opacity):(t=t instanceof _n?t:Fn(t))?t instanceof qn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new qn(o,s,l,t.opacity)):new qn}function qn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Yn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function $n(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Un(t,e){return Math.abs(t-e)<.001}function Xn(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Kn(t){return(t+2*Math.PI)%(2*Math.PI)}Mn(_n,Fn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:jn,formatHex:jn,formatHsl:function(){return Vn(this).formatHsl()},formatRgb:Bn,toString:Bn}),Mn(Dn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof _n?i:Fn(i))?new Dn((i=i.rgb()).r,i.g,i.b,i.opacity):new Dn:new Dn(t,e,n,null==r?1:r);var i},On(_n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Dn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Dn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zn,formatHex:zn,formatRgb:Wn,toString:Wn})),Mn(qn,function(t,e,n,r){return 1===arguments.length?Vn(t):new qn(t,e,n,null==r?1:r)},On(_n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new qn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new Dn(Yn(240<=t?t-240:120+t,n,e),Yn(t,n,e),Yn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Zn={box:function(t,e,n,r){return Xn([t,n],[e,r])},length:$n,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?$n(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?$n(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(de(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Jn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=$n(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(f<1e-4);g++){var y=o-f,m=o+f,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=$n(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=$n(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Qn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function tr(t,e,n){n=t+n-2*e;return Un(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function er(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function nr(t,e,n,r,i,a,o){var s=Qn(t,n,i,o),l=Qn(e,r,a,o),c=Zn.pointAt(t,e,n,r,o),n=Zn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function rr(t,e,n,r,i,a,o){return 0===o?($n(t,e,n,r)+$n(n,r,i,a)+$n(t,e,i,a))/2:(e=(t=nr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),rr.apply(void 0,e)+rr.apply(void 0,n))}var ir={box:function(t,e,n,r,i,a){var o=tr(t,n,i)[0],s=tr(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Qn(t,n,i,o)),void 0!==s&&c.push(Qn(e,r,a,s)),Xn(l,c)},length:function(t,e,n,r,i,a){return rr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Jn([t,n,i],[e,r,a],o,s,Qn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return $n(t.x,t.y,o,s)},interpolationAt:Qn,pointAt:function(t,e,n,r,i,a,o){return{x:Qn(t,n,i,o),y:Qn(e,r,a,o)}},divide:nr,tangentAngle:function(t,e,n,r,i,a,o){t=er(t,n,i,o),n=er(e,r,a,o);return Kn(Math.atan2(n,t))}};function ar(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function or(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function sr(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Un(r,0)?Un(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Un(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function lr(t,e,n,r,i,a,o,s,l){var c=ar(t,n,i,o,l),u=ar(e,r,a,s,l),f=Zn.pointAt(t,e,n,r,l),n=Zn.pointAt(n,r,i,a,l),r=Zn.pointAt(i,a,o,s,l),i=Zn.pointAt(f.x,f.y,n.x,n.y,l),a=Zn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function cr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=$n(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=lr(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return cr.apply(void 0,e)+cr.apply(void 0,n)}var ur={extrema:sr,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=sr(t,n,i,o),f=sr(e,r,a,s),h=0;h<u.length;h++)l.push(ar(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(ar(e,r,a,s,f[d]));return Xn(l,c)},length:function(t,e,n,r,i,a,o,s){return cr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Jn([t,n,i,o],[e,r,a,s],l,c,ar,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return $n(t.x,t.y,l,c)},interpolationAt:ar,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:ar(t,n,i,o,l),y:ar(e,r,a,s,l)}},divide:lr,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=or(t,n,i,o,l),n=or(e,r,a,s,l);return Kn(Math.atan2(n,t))}};function fr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var hr=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);h+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+fr(d,n),y:e+fr(p,r)}};function dr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function pr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function gr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function yr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var mr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=dr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var k=pr(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:l,y:y,width:c-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=yr(s-t,l-e,-i),l=s[0],s=s[1],l=hr(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=gr(n,r,a):o<c&&(l=gr(n,r,o)),yr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return $n(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:dr(t,0,n,r,i,o),y:pr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return Kn(Math.atan2(i,s))}};function vr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=$n(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var br,xr,wr={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return Xn(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=$n(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=vr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Zn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Zn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=vr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function kr(){}function Mr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Or(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new Mr(n,r||t,i),r=xr?xr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function _r(t,e){0==--t._eventsCount?t._events=new kr:delete t._events[e]}function Sr(){this._events=new kr,this._eventsCount=0}r=e,br=Object.prototype.hasOwnProperty,xr="~",Object.create&&(kr.prototype=Object.create(null),(new kr).__proto__||(xr=!1)),Sr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)br.call(t,e)&&n.push(xr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Sr.prototype.listeners=function(t){var t=xr?xr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},Sr.prototype.listenerCount=function(t){t=xr?xr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Sr.prototype.emit=function(t,e,n,r,i,a){var o=xr?xr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},Sr.prototype.on=function(t,e,n){return Or(this,t,e,n,!1)},Sr.prototype.once=function(t,e,n){return Or(this,t,e,n,!0)},Sr.prototype.removeListener=function(t,e,n,r){t=xr?xr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||_r(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:_r(this,t)}}else _r(this,t);return this},Sr.prototype.removeAllListeners=function(t){return t?(t=xr?xr+t:t,this._events[t]&&_r(this,t)):(this._events=new kr,this._eventsCount=0),this},Sr.prototype.off=Sr.prototype.removeListener,Sr.prototype.addListener=Sr.prototype.on,Sr.prefixed=xr,r.exports=Sr.EventEmitter=Sr;var M,Er=e.exports,Ar=((n=c=c||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",function(){function y(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){Rt(this.center,t),Rt(this.halfExtents,e),Ut(this.min,this.center,this.halfExtents),Dt(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Dt(this.center,e,t),Wt(this.center,this.center,.5),Ut(this.halfExtents,e,t),Wt(this.halfExtents,this.halfExtents,.5),Rt(this.min,t),Rt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),k=Math.abs(d);It(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),It(r,p*t[0]+g*t[1]+y*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Ut(this.min,n,r),this.max=Dt(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new y,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Rt(m(),this.min):272===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):b(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Rt(m(),this.max):272===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):b(this.min[0],this.min[1],this.min[2])},y}()),Tr=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||b(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return Ht(t,this.normal)-this.distance},e.normalize=function(){var t=1/Xt(this.normal);Wt(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),Pr=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Tr)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];It(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,It(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,It(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,It(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,It(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,It(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Lr=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Nr=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}();function Cr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Cr.Cache||Map),l}(r=M=M||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",Cr.Cache=Map;var jr=Cr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Br(t){if(!t)throw new Error}function Fr(t,e){if(t===e)throw new Error}function Rr(t){return"function"==typeof t}var Ir={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Dr=Cr(function(t){var t=jr(t),e=Ir[t];return(null==e?void 0:e.alias)||t});var s,zr,Wr,Gr,Hr="Method not implemented.";function Vr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function qr(t,e,n){e&&Vr(t.prototype,e),n&&Vr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Yr(){return(Yr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function $r(t,e){t.prototype=Object.create(e.prototype),Ur(t.prototype.constructor=t,e)}function Ur(t,e){return(Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Xr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Kr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=s=s||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(n=zr=zr||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(r=Wr=Wr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo",(e=Gr=Gr||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo";function Jr(t){return t?"number"===t?s.kNumber:"percent"===t||"%"===t?s.kPercentage:(e=t,ai.find(function(t){return t.name===e}).unit_type):s.kUnknown;var e}function Qr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function ti(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var ei,ni,ri,ii,ai=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],r=((n=ei=ei||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(Wr.kNo,Gr.kNo,"")},e.isNumericValue=function(){return this.getType()>=ei.kUnitType&&this.getType()<=ei.kClampType},t}()),e=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}$r(t,n);var e=t.prototype;return e.getType=function(){return ei.kColorType},e.to=function(t){return this},t}(r),oi=((n=ni=ni||{})[n.Constant=0]="Constant",n[n.LinearGradient=1]="LinearGradient",n[n.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}$r(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return ei.kColorType},t}(r)),si=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}$r(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return ei.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(r);(n=ri=ri||{}).kAdd="+",n.kSubtract="-",n.kMultiply="*",n.kDivide="/",n.kMin="min",n.kMax="max",n.kClamp="clamp",n.kInvalid="",(n=ii=ii||{})[n.kLength=0]="kLength",n[n.kAngle=1]="kAngle",n[n.kTime=2]="kTime",n[n.kFrequency=3]="kFrequency",n[n.kResolution=4]="kResolution",n[n.kFlex=5]="kFlex",n[n.kPercent=6]="kPercent",n[n.kNumBaseTypes=7]="kNumBaseTypes";function li(t){return"number"==typeof t?new yi(t,s.kNumber):t}var ci=function(){function t(t,e){void 0===t&&(t=s.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=ii.kPercent,this.hasPercentHint=!1,this.exponents=new Array(ii.kNumBaseTypes).fill(0),t!==s.kNumber&&this.setExponent(function(t){switch(Fr(t,s.kNumber),t){case s.kEms:case s.kPixels:case s.kRems:return ii.kLength;case s.kMilliseconds:case s.kSeconds:return ii.kTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return ii.kAngle;case s.kPercentage:return ii.kPercent;default:return ii.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){Fr(t,ii.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(ii.kPercent)),this.setExponent(ii.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return Fr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return Fr(t,ii.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(ii.kPercent,1)},e.matchesBaseTypePercentage=function(t){return Fr(t,ii.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(ii.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(ii.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<ii.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==ii.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<ii.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),n=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}$r(d,n);var t=d.prototype;return t.getType=function(){return ei.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ui(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ui(e),i=(fi(ei.kSumType,r,this),di(r,ri.kAdd));return i||Mi.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=ui(e)).map(function(t){return t.negate()}),i=(fi(ei.kSumType,r,this),di(r,ri.kAdd));return i||Mi.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ui(e),i=(fi(ei.kProductType,r,this),pi(r));return i||Oi.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=ui(e)).map(function(t){return t.invert()}),i=(fi(ei.kProductType,r,this),pi(r));return i||Oi.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ui(e),i=(fi(ei.kMinType,r,this),di(r,ri.kMin));return i||wi.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ui(e),i=(fi(ei.kMaxType,r,this),di(r,ri.kMax));return i||ki.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=hi(e[0]))?(t="string"==typeof t?Jr(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!d.isValidUnit(Jr(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],l=Zr(o);!(c=l()).done;){var c=hi(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),Br(!!(o=Mi.create(s))),o;for(var u=[],f=0,h=e;f<h.length;f++)!function(){var t=h[f],r=Jr(t),t=(Br(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new yi(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Mi.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(ii.kLength);return e&&(t.length=e),(e=this.type_.exponent(ii.kAngle))&&(t.angle=e),(e=this.type_.exponent(ii.kTime))&&(t.time=e),(e=this.type_.exponent(ii.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(ii.kResolution))&&(t.resolution=e),(e=this.type_.exponent(ii.kFlex))&&(t.flex=e),(e=this.type_.exponent(ii.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case ii.kLength:return"length";case ii.kAngle:return"angle";case ii.kTime:return"time";case ii.kFrequency:return"frequency";case ii.kResolution:return"resolution";case ii.kFlex:return"flex";case ii.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===s.kNumber||t==s.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return vi.create(this)},t.invert=function(){return mi.create(this)},d}(r);function ui(t){return t.map(li)}function fi(t,e,n){Br(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function hi(t){return 0===Object.keys(t.units).length?new yi(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new yi(t.value,Number(Object.keys(t.units)[0])):null}function di(t,e){Br(!!t.length);var n=t[0]instanceof yi?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof yi?t[i]:null;if(!a||a.unit!==n.unit)return null;e===ri.kAdd?r+=a.value:e===ri.kMax?r=Math.max(r,a.value):e===ri.kMin&&(r=Math.min(r,a.value))}return new yi(r,n.unit)}function pi(t){Br(!!t.length);for(var e=s.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof yi?t[r]:null;if(!i)return null;if(i.unit!==s.kNumber){if(e!==s.kNumber)return null;e=i.unit}n*=i.value}return new yi(n,e)}function gi(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return zr.kUNumber;case s.kPercentage:return zr.kUPercent;case s.kPixels:return zr.kULength;case s.kMilliseconds:case s.kSeconds:return zr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return zr.kUAngle;default:return zr.kUOther}}(t)){case zr.kUNumber:return s.kNumber;case zr.kULength:return s.kPixels;case zr.kUPercent:return s.kPercentage;case zr.kUTime:return s.kSeconds;case zr.kUAngle:return s.kDegrees;default:return s.kUnknown}}var yi=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?s.kNumber:e)?Jr(e):e;return(n=r.call(this,new ci(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}$r(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=gi(this.unit))!==gi(t)||e===s.kUnknown?null:(e=Qr(this.unit)/Qr(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return ei.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==s.kNumber&&(r[t=this.unit,(e=gi(t))===s.kUnknown?t:e]=1),n.push({value:this.value*Qr(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===s.kNumber?0===this.value?null:new n(1/this.value,this.unit):mi.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=ti(this.unit);i=a<-999999||999999<a?(r=ti(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(Br(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(n),r=function(t){function e(){return t.apply(this,arguments)||this}return $r(e,t),e.prototype.isUnitValue=function(){return!1},e}(n),mi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}$r(e,n),e.create=function(t){return new e(t,ci.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return ei.kInvertType},t.equals=function(t){return t.getType()===ei.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==Gr.kNo&&(n+=t===Wr.kYes?"(":"calc("),n=this.value.buildCSSText(Wr.kYes,Gr.kNo,n+="1 / "),e===Gr.kNo&&(n+=")"),n},e}(r),vi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}$r(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return ei.kNegateType},t.equals=function(t){return t.getType()===ei.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==Gr.kNo&&(n+=t===Wr.kYes?"(":"calc("),n=this.value.buildCSSText(Wr.kYes,Gr.kNo,n+="-"),e===Gr.kNo&&(n+=")"),n},e}(r);function bi(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function xi(t){return Ti[t]||(Ti[t]=new si(t)),Ti[t]}var n=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}$r(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(r),wi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}$r(e,i),e.create=function(t){return new e(t,bi(t,ci.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return ei.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Zr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,a=Zr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Wr.kYes,Gr.kYes,n);return n+=")"},e}(n),ki=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}$r(e,i),e.create=function(t){return new e(t,bi(t,ci.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return ei.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Zr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,a=Zr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Wr.kYes,Gr.kYes,n);return n+=")"},e}(n),Mi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}$r(e,i),e.create=function(t){return new e(t,bi(t,ci.add))},e.numericTypeFromUnitMap=function(n){var r=new ci;return Object.keys(n).forEach(function(t){var e=n[t];r=ci.multiply(r,new ci(Number(t),e),!1),Br(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(Br(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return ci.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return ei.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(Yr({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==Gr.kNo&&(n+=t===Wr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Wr.kYes,Gr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===ei.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(Wr.kYes,Gr.kNo,n)}return e===Gr.kNo&&(n+=")"),n},e}(n),Oi=function(i){function a(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}$r(a,i),a.create=function(t){return new a(t,bi(t,ci.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){Fr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=a.prototype;return t.clone=function(){return new a(this.values,this.type_)},t.getType=function(){return ei.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==Gr.kNo&&(n+=t===Wr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Wr.kYes,Gr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===ei.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(Wr.kYes,Gr.kNo,n)}return e===Gr.kNo&&(n+=")"),n},a}(n),_i=new yi(0,"px"),Si=(new yi(1,"px"),new yi(0,"deg")),Ei=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}$r(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(e),Ai=new si("unset"),r=new si("initial"),n=new si("inherit"),Ti={"":Ai,unset:Ai,initial:r,inherit:n},Pi=new Ei(0,0,0,0,!0),Li=new Ei(0,0,0,0),Ni=Cr(function(t,e,n,r){return new Ei(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),Ci=Cr(function(t,e){return void 0===e&&(e=s.kNumber),new yi(t,e)},function(t,e){return""+t+(e=void 0===e?s.kNumber:e)}),ji=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Bi=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Fi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Ri=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Ii={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Di=Cr(function(t){t="angular"===t.type?Number(t.value):Ii[t.value]||0;return Ci(t,"deg")}),zi=Cr(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:Ci(n,i),cy:Ci(r,a)}}),Wi=Cr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Oo(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!x(c)&&!x(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:Ci(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new oi(ni.LinearGradient,{angle:n?Di(n):Si,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=zi(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?xi(n):Ci(n,f)),new oi(ni.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ji.exec(t);if(n)return r=(null==(r=n[2].match(Ri))?void 0:r.map(function(t){return t.split(":")}))||[],[new oi(ni.LinearGradient,{angle:Ci(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:Ci(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=Bi.exec(t);if(t)return t=(null==(t=t[4].match(Ri))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:Ci(50,"%"),cy:Ci(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:Ci(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!en(n))return[new oi(ni.RadialGradient,n)]}else if("p"===e){var r=t;if(r=Fi.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function Gi(t){return Xe(t)&&!x(t.r)&&!x(t.g)&&!x(t.b)}var Hi=Cr(function(t){var e;return Xe(e=t)&&e.image?Yr({repetition:"repeat"},t):"transparent"===(t=x(t)?"":t)?Li:Wi(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Fn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),Ni.apply(void 0,e))});function Vi(t,e){if(Gi(t)&&Gi(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(nn(e[n],0,255));return e[3]=nn(e[3],0,1),"rgba("+e.join(",")+")"}]}function qi(t,e){if(x(e))return Ci(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return Ci(Number(e),"px");if(0<="deg".search(t))return Ci(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return Ci(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Yi=Cr(function(t){return qi(new RegExp("px","g"),t)}),$i=(Cr(function(t){return qi(new RegExp("%","g"),t)}),Cr(function(t){return rn(t)||isFinite(Number(t))?Ci(Number(t),"px"):qi(new RegExp("px|%|em|rem","g"),t)})),Ui=Cr(function(t){return qi(new RegExp("deg|rad|grad|turn","g"),t)});function Xi(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=fo(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function Ki(t){return en(t)?t.split(" ").map(function(t){return $i(t)}):t.map(function(t){return $i(t.toString())})}function Zi(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Ar.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var Ji=function(t){return qi(/deg|rad|grad|turn|px|%/g,t)},Qi=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ta(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Qi.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Ji(t)||Hi(t)})}),n.lastIndex===t.length)return r}return[]}function ea(t){return t.toString()}var na=Cr(function(t){return"number"==typeof t?Ci(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Ci(Number(t)):Ci(0)});function ra(t,e){return[t,e,ea]}function ia(n,r){return function(t,e){return[t,e,function(t){return ea(nn(t,n,r))}]}}function aa(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Cr(function(t){return(en(t)?t.split(" "):t).map(na)});var oa=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=Ce(e)}catch(t){n=Ce(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=an(uo(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=Qo([1,0],p),f=Qo(p,u);Jo(p,u)<=-1&&(f=Math.PI);1<=Jo(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:qo(t,[c,e])?0:n,ry:qo(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&qo(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=$o((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=$o((p=e[s-1]).currentPoint,b),y=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(g=Ko(u,0),b=g.x,y=g.y,c=Ko(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=ir.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=ur.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=mr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=tn(n),d=tn(r),p=Qe(n),g=Qe(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint,b=void 0;v[0]===h?(b=Yo(m,e),h-=b.xExtra):v[0]===p&&(b=Yo(m,e),p+=b.xExtra),v[1]===d?(b=Yo(m,e),d-=b.yExtra):v[1]===g&&(b=Yo(m,e),g+=b.yExtra)}return{x:h,y:d,width:p-h,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},sa=Cr(oa);function la(t,e){t=(en(t)?sa:oa)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function ca(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=ze(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=ze(e.absolutePath,!1),e.curve=d),[h,d]),h=Ge((t=h.length!==d.length?function t(e,n,r){var i,e=He(e),n=He(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Ge(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):ge(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=Fe(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function ua(t,e){var n,r,i=en(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=wr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Zn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var fa=null;function ha(t){return function(e){var n=0;return t.map(function(t){return t===fa?e[n++]:t})}}function da(t){return t}var pa={matrix:["NNNNNN",[fa,fa,0,0,fa,fa,0,0,0,0,1,0,fa,fa,0,1],da],matrix3d:["NNNNNNNNNNNNNNNN",da],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ha([fa,fa,new yi(1)]),da],scalex:["N",ha([fa,new yi(1),new yi(1)]),ha([fa,new yi(1)])],scaley:["N",ha([new yi(1),fa,new yi(1)]),ha([new yi(1),fa])],scalez:["N",ha([new yi(1),new yi(1),fa])],scale3d:["NNN",da],skew:["Aa",null,da],skewx:["A",null,ha([fa,Si])],skewy:["A",null,ha([Si,fa])],translate:["Tt",ha([fa,fa,_i]),da],translatex:["T",ha([fa,_i,_i]),ha([fa,_i])],translatey:["T",ha([_i,fa,_i]),ha([_i,fa])],translatez:["L",ha([_i,_i,fa])],translate3d:["TTL",da]};function ga(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=pa[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Si:Ui(t)},N:na,T:$i,L:Yi}[h.toUpperCase()](f):{a:Si,n:c[0],t:_i}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function ya(t){switch(t.t){case"rotatex":return i=uo(Xi(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=uo(Xi(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=uo(Xi(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=uo(Xi(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=uo(Xi(t.d[0])),a=uo(Xi(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=uo(Xi(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=uo(Xi(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Zi(t.d[0],0,null)||0,n=Zi(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Zi(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Zi(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Zi(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Zi(t.d[0],0,null)||0,n=Zi(t.d[1],0,null)||0,r=Zi(t.d[2],0,null)||0,1];case"perspective":a=Zi(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function ma(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function va(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(go,t))return;if(ht(yo,go),yo[3]=0,yo[7]=0,yo[11]=0,yo[15]=1,Math.abs(mt(yo))<1e-8)return;var t=go[3],o=go[7],s=go[11],l=go[12],c=go[13],u=go[14],f=go[15];if(0!==t||0!==o||0!==s){if(mo[0]=t,mo[1]=o,mo[2]=s,mo[3]=f,!yt(yo,yo))return;gt(yo,yo),Zt(i,mo,yo)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,go),n[0]=Ft(d[0]),Gt(d[0],d[0]),r[0]=Ht(d[0],d[1]),bo(d[1],d[1],d[0],1,-r[0]),n[1]=Ft(d[1]),Gt(d[1],d[1]),r[0]/=n[1],r[1]=Ht(d[0],d[2]),bo(d[2],d[2],d[0],1,-r[1]),r[2]=Ht(d[1],d[2]),bo(d[2],d[2],d[1],1,-r[2]),n[2]=Ft(d[2]),Gt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Vt(vo,d[1],d[2]),Ht(d[0],vo)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(ya).reduce(ma),e,n,r,i,a),[[e,n,r,a,i]]}var ba=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=xa(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=xa(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=xa(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=xa(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function xa(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function wa(t){return t.toFixed(6).replace(".000000","")}function ka(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=va(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=va(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=nn(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return ba(t[0],t[1],t[2],e,t[4]).map(wa).join(",")}])}function Ma(t){return t.replace(/[xy]/,"")}function Oa(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var _a=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function Sa(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?Ci(n):Ci(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=ka(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=pa[u],g=pa[f],y=void 0;if(_a(u,f)){var m=ka([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&Ma(u)===Ma(f))y=Ma(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||Oa(u)!==Oa(f)){m=ka(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=Oa(u),h=p[1](h),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=gi(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=ti(t.unit)):(yi.isLength(t.unit)||yi.isLength(e.unit))&&(o=Zi(t,i,n),s=Zi(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}a.push(v),o.push(b),s.push([y,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var Ea=Cr(function(t){var e;return en(t)?"text-anchor"===t?[Ci(0,"px"),Ci(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[$i(Aa(e[0])),$i(Aa(e[1]))]):[Ci(t[0]||0,"px"),Ci(t[1]||0,"px")]});function Aa(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=Ui,this.mixer=ra}return t.prototype.calculator=function(t,e,n,r){return Xi(n)},t}(),r=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof si&&(n=null),O.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&O.sceneGraphService.dirtifyToRoot(t)}),n},t}(),n=function(){function t(){this.parser=Hi,this.mixer=Vi}return t.prototype.calculator=function(t,e,n,r){return n instanceof si?"none"===n.value?Pi:Li:n},t}(),Ta=function(){function t(){this.parser=ta}return t.prototype.calculator=function(t,e,n){return n instanceof si?[]:n},t}();function Pa(t){t=t.parsedStyle.fontSize;return x(t)?null:t}function La(){this.parser=Ea}var Na=function(){function t(){this.parser=$i,this.mixer=ra}return t.prototype.calculator=function(t,e,n,r,i){if(!yi.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=Pa(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Pa(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),Ca=function(){function t(){this.mixer=aa}var e=t.prototype;return e.parser=function(t){t=Ki(rn(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ja=function(){function t(){this.mixer=aa}var e=t.prototype;return e.parser=function(t){t=Ki(rn(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),i=function(t){function e(){return t.apply(this,arguments)||this}return $r(e,t),e.prototype.postProcessor=function(t,e){var n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;x(a)||(l=a),x(i)||(c=i);break;case M.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:x(t.parsedStyle.x)||(l=t.parsedStyle.x),x(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),x(l)&&x(c)&&x(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?wo(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(x(l)?n:l,x(c)?r:c,x(u)?e:u)))},e}(Na),Ba=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof si?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),a=function(){function t(){this.mixer=ra,this.parser=na}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Fa=function(){function t(){this.parser=na,this.mixer=ia(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),Ra=function(){function t(){this.parser=na,this.mixer=ia(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Ia=function(){function t(){this.parser=la,this.mixer=ca}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof si&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Nr(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===M.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),Da=function(){function t(){this.parser=ua}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==M.POLYGON&&t.nodeName!==M.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),za=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=ia(0,1/0),t}return $r(t,i),t}(Na),Wa=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof si?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),Ga=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),Ha=function(){function t(){this.parser=ga,this.mixer=Sa}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof si?[]:n},e.postProcessor=function(t){wo(t.parsedStyle.transform,t)},t}(),Va=function(){function t(){this.parser=na}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}();var qa,Ya,$a=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Lr,this.page=new Lr,this.canvas=new Lr,this.viewport=new Lr,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(Hr)},qr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),Ua=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Xr(n),e),n}return $r(t,r),t}($a),Xa=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}$r(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(Hr)},t.lookupNamespaceURI=function(t){throw new Error(Hr)},t.lookupPrefix=function(t){throw new Error(Hr)},t.normalize=function(){throw new Error(Hr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e,t){void 0===t&&(t=!1),e(this)||(t?this.childNodes.slice():this.childNodes).forEach(function(t){t.forEach(e)})},qr(d,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=Zr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===M.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===M.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new Er}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=sn(n)&&n||Xe(n)&&n.capture,n=Xe(n)&&n.once,s=Rr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=Rr(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=sn(n)&&n||Xe(n)&&n.capture,i=Rr(e)?void 0:e;return e=Rr(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new Ua(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!t.type)throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),Ka=(Xa.DOCUMENT_POSITION_DISCONNECTED=1,Xa.DOCUMENT_POSITION_PRECEDING=2,Xa.DOCUMENT_POSITION_FOLLOWING=4,Xa.DOCUMENT_POSITION_CONTAINS=8,Xa.DOCUMENT_POSITION_CONTAINED_BY=16,Xa.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,qa=qa||{},qa[qa.Standard=0]="Standard",(o=Ya=Ya||{}).DESTROY="destroy",o.ATTR_MODIFIED="DOMAttrModified",o.INSERTED="DOMNodeInserted",o.REMOVED="removed",o.MOUNTED="DOMNodeInsertedIntoDocument",o.UNMOUNTED="DOMNodeRemovedFromDocument",o.BOUNDS_CHANGED="bounds-changed",o.RENDER_ORDER_CHANGED="render-order-changed",o.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return $r(t,c),t}($a)),Za=(Ka.ADDITION=2,Ka.MODIFICATION=1,Ka.REMOVAL=3,0),Ja=new Ka(Ya.INSERTED,null,"","","",0,"",""),Qa=new Ka(Ya.REMOVED,null,"","","",0,"",""),to=new Ua(Ya.DESTROY),o=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=Za++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:qa.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:b(0,0,0),localRotation:re(0,0,0,1),localScale:b(1,1,1),localTransform:ft(),localSkew:se(0,0),position:b(0,0,0),rotation:re(0,0,0,1),scaling:b(1,1,1),worldTransform:ft(),origin:b(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:Ai,opacity:Ai,fillOpacity:Ai,strokeOpacity:Ai,fill:Ai,stroke:Ai,transform:Ai,transformOrigin:Ai,visibility:Ai,pointerEvents:Ai,lineWidth:Ai,lineCap:Ai,lineJoin:Ai,increasedLineWidthForHitTesting:Ai,fontSize:Ai,fontFamily:Ai,fontStyle:Ai,fontWeight:Ai,fontVariant:Ai,textAlign:Ai,textBaseline:Ai,textTransform:Ai,zIndex:Ai,filter:Ai,shadowType:Ai},t.parsedStyle={},t.attributes={},t}$r(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Hr)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return O.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Ja.relatedNode=this,t.dispatchEvent(Ja),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return Qa.relatedNode=this,t.dispatchEvent(Qa),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),O.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return O.sceneGraphService.matches(t,this)},e.getElementById=function(t){return O.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return O.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return O.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return O.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return O.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return O.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(O.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(to),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return O.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return O.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return O.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return O.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return O.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e;return"symbol"==typeof t||void 0===(e=this.attributes[t])&&(t=Dr(t),e=this.attributes[t],x(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(Hr)},e.getAttributeNode=function(t){throw new Error(Hr)},e.getAttributeNodeNS=function(t,e){throw new Error(Hr)},e.hasAttributeNS=function(t,e){throw new Error(Hr)},e.removeAttributeNS=function(t,e){throw new Error(Hr)},e.removeAttributeNode=function(t){throw new Error(Hr)},e.setAttributeNS=function(t,e,n){throw new Error(Hr)},e.setAttributeNode=function(t){throw new Error(Hr)},e.setAttributeNodeNS=function(t){throw new Error(Hr)},e.toggleAttribute=function(t,e){throw new Error(Hr)},qr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(Xa);var eo=new Ka(Ya.ATTR_MODIFIED,null,null,null,null,Ka.MODIFICATION,null,null),no={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},ro={anchor:[0,0],fill:Pi,stroke:Pi,transform:[],zIndex:0,filter:[],shadowType:"outer"},io=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),ao=function(i){function t(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||M.GROUP,r.config.style=Yr({},r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,ro,r.config.initialParsedStyle),Object.assign(r.attributes,no),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),O.displayObjectPool.add(r.entity,Xr(r)),r}$r(t,i);var e=t.prototype;return e.destroy=function(){i.prototype.destroy.call(this),O.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},e.cloneNode=function(e,t){var n,r,i=Yr({},this.attributes);for(n in i){var a=i[n];null!=(r=a)&&r.nodeName&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(i[n]=a.cloneNode(e)),t&&(i[n]=t(n,a))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},e.initAttributes=function(t){var e=this.renderable;O.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:io}),e.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=Dr(t);ln(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},e.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(O.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(eo.relatedNode=this,eo.prevValue=i,eo.newValue=e,eo.attrName=t,eo.prevParsedValue=a,eo.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(eo):(eo.target=this).ownerDocument.defaultView.dispatchEvent(eo,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},e.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new Nr(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return O.sceneGraphService.setOrigin(this,co(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return O.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return O.sceneGraphService.setPosition(this,co(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return O.sceneGraphService.setLocalPosition(this,co(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return O.sceneGraphService.translate(this,co(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return O.sceneGraphService.translateLocal(this,co(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return O.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return O.sceneGraphService.getLocalPosition(this)},e.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=co(t,e=e||t,n=n||t)),O.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=co(t,e=e||t,n=n||t)),O.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return O.sceneGraphService.getLocalScale(this)},e.getScale=function(){return O.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return fo(ho(m(),O.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return fo(ho(m(),O.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return O.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return O.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return x(e)&&x(n)?O.sceneGraphService.rotateLocal(this,0,0,t):O.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return x(e)&&x(n)?O.sceneGraphService.rotate(this,0,0,t):O.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return O.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return O.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return O.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return O.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return O.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return O.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return O.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return O.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return O.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){O.sceneGraphService.resetLocalTransform(this)},e.getAnimations=function(){return this.activeAnimations},e.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},e.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},e.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},e.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},e.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},e.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},e.getConfig=function(){return this.config},e.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?Xe(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},e.getMatrix=function(t){var t=t||this.getWorldTransform(),e=_t(m(),t),n=e[0],e=e[1],r=St(m(),t),i=r[0],r=r[1],t=Et(Jt(),t),t=ho(m(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new J(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=po(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},e.setLocalMatrix=function(t){var t=po(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},e.show=function(){this.style.visibility="visible"},e.hide=function(){this.style.visibility="hidden"},e.getCount=function(){return this.childElementCount},e.getParent=function(){return this.parentElement},e.getChildren=function(){return this.children},e.getFirst=function(){return this.firstElementChild},e.getLast=function(){return this.lastElementChild},e.getChildByIndex=function(t){return this.children[t]||null},e.add=function(t,e){return this.appendChild(t,e)},e.setClip=function(t){this.style.clipPath=t},e.set=function(t,e){this.config[t]=e},e.get=function(t){return this.config[t]},e.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.setZIndex=function(t){return this.style.zIndex=t,this},qr(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(o),oo={},so=[],$a=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return oo[t]},e.getAll=function(){return Object.keys(oo).map(function(t){return oo[t]})},e.add=function(t,e){(oo[t]=e).nodeName===M.HTML&&so.push(e)},e.remove=function(t){var e=oo[t];e&&(delete oo[t],e.nodeName===M.HTML)&&(t=so.indexOf(e),so.splice(t,1))},e.getHTMLs=function(){return so},t}();function lo(t){return void 0===t?0:360<t||t<-360?t%360:t}function co(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),rn(t)?b(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new J(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):b(t[0],t[1]||e,t[2]||n)}function uo(t){return t*(Math.PI/180)}function fo(t){return t*(180/Math.PI)}function ho(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=St(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function po(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=fo(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var go=ft(),yo=ft(),mo=Kt(),d=[m(),m(),m()],vo=m();function bo(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var xo=ft();function wo(t,l){var c,u;t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new ao({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[_i,_i],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[_i],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[_i],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[_i],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[_i,_i,_i],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Si],l.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[Si],l.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[Si],l.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[Si],l.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(uo(o[0]),uo(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(uo(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],uo(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(dt(xo,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(dt.apply(Bt,[xo].concat(t.map(function(t){return t.value}))),xo[12]+=c,xo[13]+=u,l.setLocalTransform(xo)))})),l.getLocalTransform()}ko={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},Mo="";var ko,Mo,Oo=function(t){return Mo=t,So()};function _o(t){throw new Error(Mo+": "+t)}function So(){var t=Fo(Eo);return 0<Mo.length&&_o("Invalid input not EOF"),t}function Eo(){return Ao("linear-gradient",ko.linearGradient,Po)||Ao("repeating-linear-gradient",ko.repeatingLinearGradient,Po)||Ao("radial-gradient",ko.radialGradient,Lo)||Ao("repeating-radial-gradient",ko.repeatingRadialGradient,Lo)||Ao("conic-gradient",ko.conicGradient,Lo)}function Ao(n,t,r){return To(t,function(t){var e=r();return e&&!Ho(ko.comma)&&_o("Missing comma before color stops"),{type:n,orientation:e,colorStops:Fo(Ro)}})}function To(t,e){t=Ho(t);if(t)return Ho(ko.startCall)||_o("Missing ("),e=e(t),Ho(ko.endCall)||_o("Missing )"),e}function Po(){return Go("directional",ko.sideOrCorner,1)||Go("angular",ko.angleValue,1)}function Lo(){var t,e,n=No();return n&&((t=[]).push(n),e=Mo,Ho(ko.comma))&&((n=No())?t.push(n):Mo=e),t}function No(){var t,e=function(){var t=Go("shape",/^(circle)/i,0);t&&(t.style=Wo()||Co());return t}()||function(){var t=Go("shape",/^(ellipse)/i,0);t&&(t.style=Do()||Co());return t}();return e?e.at=jo():(t=Co())?(e=t,(t=jo())&&(e.at=t)):(t=Bo())&&(e={type:"default-radial",at:t}),e}function Co(){return Go("extent-keyword",ko.extentKeywords,1)}function jo(){var t;if(Go("position",/^at/,0))return(t=Bo())||_o("Missing positioning value"),t}function Bo(){var t={x:Do(),y:Do()};if(t.x||t.y)return{type:"position",value:t}}function Fo(t){var e=t(),n=[];if(e)for(n.push(e);Ho(ko.comma);)(e=t())?n.push(e):_o("One extra comma");return n}function Ro(){var t=Go("hex",ko.hexColor,1)||To(ko.rgbaColor,function(){return{type:"rgba",value:Fo(Io)}})||To(ko.rgbColor,function(){return{type:"rgb",value:Fo(Io)}})||Go("literal",ko.literalColor,0);return t||_o("Expected color definition"),t.length=Do(),t}function Io(){return Ho(ko.number)[1]}function Do(){return Go("%",ko.percentageValue,1)||zo()||Wo()}function zo(){return Go("position-keyword",ko.positionKeywords,1)}function Wo(){return Go("px",ko.pixelValue,1)||Go("em",ko.emValue,1)}function Go(t,e,n){e=Ho(e);if(e)return{type:t,value:e[n]}}function Ho(t){var e=/^[\n\r\t\s]+/.exec(Mo),e=(e&&Vo(e[0].length),t.exec(Mo));return e&&Vo(e[0].length),e}function Vo(t){Mo=Mo.substring(t)}function qo(t,e){return t[0]===e[0]&&t[1]===e[1]}function Yo(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function $o(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Uo(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=uo(r=an(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=Xo({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Xo(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var Xo=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function Ko(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=Uo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Uo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function Zo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Jo(t,e){return Zo(t)*Zo(e)?(t[0]*e[0]+t[1]*e[1])/(Zo(t)*Zo(e)):1}function Qo(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Jo(t,e))}Xa=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Zr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return $r(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(Xa)),new(function(t){function e(){return t.apply(this,arguments)||this}return $r(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(Xa)),new(function(t){function e(){return t.apply(this,arguments)||this}return $r(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(Xa));new(function(t){function e(){return t.apply(this,arguments)||this}return $r(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(Xa));var ts=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],es=/([\"\'])[^\'\"]+\1/;function ns(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-ps)?0:16-e,r=cs();return ds[r]=t,1<Object.keys(ds).length||setTimeout(function(){ps=n;var e=ds;ds={},Object.keys(e).forEach(function(t){return e[t](hs())})},e),r}function rs(t){delete ds[t]}function is(t){return"string"!=typeof t?ns:""===t?us.requestAnimationFrame:us[t+"RequestAnimationFrame"]}var as,os,ss,ls=1,cs=function(){return ls++},us="object"==typeof self&&self.self==self?self:"object"==typeof C&&C.global==C?C:{},fs=Date.now(),hs=function(){return us.performance&&"function"==typeof us.performance.now?us.performance.now():Date.now()-fs},ds={},ps=Date.now(),o=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],is),Xa=is(o),o="string"!=typeof(o=o)?rs:""===o?us.cancelAnimationFrame:us[o+"CancelAnimationFrame"]||us[o+"CancelRequestAnimationFrame"],gs=(us.requestAnimationFrame=Xa,us.cancelAnimationFrame=o,[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:c.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:c.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:c.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:c.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:c.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:c.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:c.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:c.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:c.FILTER},{n:"clipPath",syntax:c.DEFINED_PATH},{n:"textPath",syntax:c.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:c.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},l:!0,syntax:c.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:c.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:c.COORDINATE},{n:"cy",int:!0,d:"0",syntax:c.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:c.COORDINATE},{n:"y",int:!0,d:"0",syntax:c.COORDINATE},{n:"z",int:!0,d:"0",syntax:c.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:c.COORDINATE},{n:"y1",int:!0,l:!0,syntax:c.COORDINATE},{n:"z1",int:!0,l:!0,syntax:c.COORDINATE},{n:"x2",int:!0,l:!0,syntax:c.COORDINATE},{n:"y2",int:!0,l:!0,syntax:c.COORDINATE},{n:"z2",int:!0,l:!0,syntax:c.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:c.PATH,p:50},{n:"points",l:!0,syntax:c.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:c.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:c.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:c.NUMBER,d:function(t){return t===M.PATH||t===M.POLYGON||t===M.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:c.MARKER},{n:"markerEnd",syntax:c.MARKER},{n:"markerMid",syntax:c.MARKER},{n:"markerStartOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"}]),ys={},ms=new WeakMap,vs=m(),bs=m(),xs=m(),Xa=function(){function t(){var e=this;gs.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){ys[t]=e})},e.unregisterMetadata=function(t){delete ys[t]},e.getPropertySyntax=function(t){return O.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,l=Object.keys(r);l.forEach(function(t){var e=Dr(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=ys[e])&&t.l&&(s=!0)}),e||l.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),null!=t&&t.length&&(l=Array.from(new Set(l.concat(t)))),["path","points","text","textTransform","anchor","transform","transformOrigin"].forEach(function(t){var e=l.indexOf(t);-1<e&&(l.splice(e,1),l.push(t))}),l.forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),l.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n,l)}),n.children.length&&l.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=ys[t],i=e;return"unset"===(e=""!==e&&!x(e)?e:"unset")||"initial"===e||"inherit"===e?i=xi(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=xi(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=ys[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof si){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))x(r)||(e=this.parseProperty(t,Rr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),x(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof si?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=ys[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=ms.get(t);n||(ms.set(t,[]),n=ms.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=ms.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=ms.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),ms.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y,m,v=O.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new Ar),s.renderBounds||(s.renderBounds=new Ar),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=It(vs,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,y=e.shadowType,g=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===M.TEXT&&delete e.anchor,d=It(bs,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),f=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,l&&!l.isNone&&Dt(p,p,It(xs,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,g=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],g),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Dt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,b(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,y=(n?-1:1)*Zi(a[0],0,t),m=(r?-1:1)*Zi(a[1],1,t),y-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(y,m),O.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=ys[t];return!!t&&t.inh},t}();(o=as=as||{})[o.ORBITING=0]="ORBITING",o[o.EXPLORING=1]="EXPLORING",o[o.TRACKING=2]="TRACKING",(o=os=os||{})[o.DEFAULT=0]="DEFAULT",o[o.ROTATIONAL=1]="ROTATIONAL",o[o.TRANSLATIONAL=2]="TRANSLATIONAL",o[o.CINEMATIC=3]="CINEMATIC",(o=ss=ss||{})[o.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",o[o.PERSPECTIVE=1]="PERSPECTIVE";var ws="updated",o=function(){function t(){this.canvas=void 0,this.eventEmitter=new Er,this.matrix=ft(),this.right=b(1,0,0),this.up=b(0,1,0),this.forward=b(0,0,1),this.position=b(0,0,1),this.focalPoint=b(0,0,0),this.distanceVector=b(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=as.EXPLORING,this.trackingMode=os.DEFAULT,this.projectionMode=ss.PERSPECTIVE,this.frustum=new Pr,this.orthoMatrix=ft()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===ss.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===as.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===as.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==as.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return yt(ft(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ft(),[t,e,0]);this.jitteredProjectionMatrix=vt(ft(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===ss.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===ss.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===ss.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===ss.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===ss.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===ss.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=b(t.x-r,t.y-n,0),e=Ht(i,this.right)/Ft(this.right),r=Ht(i,this.up)/Ft(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=ss.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(uo(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,xt(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=ss.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),Nt(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=co(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=b(0,1,0);return this.focalPoint=co(t,e,n),this.trackingMode===os.CINEMATIC&&(t=(r=zt(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Ft(r),e=fo(Math.asin(e/r)),r=90+fo(Math.atan2(n,t)),kt(n=ft(),n,uo(r)),wt(n,n,uo(e)),i=qt(m(),[0,1,0],n)),yt(this.matrix,Ct(ft(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=lo(t),this.computeMatrix(),this._getAxes(),this.type===as.ORBITING||this.type===as.EXPLORING?this._getPosition():this.type===as.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=lo(t),this.computeMatrix(),this._getAxes(),this.type===as.ORBITING||this.type===as.EXPLORING?this._getPosition():this.type===as.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=lo(t),this.computeMatrix(),this._getAxes(),this.type===as.ORBITING||this.type===as.EXPLORING?this._getPosition():this.type===as.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Qt(Jt(),[0,0,1],uo(this.roll)),e=(pt(this.matrix),Qt(Jt(),[1,0,0],uo((this.rotateWorld&&this.type!==as.TRACKING||this.type===as.TRACKING?1:-1)*this.elevation))),n=Qt(Jt(),[0,1,0],uo((this.rotateWorld&&this.type!==as.TRACKING||this.type===as.TRACKING?1:-1)*this.azimuth)),n=te(Jt(),n,e),n=te(Jt(),n,t),e=Tt(ft(),n);this.type===as.ORBITING||this.type===as.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===as.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=co(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Rt(this.right,co(Zt(Kt(),[1,0,0,0],this.matrix))),Rt(this.up,co(Zt(Kt(),[0,1,0,0],this.matrix))),Rt(this.forward,co(Zt(Kt(),[0,0,1,0],this.matrix))),Gt(this.right,this.right),Gt(this.up,this.up),Gt(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Ft(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===as.TRACKING||this.rotateWorld?(this.elevation=fo(Math.asin(e/r)),this.azimuth=fo(Math.atan2(-t,-n))):(this.elevation=-fo(Math.asin(e/r)),this.azimuth=-fo(Math.atan2(-t,-n)))},e._getPosition=function(){Rt(this.position,co(Zt(Kt(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Yt(this.distanceVector,[0,0,-this.distance],(t=ct(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Dt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=zt(m(),this.focalPoint,this.position),this.distance=Ft(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===ss.ORTHOGRAPHIC&&(t=this.position,e=Qt(Jt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,b((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),b(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(ws))},e.rotate=function(t,e,n){throw new Error(Hr)},e.pan=function(t,e){throw new Error(Hr)},e.dolly=function(t){throw new Error(Hr)},e.createLandmark=function(t,e){throw new Error(Hr)},e.gotoLandmark=function(t,e){throw new Error(Hr)},t}(),ks=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Ms=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),l=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),Os=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),_s=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),Ss=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!en(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Es=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!x(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),As=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),Ts=(0,/\[\s*(.*)=(.*)\s*\]/),Ps=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(Ts),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!x(t))&&t.toString?t.toString():""},t}();function Ls(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var Ns=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Ua(Ya.BOUNDS_CHANGED),this.rotate=(o=Jt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r=Jt(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ie(o,a),ee(o,o),te(r,o,r),te(n.localRotation,r,i),oe(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Jt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;ne(i,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Jt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ie(a,ee(Jt(),r)),ae(n.localRotation,n.localRotation,a),g.dirtifyLocal(t,n)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;$t(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Dt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ft(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,$t(g.getPosition(t),s)||(Rt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(r,e.worldTransform),yt(r,r),qt(n.localPosition,s,r)):Rt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,$t(n.localPosition,l)||(Rt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),f=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),$t(e="number"==typeof e?It(u,e,n,r):e,c)||(Dt(f,g.getPosition(t),e),g.setPosition(t,f))}),this.setRotation=function(){var o=Jt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ft(),h=m(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,b(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=At(n,d,h,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):At(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,x(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;$t(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;ne(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=b(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=b(e[0],e[1],e[2]||n.localScale[2]);$t(e,n.localScale)||(Rt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=se(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).isMutationObserved?t.dispatchEvent(n.boundsChangedEvent):t.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.clearPendingEvents(),i.clear()},e.clearPendingEvents=function(){this.pendingEvents=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)Ls(n),n=n.parentNode;e&&t.forEach(function(t){Ls(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t,!0),t.dispatchEvent(new Ka(Ya.ATTR_MODIFIED,t,n,n,e,Ka.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return St(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=_t(m(),e),r=Et(Jt(),e),e=St(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Ar.isEmpty(e)?null:((n=n||new Ar).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new Ar},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new Ar).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Ar)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=ft(),r=(t.parentNode.transformable&&(n=yt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Ar.isEmpty(r))return(e=new Ar).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Ar.isEmpty(i)||(r=new Ar).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new Nr(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Nr((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?vt(e.worldTransform,n.worldTransform,e.localTransform):ht(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),Cs={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},js=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Bs=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Fs=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Rs=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Fs.exec(e)&&!Bs.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Cs.MetricsString+Cs.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(Cs.BaselineSymbol).width),s=Cs.HeightMultiplier*o,o=o*Cs.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=rn(e)&&e+"px"||"16px",a=en(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!es.test(s)&&ts.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Nr(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+k){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var M=f[h].length,O=0,_=M,S=0;S<M;S++){var E=g(f[h][S]);if(c<O+E+y){_=S;break}O+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=k,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=Cs.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Cs.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!js.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!js.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),O={},ks=(Ss=new Ss,_s=new _s,(Mc={})[M.CIRCLE]=new ks,Mc[M.ELLIPSE]=new Ms,Mc[M.RECT]=Ss,Mc[M.IMAGE]=Ss,Mc[M.GROUP]=Ss,Mc[M.LINE]=new l,Mc[M.TEXT]=new Es(O),Mc[M.POLYLINE]=_s,Mc[M.POLYGON]=_s,Mc[M.PATH]=new Os,Mc[M.HTML]=null,Mc[M.MESH]=null,Mc),Es=(Ms=new n,Ss=new Na,(l={})[c.PERCENTAGE]=null,l[c.NUMBER]=new a,l[c.ANGLE]=new e,l[c.DEFINED_PATH]=new r,l[c.PAINT]=Ms,l[c.COLOR]=Ms,l[c.FILTER]=new Ta,l[c.LENGTH]=Ss,l[c.LENGTH_PERCENTAGE]=Ss,l[c.LENGTH_PERCENTAGE_12]=new Ca,l[c.LENGTH_PERCENTAGE_14]=new ja,l[c.COORDINATE]=new i,l[c.OFFSET_DISTANCE]=new Fa,l[c.OPACITY_VALUE]=new Ra,l[c.PATH]=new Ia,l[c.LIST_OF_POINTS]=new Da,l[c.SHADOW_BLUR]=new za,l[c.TEXT]=new Wa,l[c.TEXT_TRANSFORM]=new Ga,l[c.TRANSFORM]=new Ha,l[c.TRANSFORM_ORIGIN]=new La,l[c.Z_INDEX]=new Va,l[c.MARKER]=new Ba,l),_s=(O.CameraContribution=o,O.AnimationTimeline=null,O.EasingFunction=null,O.offscreenCanvas=new As,O.displayObjectPool=new $a,O.sceneGraphSelector=new Ps,O.sceneGraphService=new Ns(O),O.textService=new Rs(O),O.geometryUpdaterFactory=ks,O.CSSPropertySyntaxFactory=Es,O.styleValueRegistry=new Xa,O.layoutRegistry=null,O.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==C)return C;throw new Error("Unable to locate global `this`")}(),function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function Is(){Is=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Ds(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function zs(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ds(r,e,n,i,a,"next",t)}function a(t){Ds(r,e,n,i,a,"throw",t)}i(void 0)})}}function Ws(){return(Ws=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Gs(t,e){return(Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML,(Os=f2=f2||{}).READY="ready",Os.BEFORE_RENDER="beforerender",Os.RERENDER="rerender",Os.AFTER_RENDER="afterrender",Os.BEFORE_DESTROY="beforedestroy",Os.AFTER_DESTROY="afterdestroy",Os.RESIZE="resize",Os.DIRTY_RECTANGLE="dirtyrectangle",new Ua(Ya.MOUNTED),new Ua(Ya.UNMOUNTED),new Ua(f2.BEFORE_RENDER),new Ua(f2.RERENDER),new Ua(f2.AFTER_RENDER);function Hs(t){return Xs(t,"Function")}function Vs(t){return null==t}var qs=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,f=u===p,h=f&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");h&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=zs(Is().mark(function t(e){var n,r,i;return Is().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Fe([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,zs(Is().mark(function t(){return Is().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),Ys=(qs.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Gs(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new qs(Ws({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(_s)),$s=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Us={}.toString,Xs=function(t,e){return Us.call(t)==="[object "+e+"]"},Ks=function(t){return Array.isArray?Array.isArray(t):Xs(t,"Array")};function Zs(t){if(!Qs(t)||!Xs(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Js(t){return(t=rl(t)).charAt(0).toLowerCase()+t.substring(1)}var Qs=function(t){return"object"==typeof t&&null!==t},tl=function(t){return Xs(t,"String")},el=function(t){return Xs(t,"Number")},nl=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){Hs(n)&&"prototype"===e||r.push(t)};if(e)if(Ks(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},rl=function(t){return Vs(t)?"":t.toString()},il=function(t){t=rl(t);return t.charAt(0).toUpperCase()+t.substring(1)};var al=5;function ol(t){return t}var sl,tt=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||al,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Zs(o)?(Zs(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ks(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},ll=function(t,e){if(!$s(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},cl=function(t,e){if(t===e)return!0;if(t&&e&&!tl(t)&&!tl(e)){if($s(t)||$s(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=cl(t[r],e[r]));r++);return n}if(Qs(t)||Qs(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=cl(t[i[r]],e[i[r]]));r++);return n}}return!1},ul=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function fl(t){return Vs(t)?0:($s(t)?t:Object.keys(t)).length}!function(a,o){var s;if(Hs(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(sl=sl||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),sl.measureText(tl(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],nl(e=void 0===e?{}:e)).join("")});dl.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},dl.prototype.once=function(t,e){return this.on(t,e,!0)},dl.prototype.emit=function(a){for(var o=this,s=[],t=1;t<arguments.length;t++)s[t-1]=arguments[t];function e(t){for(var e,n,r=t.length,i=0;i<r;i++)t[i]&&(n=(e=t[i]).callback,e.once&&(t.splice(i,1),0===t.length&&delete o._events[a],r--,i--),n.apply(o,s))}var n=this._events[a]||[],r=this._events["*"]||[];e(n),e(r)},dl.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},dl.prototype.getEvents=function(){return this._events};var hl=dl;function dl(){this._events={}}const pl=()=>[["cartesian"]],gl=(pl.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),yl=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=gl(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},ml=(yl.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),vl=(ml.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),bl=(vl.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...vl(),...yl({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),xl=(bl.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),wl=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=xl(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...yl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},kl=(wl.props={},()=>[["parallel",0,1,0,1]]),Ml=(kl.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),Ol=(Ml.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...kl(),...yl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),_l=(Ol.props={},({value:e})=>t=>t.map(()=>e)),Sl=(_l.props={},({value:e})=>t=>t.map(e)),El=(Sl.props={},({value:e})=>t=>t.map(t=>t[e])),Al=(El.props={},({value:t})=>()=>t);function Tl(t,e){return t.parent===e.parent?1:2}function Pl(t,e){return t+e.x}function Ll(t,e){return Math.max(t,e.y)}function Nl(){var s=Tl,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(Pl,0)/e.length,t.y=1+n.reduce(Ll,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Cl(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function jl(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Fl)):void 0===e&&(e=Bl);for(var n,r,i,a,o,t=new Dl(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new Dl(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(Il)}function Bl(t){return t.children}function Fl(t){return Array.isArray(t)?t[1]:null}function Rl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Il(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function Dl(t){this.data=t,this.depth=this.height=0,this.parent=null}function zl(t){return null==t?null:Wl(t)}function Wl(t){if("function"!=typeof t)throw new Error;return t}function Gl(){return 0}function Hl(t){return function(){return t}}Al.props={},Dl.prototype=jl.prototype={constructor:Dl,count:function(){return this.eachAfter(Cl)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return jl(this).eachBefore(Rl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Vl=4294967296;function ql(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&$l(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Xl(t[0],t[1]);case 3:return Kl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Ul(e,t))return[e];for(n=0;n<t.length;++n)if(Yl(e,t[n])&&Ul(Xl(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(Yl(Xl(t[n],t[r]),e)&&Yl(Xl(t[n],e),t[r])&&Yl(Xl(t[r],e),t[n])&&Ul(Kl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Yl(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function $l(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Ul(t,e){for(var n=0;n<e.length;++n)if(!$l(t,e[n]))return;return 1}function Xl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Kl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function Zl(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Jl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Ql(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function tc(t){this._=t,this.next=null,this.previous=null}function ec(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;Zl(r,d,i=t[2]),d=new tc(d),r=new tc(r),i=new tc(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Zl(d._,r._,i=t[l]),i=new tc(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Jl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Jl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Ql(d);(i=i.next)!==r;)(s=Ql(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=ql(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function nc(t){return Math.sqrt(t.value)}function rc(){var n=null,r=1,i=1,a=Gl;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Vl)/Vl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(ic(n)).eachAfter(ac(a,.5,e)).eachBefore(oc(1)):t.eachBefore(ic(nc)).eachAfter(ac(Gl,1,e)).eachAfter(ac(a,t.r/Math.min(r,i),e)).eachBefore(oc(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=zl(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Hl(+t),e):a},e}function ic(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function ac(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=ec(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function oc(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function sc(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 lc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var cc={depth:-1},uc={},fc={};function hc(t){return t.id}function dc(t){return t.parentId}function pc(){var y,m=hc,v=dc;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=yc(t,e-1)&&!yc(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(gc);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(gc(r)),c.push(fc));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new Dl(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?uc:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===uc)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=y){for(;i.data===fc&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===fc;--t)o.data=null}if(i.parent=cc,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(Il),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=zl(t),e):m},e.parentId=function(t){return arguments.length?(v=zl(t),e):v},e.path=function(t){return arguments.length?(y=zl(t),e):y},e}function gc(t){let e=t.length;if(e<2)return"";for(;1<--e&&!yc(t,e););return t.slice(0,e)}function yc(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function mc(t,e){return t.parent===e.parent?1:2}function vc(t){var e=t.children;return e?e[0]:t.t}function bc(t){var e=t.children;return e?e[e.length-1]:t.t}function xc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function wc(){var h=mc,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new xc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new xc(r[i],i)),n.parent=e;return(t.parent=new xc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=bc(o),i=vc(i),o&&i;)s=vc(s),(a=bc(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(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(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!bc(a)&&(a.t=o,a.m+=u-c),i&&!vc(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function kc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}xc.prototype=Object.create(Dl.prototype);var Mc=(1+Math.sqrt(5))/2;function Oc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?lc(o,n,r,i,k?r+=c*u/k:a):kc(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return m}var _c=function e(a){function t(t,e,n,r,i){Oc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Mc);function Sc(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function Ec(t,e,n,r,i){(1&t.depth?kc:lc)(t,e,n,r,i)}var Ac=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?lc(o,e,n,r,h?n+=(i-n)*o.value/h:i):kc(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=Oc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(Mc);function Tc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function Pc(t={}){return[...Tc(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function Lc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function Nc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Cc(t={}){return Tc(t)}function jc(){return[{type:"maybeKey"}]}function Bc(t,e){return t.getBandWidth(t.invert(e))}function Fc(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?Bc(l,a[e]):0;var r=p?Bc(c,o[e]):0,e=g&&s?(Bc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function Rc(t){return parseFloat(t)/100}function Ic(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?Rc(e)*o:+e,"string"==typeof t?Rc(t)*s:+t]]})]}function Dc(e){return"function"==typeof e?e:t=>t[e]}function zc(t,e){return Array.from(t,Dc(e))}function Wc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=zc(t,e),o=zc(t,n),s=zc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Gc(t,e){return t.getBandWidth(t.invert(e))}const Hc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Gc(c,a[t]),n=e*(u?Gc(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Hc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...Pc({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...jc(),...Nc()],interaction:{shareTooltip:!0}};const Vc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function qc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Yc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=qc,o=(t,e)=>qc(n(t),e),(t,e)=>n(t)-e):(a=n===qc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:$c,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function $c(){return 0}function*Uc(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}Vc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...Pc({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...jc(),...Nc()],interaction:{shareTooltip:!0}};n=Yc(qc);const Xc=n.right,Kc=n.left,Zc=Yc(function(t){return null===t?NaN:+t}).center;function Jc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Qc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function tu(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class eu{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class nu extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(ru(this,t))}has(t){return super.has(ru(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function ru({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function iu(t){return t}function au(t,...e){return lu(t,iu,iu,e)}function ou(t,e,...n){return lu(t,iu,e,n)}function su(t,e,...n){return lu(t,Array.from,e,n)}function lu(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new nu,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function cu(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=fu(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>fu(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(uu(n))}function uu(r=qc){if(r===qc)return fu;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function fu(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var hu=Array.prototype.slice;function du(t){return()=>t}const pu=Math.sqrt(50),gu=Math.sqrt(10),yu=Math.sqrt(2);function mu(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=pu?10:r>=gu?5:r>=yu?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/s<t&&++a,o/s>e&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*s<t&&++a,o*s>e&&--o),o<a&&.5<=n&&n<2?mu(t,e,2*n):[a,o,s]}function vu(t,e,n){return mu(t=+t,e=+e,n=+n)[2]}function bu(t){return Math.ceil(Math.log(Jc(t))/Math.LN2)+1}function xu(){var m=iu,v=tu,b=bu;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===tu&&([s,l]=function(t,e,n){let r;for(;;){var i=vu(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(t,e,n){if(!(0<(n=+n)))return[];if((t=+t)===(e=+e))return[t];var r=e<t,[i,a,o]=r?mu(e,t,n):mu(t,e,n);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}(s,l,u))[0]<=s&&(n=vu(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===tu){const n=vu(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Xc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:du(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:du([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:du(Array.isArray(t)?hu.call(t):t),e):b},e}function wu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function ku(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function Mu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function Ou(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function _u(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?fu:uu(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),_u(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,f=n[r];let t=i,e=a;for(Su(n,i,r),0<o(n[a],f)&&Su(n,i,a);t<e;){for(Su(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?Su(n,i,e):Su(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function Su(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Eu(t,e,n){var r;if((n=(t=Float64Array.from(Uc(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?Mu(t):1<=e?wu(t):(n=(n-1)*e,(r=wu(_u(t,e=Math.floor(n)).subarray(0,e+1)))+(Mu(t.subarray(e+1))-r)*(n-e))}function Au(r,t,i){if((i=(r=Float64Array.from(Uc(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return Ou(r);if(1<=t)return ku(r);t=Math.floor((i-1)*t),i=_u(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>fu(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<qc(o,t):0===qc(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function Tu(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function Pu(t,e){return Eu(t,.5,e)}function Lu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Nu(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function Cu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function ju(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function Bu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function Fu(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function Ru(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function Iu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function Du(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function zu(t){return Ru(t)||Bu(t)}function Wu(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function Gu(t){var t=t.getOptions()["transformations"],[,t,e]=t.find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}const Hu=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(au(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Vu=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},qu=()=>(t,e,n,r)=>{return(Iu(r)?Vu:Hu)(t,e,n,r)};qu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Pc({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...jc(),...Nc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Yu=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=Fc(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Yu.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...Pc({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...jc(),{type:"maybeSize"},...Lc()]};const $u=s=>{const{cartesian:l=!1}=s;return l?Ic:(t,e,n,r)=>{if(l)return Ic(t,0,n,r);const{x:i,y:a}=n,o=Fc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};$u.props={defaultShape:"text",defaultLabelShape:"label",channels:[...Pc({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...jc(),...Lc()]};const Uu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Uu.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...Pc({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...jc(),...Lc()]};const Xu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(au(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Xu.props={defaultShape:"area",defaultLabelShape:"label",channels:[...Pc({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...jc(),...Nc()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Ku=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=Fc(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Ku.props={defaultShape:"link",defaultLabelShape:"label",channels:[...Pc({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...jc(),...Lc()]};const Zu=s=>{var t=s["cartesian"];return t?Ic:(t,e,n,r)=>{const{x:i,y:a}=n,o=Fc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Zu.props={defaultShape:"image",defaultLabelShape:"label",channels:[...Pc({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...jc(),...Lc()]};const Ju=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};Ju.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...Pc({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...jc(),...Lc()]};const Qu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},tf=(Qu.props={defaultShape:"box",defaultLabelShape:"label",channels:[...Pc({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...jc(),...Nc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});tf.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...Pc({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...jc(),...Lc()]};const ef=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};ef.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Cc({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...jc()]};const nf=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};nf.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Cc({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...jc()]};const rf=(...t)=>Ku(...t);function af(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function of(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=af("x",r,n,e.x),o=af("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}rf.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...Cc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...jc()]};const sf=()=>of();sf.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Cc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...jc()]};const lf=()=>of({extendY:!0});lf.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Cc({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...jc()]};const cf=()=>of({extendX:!0});function uf(t){return t.target.depth}function ff(t,e){return t.sourceLinks.length?t.depth:e-1}function hf(t){return function(){return t}}function df(t,e){return gf(t.source,e.source)||t.index-e.index}function pf(t,e){return gf(t.target,e.target)||t.index-e.index}function gf(t,e){return t.y0-e.y0}function yf(t){return t.value}function mf(t){return t.index}function vf(t){return t.nodes}function bf(t){return t.links}function xf(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function wf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function kf(){let x=0,w=0,k=1,M=1,O=24,_=8,S,E=mf,A=ff,T,P,L,N=vf,C=bf,j=6;function e(e){e={nodes:N(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=xf(g,n)),"object"!=typeof r&&(r=t.target=xf(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(Cu(y.sourceLinks,yf),Cu(y.targetLinks,yf)):y.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max(wu(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(wu(t,t=>t.depth)+1,0),n=(k-x-O)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+O,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(_,(M-w)/(wu(u,t=>t.length)-1)),u),f=Mu(t,t=>(M-w-(t.length-1)*S)/Cu(t,yf));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(pf),n.sort(df)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,F(c))}void 0===P&&o.sort(gf),o.length&&B(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,F(c))}void 0===P&&o.sort(gf),o.length&&B(o,i)}}(u,d,p)}return wf(e),e}function B(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,M,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function F({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(pf);for(const{target:{targetLinks:e}}of t)e.sort(df)}}return e.update=function(t){return wf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:hf(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:hf(t),e):A},e.nodeDepth=function(t){return arguments.length?(T=t,e):T},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:hf(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:hf(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],M=+t[1],e):[k-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[k,M]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}cf.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Cc({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...jc()]};const Mf={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},Of={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Mu(t.sourceLinks,uf)-1:0},justify:ff};const _f=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},Mf,f),l=kf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?Of[n]||ff:"function"==c?n:ff).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function Sf(t){return t}function Ef(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function Af(t=""){throw new Error(t)}function Tf(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function Pf(t){return null!=t&&!Number.isNaN(t)}function et(t,e){return Lf(t,e)||{}}function Lf(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Js(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function Nf(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function Cf(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t}_f.props={};const jf=y=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=y,{links:t,nodes:l}=Wc(t,e),c=et(e,"node"),e=et(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=_f(Object.assign(Object.assign(Object.assign({},m),{nodeId:Dc(u)}),i))({links:t,nodes:l});const h=et(r,"label"),{text:d=u,spacing:p=5}=h,g=Q(h,["text","spacing"]);return[tt({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:et(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),g),...a],animate:"object"==typeof s?et(s,"node"):s,axis:!1}),tt({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},et(r,"link")),animate:"object"==typeof s?et(s,"link"):s})]}},Bf=(jf.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);Bf.props={defaultShape:"path",defaultLabelShape:"label",channels:[...Pc({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...jc()]};const Ff=t=>t?parseInt(t):0;function Rf(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||Ff(t.width),e=e.clientHeight||Ff(t.height),{width:(i={width:i-(Ff(t.paddingLeft)+Ff(t.paddingRight)),height:e-(Ff(t.paddingTop)+Ff(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function If(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function Df(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:Sc,treemapDice:lc,treemapSlice:kc,treemapSliceDice:Ec,treemapSquarify:_c,treemapResquarify:Ac};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?pc().path(p):pc():jl)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(sc),t}function y(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=_c,i=!1,s=a=1,l=[0],d=h=f=u=c=Gl,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=Wl(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Hl(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Hl(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Hl(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Hl(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Hl(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const zf=u=>t=>{var{width:t,height:e}=If(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=Q(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=Df(n,tt({},c,o),r),n=et(a,"label");return[tt({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0}),n),...s]},l),{axis:!1}))]},Wf=(zf.props={composite:!0},u=>t=>{var{width:t,height:e}=If(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=Q(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Ks(t)?pc().path(e.path):jl)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),rc().size(e.size).padding(e.padding)(n),n.descendants()})(n,tt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),tt({},c.encode,r)),t=et(a,"label");return[tt({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function Gf(t,e){return Mu(t,t=>e[t])}function Hf(t,e){return wu(t,t=>e[t])}function Vf(t,e){const n=2.5*qf(t,e)-1.5*$f(t,e);return Mu(t,t=>e[t]>=n?e[t]:NaN)}function qf(t,e){return Eu(t,.25,t=>e[t])}function Yf(t,e){return Eu(t,.5,t=>e[t])}function $f(t,e){return Eu(t,.75,t=>e[t])}function Uf(t,e){const n=2.5*$f(t,e)-1.5*qf(t,e);return wu(t,t=>e[t]<=n?e[t]:NaN)}function Xf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(au(t,t=>a[+t]).values()).flatMap(t=>{const e=Vf(t,i),n=Uf(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}Wf.props={composite:!0};const Kf=s=>()=>{var{data:t,encode:e,style:n={}}=s,r=Q(s,["data","encode","style","transform"]),{extend:i=!1}=n,n=Q(n,["extend"]),a=e["y"],a={y:a,y1:a,y2:a,y3:a,y4:a},o={y1:qf,y2:Yf,y3:$f};return i?[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Gf},o),{y4:Hf})],encode:Object.assign(Object.assign({},e),a),style:n},r)]:(i=et(n,"box"),n=et(n,"point"),[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Vf},o),{y4:Uf})],encode:Object.assign(Object.assign({},e),a),style:i},r),{type:"point",data:t,transform:[{type:Xf}],encode:e,style:Object.assign({},n)}])},Zf=(Kf.props={composite:!0},s=>{var t=s["cartesian"];return t?Ic:(t,e,n,r)=>{const{x:i,y:a}=n,o=Fc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Jf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Qf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function th(t){return t[0]}function eh(t){return t[1]}function nh(t,e,n){e=new rh(null==e?th:e,null==n?eh:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function rh(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function ih(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Zf.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};Na=nh.prototype=rh.prototype;function ah(t){return function(){return t}}function oh(t){return 1e-6*(t()-.5)}function sh(t){return t.index}function lh(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function ch(c){var u,f,a,o,h,d,s=sh,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=ah(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||oh(d),o=i.y+i.vy-r.y-r.vy||oh(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=lh(r,t.source)),"object"!=typeof t.target&&(t.target=lh(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:ah(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:ah(+t),g(),e):r},e}Na.copy=function(){var t,e,n=new rh(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=ih(e));else n._root=ih(r);return n},Na.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Jf(this.cover(e,n),e,n,t)},Na.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Jf(this,i[u],a[u],t[u]);return this},Na.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},Na.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},Na.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Na.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new Qf(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new Qf(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new Qf(y[2],s,c,a,i),new Qf(y[1],a,l,o,c),new Qf(y[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},Na.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},Na.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Na.root=function(){return this._root},Na.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},Na.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Qf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new Qf(e,o,s,i,a)),(e=c[2])&&l.push(new Qf(e,n,s,o,a)),(e=c[1])&&l.push(new Qf(e,o,r,i,s)),e=c[0])&&l.push(new Qf(e,n,r,o,s));return this},Na.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Qf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Qf(i,a,o,c,u)),(i=f[1])&&n.push(new Qf(i,c,o,s,u)),(i=f[2])&&n.push(new Qf(i,a,u,c,l)),i=f[3])&&n.push(new Qf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Na.x=function(t){return arguments.length?(this._x=t,this):this._x},Na.y=function(t){return arguments.length?(this._y=t,this):this._y};var uh={value:()=>{}};function fh(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new hh(r)}function hh(t){this._=t}function dh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=uh,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}hh.prototype=fh.prototype={constructor:hh,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=dh(i[n],t.name,e);else if(null==e)for(n in i)i[n]=dh(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new hh(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var ph,gh,yh=0,mh=0,vh=0,bh=1e3,xh=0,wh=0,kh=0,Mh="object"==typeof performance&&performance.now?performance:Date,Oh="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _h(){return wh||(Oh(Sh),wh=Mh.now()+kh)}function Sh(){wh=0}function Eh(){this._call=this._time=this._next=null}function Ah(t,e,n){var r=new Eh;return r.restart(t,e,n),r}function Th(){wh=(xh=Mh.now())+kh,yh=mh=0;try{_h(),++yh;for(var t,e=ph;e;)0<=(t=wh-e._time)&&e._call.call(void 0,t),e=e._next;--yh}finally{for(var n,r,i=ph,a=1/(yh=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:ph=r);gh=n,Lh(a),wh=0}}function Ph(){var t=Mh.now(),e=t-xh;bh<e&&(kh-=e,xh=t)}function Lh(t){yh||(mh=mh&&clearTimeout(mh),24<t-wh?(t<1/0&&(mh=setTimeout(Th,t-Mh.now()-kh)),vh=vh&&clearInterval(vh)):(vh||(xh=Mh.now(),vh=setInterval(Ph,bh)),yh=1,Oh(Th)))}Eh.prototype=Ah.prototype={constructor:Eh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?_h():+n)+(null==e?0:+e),this._next||gh===this||(gh?gh._next=this:ph=this,gh=this),this._call=t,this._time=n,Lh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lh())}};const Nh=4294967296;function Ch(t){return t.x}function jh(t){return t.y}var Bh=10,Fh=Math.PI*(3-Math.sqrt(5));function Rh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=Ah(i),n=fh("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Nh)/Nh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=Bh*Math.sqrt(.5+r),e=r*Fh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function Ih(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,F=(r=ah(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,R()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:ah(+t),R(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=nh(i,Ch,jh).visitAfter(I);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function R(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function I(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=oh(c))*i),0===a&&(s+=(a=oh(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=oh(c))*i),0===a&&(s+=(a=oh(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,M,O,_,S,E,A,T,n=ch(a).id(Dc(n)),P=("function"==typeof o&&F.strength(o),"function"==typeof s&&n.strength(s),Rh(t).force("link",n).force("charge",F));function L(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function C(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(O[n]-e.x)*M[n]*t}function j(){if(k){var t,e=k.length;for(M=new Array(e),O=new Array(e),t=0;t<e;++t)M[t]=isNaN(O[t]=+w(k[t],t,k))?0:+_(k[t],t,k)}}function B(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*T,r=(r/e-E)*T,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?P.force("center",(T=1,null==S&&(S=0),null==E&&(E=0),B.initialize=function(t){A=t},B.x=function(t){return arguments.length?(S=+t,B):S},B.y=function(t){return arguments.length?(E=+t,B):E},B.strength=function(t){return arguments.length?(T=+t,B):T},B)):P.force("x",(_=ah(.1),"function"!=typeof w&&(w=ah(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(_="function"==typeof t?t:ah(+t),j(),C):_},C.x=function(t){return arguments.length?(w="function"==typeof t?t:ah(+t),j(),C):w},C)).force("y",(x=ah(.1),"function"!=typeof y&&(y=ah(null==y?0:+y)),L.initialize=function(t){m=t,N()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:ah(+t),N(),L):x},L.y=function(t){return arguments.length?(y="function"==typeof t?t:ah(+t),N(),L):y},L)),P.stop();var z=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<z;t++)P.tick();return{nodesData:t,linksData:a}}const Dh=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=et(e,"node"),c=et(e,"link"),{links:t,nodes:u}=Wc(t,e),{nodesData:t,linksData:u}=Ih({links:t,nodes:u},tt({},{joint:!0},i),e);return[tt({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:et(r,"link"),animate:"object"==typeof s?et(s,"link"):s}),tt({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:et(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),et(r,"label")),...a],animate:"object"==typeof s?et(s,"node"):s})]},zh=(Dh.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=jl(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),Wh=t=>zh(Nl)(t),Gh=(Wh.props={},t=>zh(wc)(t)),Hh=(Gh.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=Gh(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[tt({},h,{data:l,encode:et(e,"link"),scale:et(n,"link"),labels:o,style:Object.assign({stroke:"#999"},et(r,"link")),animate:"object"==typeof s?et(s,"link"):s}),tt({},f,{data:i,scale:et(n,"node"),encode:et(e,"node"),labels:[Object.assign(Object.assign({},d),et(r,"label")),...a],style:Object.assign({},et(r,"node")),animate:"object"==typeof s?et(s,"node"):s})]}});Hh.props={composite:!0};var Vh={},qh={},Yh=34,$h=10,Uh=13;function Xh(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Kh(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Zh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Jh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Zh(-e,6):9999<e?"+"+Zh(e,6):Zh(e,4))+"-"+Zh(t.getUTCMonth()+1,2)+"-"+Zh(t.getUTCDate(),2)+(a?"T"+Zh(n,2)+":"+Zh(r,2)+":"+Zh(i,2)+"."+Zh(a,3)+"Z":i?"T"+Zh(n,2)+":"+Zh(r,2)+":"+Zh(i,2)+"Z":r||n?"T"+Zh(n,2)+":"+Zh(r,2)+"Z":"")}function Qh(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return qh;if(l)return l=!1,Vh;var t,e,n=a;if(r.charCodeAt(n)===Yh){for(;a++<i&&r.charCodeAt(a)!==Yh||r.charCodeAt(++a)===Yh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===$h?l=!0:e===Uh&&(l=!0,r.charCodeAt(a)===$h)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===$h)l=!0;else if(e===Uh)l=!0,r.charCodeAt(a)===$h&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===$h&&--i,r.charCodeAt(i-1)===Uh&&--i;(e=c())!==qh;){for(var u=[];e!==Vh&&e!==qh;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Jh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Xh(n=t),function(t,e){return r(i(t),e,n)}):Xh(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Kh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Kh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function td(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;ed&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const ed=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),nd=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ve(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Qh(i).parse(t,a?td:Sf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};nd.props={};const rd=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};rd.props={};const id=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},ad=(id.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});ad.props={};const od=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};od.props={};const sd=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};sd.props={};const ld=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},cd=(ld.props={},t=>{const e=t["value"];return()=>e}),ud=(cd.props={},t=>{const{callback:e=Sf}=t;return t=>e(t)}),fd=(ud.props={},t=>{const{callback:e=Sf}=t;return t=>Array.isArray(t)?t.map(e):t});fd.props={};var hd=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const dd={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function pd(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},dd),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=y(t),t.targetWeight=m(t)});const i=au(r,t=>t.source),a=au(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=Cu(e,t=>t.sourceWeight)+Cu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:hd[v])&&r.sort(n),!(n=(r=e).length))throw Af("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=au(e,t=>t.source),l=au(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const gd=e=>t=>pd(e)(t),yd=(gd.props={},Math.PI/180),md=64,vd=2048;function bd(t){return t.text}function xd(){return"serif"}function wd(){return"normal"}function kd(t){return t.value}function Md(){return 90*~~(2*Math.random())}function Od(){return 1}function _d(){}function Sd(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(md<<5)/c,vd/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*yd),h=Math.cos(o.rotate*yd),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=md<<5&&(i=0,a+=n,n=0),a+e>=vd)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*yd),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(md<<5)/c,vd/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(md<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*m)}}}function Ed(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Ad(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Td(){return document.createElement("canvas")}function Pd(t){return"function"==typeof t?t:function(){return t}}const Ld={archimedean:Ed,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function Nd(){let b=[256,256],r=bd,i=xd,p=kd,g=wd,y=Md,m=Od,x=Ed,w=Math.random,v=_d,k=[],M=null,O=1/0;const _=wd,S=Td,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(md<<5)/e,t.height=vd/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||Ad((b[0]>>5)*b[1]),c=k.length,u=[],f=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,Sd(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=Ad((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){k=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=Pd(t)},E.font=function(t){i=Pd(t)},E.fontWeight=function(t){g=Pd(t)},E.rotate=function(t){y=Pd(t)},E.spiral=function(t){x=Ld[t]||t},E.fontSize=function(t){p=Pd(t)},E.padding=function(t){m=Pd(t)},E.random=function(t){w=Pd(t)},E.on=function(t){v=Pd(t)},E}const Cd={size:[500,500],fontSize:[14,28]};function jd(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const Bd=h=>f=>ve(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},Cd,h),e=Nd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ve(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[Mu(e),wu(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",jd,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=Q(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function Fd(e){return"string"==typeof e?t=>t[e]:e}Bd.props={};const Rd=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=Fd(r),l=Fd(t),c=ou(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},Id=(Rd.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});Id.props={};const Dd=u=>c=>ve(void 0,void 0,void 0,function*(){var{width:t,height:e}=If(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=Q(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield Bd(Object.assign(Object.assign({},l),o))(e);return[tt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),zd=(Dd.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),Wd=(zd.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Gd=(Wd.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),Hd=(Gd.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),Vd=(Hd.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),qd=(Vd.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),Yd=(qd.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),$d=(Yd.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),Ud=($d.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),Xd=(Ud.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),Kd=(Xd.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Zd=(Kd.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),Jd=(Zd.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),Qd=(Jd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),tp=(Qd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),ep=(tp.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),np=(ep.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),rp=(np.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),ip=(rp.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),ap=(ip.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function op(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function sp(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function lp(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}ap.props={};const cp=Math.sqrt(50),up=Math.sqrt(10),fp=Math.sqrt(2);function hp(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=cp?10:n>=up?5:n>=fp?2:1)*10**t:-(10**-t)/(n>=cp?10:n>=up?5:n>=fp?2:1)}function dp(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=cp?r*=10:n>=up?r*=5:n>=fp&&(r*=2),e<t?-r:r}const pp=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=hp(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=hp(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=hp(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},gp=36e5,yp=864e5,mp=7*yp;yp,yp;function vp(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}a=vp(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),e=vp(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),r=vp(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),Ms=vp(gp,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+gp*e)},t=>t.getHours()),Ta=vp(yp,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+yp*e)},t=>t.getDate()-1);const bp=vp(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());Ss=vp(mp,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+mp*e)},t=>{var e=bp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/mp)}),Ca=vp(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const xp={millisecond:a,second:e,minute:r,hour:Ms,day:Ta,week:Ss,month:bp,year:Ca};ja=vp(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),i=vp(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),Fa=vp(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Ra=vp(gp,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+gp*e)},t=>t.getUTCHours()),Ia=vp(yp,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+yp*e)},t=>t.getUTCDate()-1);const wp=vp(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());Da=vp(mp,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+mp*e)},t=>{var e=wp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/mp)}),za=vp(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const kp={millisecond:ja,second:i,minute:Fa,hour:Ra,day:Ia,week:Da,month:wp,year:za};function Mp(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?kp:xp;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=lp(i,l,0,c,s);let f;return f=u===c?[a,dp(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(dp(t,e,n),1)]}const Op=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Mp(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function _p(t){return null!=t&&!Number.isNaN(t)}const Sp=e=>t=>-e(-t),Ep=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Sp(t):t},Ap=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Sp(n):n},Tp=(t,e,n,r)=>{var i=t<0,a=Ep(r,i),r=Ap(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function Pp(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return el(t)?Math.round(t):t}):i;this.output=op(a,r,e,t)},t.prototype.invert=void 0}}var Lp,Wa={exports:{}},Ga={exports:{}},Np=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Cp=Array.prototype.concat,jp=Array.prototype.slice,Bp=Ga.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Np(i)?e=Cp.call(e,jp.call(i)):e.push(i)}return e},Fp=(Bp.wrap=function(t){return function(){return t(Bp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Rp=Ga.exports,Ip=Object.hasOwnProperty,Dp=Object.create(null);for(Lp in Fp)Ip.call(Fp,Lp)&&(Dp[Fp[Lp]]=Lp);var zp=Wa.exports={to:{},get:{}};function Wp(t,e,n){return Math.min(Math.max(e,t),n)}function Gp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}zp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=zp.get.hsl(t),n="hsl";break;case"hwb":e=zp.get.hwb(t),n="hwb";break;default:e=zp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},zp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:Ip.call(Fp,e[1])?((i=Fp[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=Wp(i[n],0,255);return i[3]=Wp(i[3],0,1),i},zp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Wp(parseFloat(t[2]),0,100),Wp(parseFloat(t[3]),0,100),Wp(isNaN(e)?1:e,0,1)]):null},zp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,Wp(parseFloat(t[2]),0,100),Wp(parseFloat(t[3]),0,100),Wp(isNaN(e)?1:e,0,1)]):null},zp.to.hex=function(){var t=Rp(arguments);return"#"+Gp(t[0])+Gp(t[1])+Gp(t[2])+(t[3]<1?Gp(Math.round(255*t[3])):"")},zp.to.rgb=function(){var t=Rp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},zp.to.rgb.percent=function(){var t=Rp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},zp.to.hsl=function(){var t=Rp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},zp.to.hwb=function(){var t=Rp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},zp.to.keyword=function(t){return Dp[t.slice(0,3)]};var Hp=Wa.exports;function Vp(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function qp(t){var e,n,r,t=Hp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Vp(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Vp(n,r,e),255*Vp(n,r,e-1/3),t]):null):null}const Yp=(e,n)=>t=>e*(1-t)+n*t,$p=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Yp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=qp(n),c=qp(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Up=(t,e)=>{const n=Yp(t,e);return t=>Math.round(n(t))};function Xp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Kp(t){return"object"==typeof t?t.valueOf():t}class Zp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Kp,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Xp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Xp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class Jp{constructor(t){this.options=tt({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tt({},this.options,t),this.rescale(t)}rescale(t){}}const Qp=Symbol("defaultUnknown");function t0(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function e0(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Qp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function n0(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class r0 extends Jp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Qp}}map(t){return 0===this.domainIndexMap.size&&t0(this.domainIndexMap,this.getDomain(),this.domainKey),e0({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&t0(this.rangeIndexMap,this.getRange(),this.rangeKey),e0({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=n0(e),this.rangeKey=n0(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new r0(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function i0(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new Zp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new Zp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class a0 extends r0{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Qp,flex:[]}}clone(){return new a0(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return i0(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const o0=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=hp(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function s0(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const l0=[1,5,2,2.5,4,3],c0=100*Number.EPSILON;const u0=(n,r,t=5,i=!0,a=l0,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=y,p=void 0,p=fl(h),1-ll(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,k=(O=r,k=w*(e-1),(O-=n)<k?1-((k-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*k+o[2]*b+o[3]<g.score)break;var M=Math.floor(r/w)*y-(e-1)*y,O=Math.ceil(n/w)*y;if(M<=O){var _=O-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(w/y),E=S+w*(e-1),A=w,T=function(t,e,n,r,i,a){var o=fl(e),e=ll(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<c0||a-t<c0)&&r<=0&&0<=i?1:s)}(m,a,y,S,E,A),P=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(E-(N=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=o[0]*T+o[1]*P+o[2]*L+ +o[3];g.score<N&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=s0(g.lmax),e=s0(g.lmin),C=s0(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,B=new Array(j);B[0]=s0(e);for(let t=1;t<j;t+=1)B[t]=s0(B[t-1]+C);return B};class f0 extends Jp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:u0}}map(t){return _p(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new f0(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return el(t)&&el(r)?n(t,r,e):[]}}const h0=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return op(o=t<r?(a=sp(t,r),n(e,i)):(a=sp(r,t),n(i,e)),a)},d0=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=sp(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=lp(r,t,1,i)-1,n=a[e];return op(o[e],n)(t)}},p0=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?d0:h0)(t,e,r?Up:n)};class g0 extends Jp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Yp,tickCount:5}}map(t){return _p(t)?this.output(t):this.options.unknown}invert(t){return _p(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return pp}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return ol}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=p0(n.map(t),r,a,i);this.output=op(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=p0(i,r.map(t),Yp);this.input=op(e,n,i)}}class y0 extends g0{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:$p,tickMethod:o0,tickCount:5}}chooseTransforms(){return[ol,ol]}clone(){return new y0(this.options)}}class m0 extends a0{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Qp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new m0(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const v0=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class b0 extends g0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:$p,tickMethod:o0,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[ol,ol]:(t=.5===r?v0:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new b0(this.options)}}class x0 extends b0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:$p,tickMethod:o0,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new x0(this.options)}}class w0 extends Jp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return _p(t)?(t=lp(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new w0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const k0=(t,e,n,r=10)=>{var i=t<0,a=Ap(r,i),o=Ep(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=o0(l,c,n))}else h=o0(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class M0 extends g0{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:$p,tickMethod:k0,tickCount:5}}chooseNice(){return Tp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[Ep(t,e),Ap(t,e)]}clone(){return new M0(this.options)}}class O0 extends w0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:u0}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=pp(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new O0(this.options)}}function _0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class S0 extends w0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:u0}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=_0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new S0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var E0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,A0=/\[([^]*?)\]/gm;function T0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function P0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function L0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var N0,Ha=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Va=["January","February","March","April","May","June","July","August","September","October","November","December"],c=T0(Va,3),C0=P0({},{dayNamesShort:T0(Ha,3),dayNames:Ha,monthNamesShort:c,monthNames:Va,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),j0={D:function(t){return String(t.getDate())},DD:function(t){return L0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return L0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return L0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return L0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return L0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return L0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return L0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return L0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return L0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return L0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return L0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+L0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+L0(Math.floor(Math.abs(t)/60),2)+":"+L0(Math.abs(t)%60,2)}},B0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const F0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Mp(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function R0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class I0 extends g0{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:F0,interpolate:Yp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Op}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?kp:xp,s=t?R0:ol;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=B0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=B0[t]||t).replace(A0,function(t,e){return r.push(e),"@@@"}),P0(P0({},C0),n));return(t=t.replace(E0,function(t){return j0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new I0(this.options)}}var D0;let z0=N0=class extends y0{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ol,tickMethod:o0,tickCount:5}}constructor(t){super(t)}clone(){return new N0(this.options)}};z0=N0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Pp(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return op(Yp(0,1),sp(t,e))})],z0);let W0=D0=class extends y0{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ol,tickMethod:o0,tickCount:5}}constructor(t){super(t)}clone(){return new D0(this.options)}};W0=D0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Pp(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=op(Yp(0,.5),sp(e,n)),a=op(Yp(.5,1),sp(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],W0);const G0=t=>new a0(t),H0=(G0.props={},t=>new y0(t)),V0=(H0.props={},t=>new r0(t)),q0=(V0.props={},t=>new f0(t)),Y0=(q0.props={},t=>new m0(t)),$0=(Y0.props={},t=>new I0(t)),U0=($0.props={},t=>new M0(t)),X0=(U0.props={},t=>new b0(t)),K0=(X0.props={},t=>new w0(t)),Z0=(K0.props={},t=>new S0(t)),J0=(Z0.props={},t=>new O0(t)),Q0=(J0.props={},t=>new x0(t)),t1=(Q0.props={},t=>new z0(t));function e1(t){return function(){return t}}t1.props={};const n1=Math.abs,r1=Math.atan2,i1=Math.cos,a1=Math.max,o1=Math.min,s1=Math.sin,l1=Math.sqrt,c1=1e-12,u1=Math.PI,f1=u1/2,h1=2*u1;function d1(t){return 1<=t?f1:t<=-1?-f1:Math.asin(t)}const p1=Math.PI,g1=2*p1,y1=1e-6,m1=g1-y1;function v1(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class b1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?v1:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return v1;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,f=s-t,h=l-e,d=f*f+h*h;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>y1&&(Math.abs(h*c-u*f)>y1&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((p1-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>y1&&this._append`L${t+d*f},${e+d*h}`,this._append`A${i},${i},0,0,${+(f*s<h*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,f=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>y1||Math.abs(this._y1-c)>y1)&&this._append`L${l},${c}`,n&&((f=f<0?f%g1+g1:f)>m1?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>y1&&this._append`A${n},${n},0,${+(f>=p1)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function x1(){return new b1}function w1(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new b1(r)}function k1(t){return t.innerRadius}function M1(t){return t.outerRadius}function O1(t){return t.startAngle}function _1(t){return t.endAngle}function S1(t){return t&&t.padAngle}function E1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/l1(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*l1(a1(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function A1(){var A=k1,T=M1,P=e1(0),L=null,N=O1,C=_1,j=S1,B=null,F=w1(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),M=+T.apply(this,arguments),O=N.apply(this,arguments)-f1,_=C.apply(this,arguments)-f1,S=n1(_-O),E=O<_;if(B=B||(t=F()),M<k&&(e=M,M=k,k=e),M>c1?S>h1-c1?(B.moveTo(M*i1(O),M*s1(O)),B.arc(0,0,M,O,_,!E),k>c1&&(B.moveTo(k*i1(_),k*s1(_)),B.arc(0,0,k,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=j.apply(this,arguments)/2)>c1&&(L?+L.apply(this,arguments):l1(k*k+M*M)),w=x=s=o1(n1(M-k)/2,+P.apply(this,arguments)),h>c1&&(f=d1(h/k*s1(u)),h=d1(h/M*s1(u)),(a-=2*f)>c1?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>c1?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=M*i1(e),f=M*s1(e),h=k*i1(i),O=k*s1(i),s>c1&&(d=M*i1(n),p=M*s1(n),g=k*i1(r),y=k*s1(r),S<u1)&&((_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<c1))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,O))?(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/s1((1<(S=(S*b+v*m)/(l1(S*S+v*v)*l1(b*b+m*m)))?0:S<-1?u1:Math.acos(S))/2),b=l1(_[0]*_[0]+_[1]*_[1]),x=o1(s,(k-b)/(v-1)),w=o1(s,(M-b)/(1+v))):x=w=0),o>c1?w>c1?(l=E1(g,y,u,f,M,w,E),c=E1(d,p,h,O,M,w,E),B.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?B.arc(l.cx,l.cy,w,r1(l.y01,l.x01),r1(c.y01,c.x01),!E):(B.arc(l.cx,l.cy,w,r1(l.y01,l.x01),r1(l.y11,l.x11),!E),B.arc(0,0,M,r1(l.cy+l.y11,l.cx+l.x11),r1(c.cy+c.y11,c.cx+c.x11),!E),B.arc(c.cx,c.cy,w,r1(c.y11,c.x11),r1(c.y01,c.x01),!E))):(B.moveTo(u,f),B.arc(0,0,M,e,n,!E)):B.moveTo(u,f),k>c1&&a>c1?x>c1?(l=E1(h,O,d,p,k,-x,E),c=E1(u,f,g,y,k,-x,E),B.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?B.arc(l.cx,l.cy,x,r1(l.y01,l.x01),r1(c.y01,c.x01),!E):(B.arc(l.cx,l.cy,x,r1(l.y01,l.x01),r1(l.y11,l.x11),!E),B.arc(0,0,k,r1(l.cy+l.y11,l.cx+l.x11),r1(c.cy+c.y11,c.cx+c.x11),E),B.arc(c.cx,c.cy,x,r1(c.y11,c.x11),r1(c.y01,c.x01),!E))):B.arc(0,0,k,i,r,E):B.lineTo(h,O)):B.moveTo(0,0),B.closePath(),t)return B=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-u1/2;return[i1(e)*t,s1(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:e1(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:e1(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:e1(+t),e):P},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:e1(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:e1(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:e1(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:e1(+t),e):j},e.context=function(t){return arguments.length?(B=null==t?null:t,e):B},e}function T1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function P1(t){this._context=t}function L1(t){return new P1(t)}function N1(t){return t[0]}function C1(t){return t[1]}function j1(o,s){var l=e1(!0),c=null,u=L1,f=null,h=w1(e);function e(t){var e,n,r,i=(t=T1(t)).length,a=!1;for(null==c&&(f=u(r=h())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?N1:e1(o),s="function"==typeof s?s:void 0===s?C1:e1(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:e1(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:e1(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:e1(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function B1(u,f,h){var d=null,p=e1(!0),g=null,y=L1,m=null,v=w1(e);function e(t){var e,n,r,i,a,o=(t=T1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return j1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?N1:e1(+u),f="function"==typeof f?f:e1(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?C1:e1(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:e1(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:e1(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:e1(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:e1(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:e1(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:e1(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:e1(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}x1.prototype=b1.prototype,P1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var F1=I1(L1);function R1(t){this._curve=t}function I1(e){function t(t){return new R1(e(t))}return t._curve=e,t}function D1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I1(t)):e()._curve},t}function z1(){}function W1(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 G1(t,e){this._context=t,this._k=(1-e)/6}function H1(t,e){this._context=t,this._k=(1-e)/6}function V1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>c1&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>c1&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function q1(t,e){this._context=t,this._alpha=e}R1.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))}},G1.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:W1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:W1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new G1(t,n)}return t.tension=function(t){return e(+t)},t}(0),H1.prototype={areaStart:z1,areaEnd:z1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:W1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new H1(t,n)}return t.tension=function(t){return e(+t)},t}(0),q1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:V1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Y1=function e(n){function t(t){return n?new q1(t,n):new G1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function $1(t,e){this._context=t,this._alpha=e}$1.prototype={areaStart:z1,areaEnd:z1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:V1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U1=function e(n){function t(t){return n?new $1(t,n):new H1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function X1(t){this._context=t}function K1(t){return new X1(t)}function Z1(t,e){this._context=t,this._t=e}function J1(t){return new Z1(t,.5)}function Q1(t){return new Z1(t,0)}function tg(t){return new Z1(t,1)}function nt(t){return new eg([t],null,t,t.ownerDocument)}X1.prototype={areaStart:z1,areaEnd:z1,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))}},Z1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(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:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class eg{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new eg(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new eg(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new eg([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new eg(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new eg(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new eg([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=au(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const au=f.get(d);s.push([h,au]);for(const y of au)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new eg([],i,this._parent,this._document),new eg(a,null,this._parent,this._document),new eg(o,null,this._parent,this._document),new eg([],s,this._parent,this._document),new eg(l,null,this._parent,this._document)];return new eg(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new eg(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=eg.registry[t])?new e:Af("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){var e=this._transitions[t];e?(e=Array.isArray(e)?e:[e],Promise.all(e.map(t=>t.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new eg([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function ng([t,e],[n,r]){return[t-n,e-r]}function rg([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function ig([t,e]){return Math.atan2(e,t)}function ag([t,e]){return ig([t,e])+Math.PI/2}function og(t,e){t=ig(t),e=ig(e);return t<e?e-t:2*Math.PI-(t-e)}function sg(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function lg([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function cg(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function ug(t){return t.map((t,e)=>e)}function fg(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function hg(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)hg(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function dg(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...hg(e,t));return n}function A(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function pg(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*rg(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function gg(t,e,n,r,i){e=ig(ng(r,e))+Math.PI,n=ig(ng(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function yg(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=ug(a),[r,o]=tu(t,t=>a[t]);const s=new y0({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function mg(t){var[t,e,n,r]=t;return[r,t,e,n]}function vg(t,e,n){var[e,r,,i]=ju(t)?mg(e):e,[n,a]=n,t=t.getCenter(),o=ag(ng(e,t)),r=ag(ng(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:rg(i,t),outerRadius:rg(e,t)}}function bg(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function xg(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function wg(t,e){return Bu(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function kg(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:f=a,radiusTopLeft:h=a,radiusTopRight:d=a}=r,r=Q(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!Bu(n)&&!Ru(n)){var[p,,g]=!!ju(n)?mg(t):t;const[x,v]=p;var[g,p]=ng(g,p),y=(0<g?x:x+g)+o,m=(0<p?v:v+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return nt(new j.Rect({})).style("x",y).style("y",m).style("width",g).style("height",o).style("radius",[h,d,f,u]).call(A,r).node()}const{y:v,y1:b}=e;l=n.getCenter(),p=vg(n,t,[v,b]),s=A1().cornerRadius(a).padAngle(i*Math.PI/180);return nt(new j.Path({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(A,r).node()}eg.registry={g:j.Group,rect:j.Rect,circle:j.Circle,path:j.Path,text:j.Text,ellipse:j.Ellipse,image:j.Image,line:j.Line,polygon:j.Polygon,polyline:j.Polyline,html:j.HTML};const Mg=M=>{const{colorAttribute:O,first:_=!0,last:S=!0}=M,E=Q(M,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=Q(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:f=a,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,lineWidth:r="stroke"===O||s?r:0,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y}=E,w=Q(E,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:k}=e;return nt(kg(t,e,n,{radius:a,radiusTopLeft:_?l:d,radiusTopRight:_?c:p,radiusBottomRight:S?u:g,radiusBottomLeft:S?f:h,inset:y,insetLeft:m,insetRight:v,insetBottom:b,insetTop:x})).call(A,Object.assign(Object.assign({},o),w)).style(xg(M),k).style(O,i).style("lineWidth",r).style("stroke",void 0===s?i:s).node()}},Og=(Mg.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Mg(Object.assign({colorAttribute:"fill"},t))),_g=(Og.props=Object.assign({},Mg.props),t=>Mg(Object.assign({colorAttribute:"stroke"},t)));_g.props=Object.assign({},Mg.props);const Sg=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(ju(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=Q(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return Mg(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Eg(t,e,n){var[t,r,i,a]=t;if(ju(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}Sg.props=Object.assign({},Mg.props);const Ag=t=>Sg(Object.assign({adjustPoints:Eg},t));function Tg(t){const e="function"==typeof t?t:t.render;return class extends j.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Ag.props=Object.assign({},Mg.props);const Pg=Tg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;nt(t).maybeAppend("line",()=>new j.Path({})).style("d",e).call(A,r),nt(t).maybeAppend("line1",()=>new j.Path({})).style("d",n).call(A,i)});const Lg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:g=!1}=t,y=Q(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=Q(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?yg(a,s,l,h,d):r,s=wg(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(Bu(n)){const u=n.getCenter();c=n=>D1(j1().curve(F1)).angle((t,e)=>ag(ng(n[e],u))).radius((t,e)=>rg(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=j1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=et(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?nt(new j.Path({})).style("d",c(r)).call(A,l):a&&!g?nt(new j.Path({})).style("d",c(t)).call(A,l):nt(new Pg).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Ng=(Lg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Bu(n)?K1:L1;return Lg(Object.assign({curve:i},a))(t,e,n,r)}),Cg=(Ng.props=Object.assign({},Lg.props),t=>{const{alpha:a=.5}=t,o=Q(t,["alpha"]);return(t,e,n,r)=>{var i=Bu(n)?U1:Y1;return Lg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),jg=(Cg.props=Object.assign({},Lg.props),t=>Lg(Object.assign({curve:tg},t))),Bg=(jg.props=Object.assign({},Lg.props),t=>Lg(Object.assign({curve:Q1},t))),Fg=(Bg.props=Object.assign({},Lg.props),t=>Lg(Object.assign({curve:J1},t)));function Rg(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}Fg.props=Object.assign({},Lg.props);var Ig,Dg=Object.freeze({__proto__:null,point:Rg,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const u=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,g=Q(h,["colorAttribute","symbol","mode"]),y=Dg[t]||Rg;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=bg(r,a,o,s),{defaultColor:a,lineWidth:o}=r,s=Q(r,["defaultColor","lineWidth"]),r=g.stroke?o||1:o,{color:o=a,transform:a,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||Du(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||g.r||s.r;return nt(new j.Path).call(A,s).style("d",y(c,u,f)).style("lineWidth",r).style("transform",a).style("stroke",o).style(xg(h),l).style(d,o).call(A,g).node()}},zg=(u.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>u(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Wg=(zg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),Gg=(Wg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),Hg=(Gg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Vg=(Hg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),qg=(Vg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),Yg=(qg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),$g=(Yg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),Ug=($g.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Xg=(Ug.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Kg=(Xg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),Zg=(Kg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Jg=(Zg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Qg=(Jg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),ty=(Qg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"point"},t))),ey=(ty.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"square"},t))),ny=(ey.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),ry=(ny.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),iy=(ry.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),ay=(iy.props=Object.assign({},u.props),t=>{const{arrowSize:u="40%"}=t,f=Q(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=bg(r,e,i,a),e=r["defaultColor"],i=Q(r,["defaultColor"]),[a,r]=t,[t,l]=pg(a,r,{arrowSize:u}),c=x1();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),nt(new j.Path).call(A,i).style("d",c.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(A,f).node()}});function oy(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,oy)}function sy(){this.constructor=Ig}ay.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Ig=oy,Ba=Error,sy.prototype=Ba.prototype,Ig.prototype=new sy,oy.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var ly;function cy(t,e,n,r){var i,a,o,s=uy(r=void 0===r?"...":r,n),l=en(t)?t:x(i=t)?"":i.toString(),c=e,u=[];if(uy(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=uy(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=uy(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var uy=pn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(ly=ly||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),ly.measureText(en(t)?t:"").width},function(t,e){return k([t],w(on(e=void 0===e?{}:e)),!1).join("")});function fy(t,e){return"string"==typeof t?uy(t,e):t}function hy(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function dy(t,e){e=Math.pow(10,e);return~~(t*e)/e}function py(t){if(rn(t))return[t,t,t,t];if(Ue(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var gy=["default","active","selected","disabled","inactive"];function yy(t){var r=v({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}var my={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function vy(t){var e;return t?null==t?void 0:t.default:(e=dn(t)||{},gy.forEach(function(t){t in e&&delete e[t]}),e)}function by(t,e,n){return void 0===n&&(n=!1),e?(e=wn(t,e),n?bn({},vy(t),e):e):vy(t)||{}}function xy(t,r,i,e){void 0===i&&(i=!1);var a=(e=void 0===e?!0:e)?yy(t):t;return Object.keys(a).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(r,"[A-Z].*")).test(n)!==i&&(i?t[e]=a[e]:t[(n=e.slice(r.length)).charAt(0).toLowerCase()+n.slice(1)]=a[e]),t},{})}function wy(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(xy(i,n)),i=xy(i,n,!0)),t},[]);return t.push(i),t}function ky(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function My(t,n){void 0===n&&(n=["x","y","class"]);var r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function Oy(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}_.prototype.selectAll=function(t){return new _("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},_.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new _(this._elements,null,this._parent,this._document,void 0,void 0,t)},_.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new _([t],null,t,this._document)},_.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=w(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new _(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new _(r,null,r[0],this._document)},_.prototype.maybeAppend=function(t,e){e=we(this,_y,"m",Sy).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},_.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=we(this,_y,"m",Sy).call(this,t.startsWith(".")?t:".".concat(t),e);return e.addClassName(t),e},_.prototype.maybeAppendByName=function(t,e){e=we(this,_y,"m",Sy).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},_.prototype.addClassName=function(r){var e,t;try{for(var n=xe(this._elements),i=n.next();!i.done;i=n.next())!function(t){var e=t.attr("class")||void 0,n=new Set((null==e?void 0:e.split(" "))||[]);r.split(" ").forEach(function(t){return n.add(t)}),t.attr("class",Array.from(n).join(" "))}(i.value)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return this},_.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=au(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var m=h.get(g);l.push([p,m]);try{r=void 0;for(var v=xe(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new _([],a,this._parent,this._document),new _(o,null,this._parent,this._document),new _(s,null,this._parent,this._document),new _([],l,this._parent,this._document),new _(c,null,this._parent,this._document)];return new _(this._elements,null,this._parent,this._document,w)},_.prototype.merge=function(t){var e=k(k([],w(this._elements),!1),w(t._elements),!1),t=k(k([],w(this._transitions),!1),w(t._transitions),!1);return new _(e,null,this._parent,this._document,void 0,t)},_.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=_.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},_.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},_.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new _([],null,this._parent,this._document,void 0,this._transitions)},_.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},_.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},_.prototype.style=function(n,r,t){void 0===t&&(t=!0);var i="function"==typeof r&&t?r:function(){return r};return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},_.prototype.styles=function(e,s){return void 0===s&&(s=!0),this.each(function(i,a){var o=this,t=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],r=e[1],e="function"==typeof r&&s?r:function(){return r};return void 0!==r&&(t[n]=e.call(o,i,a)),t},{});this.attr(t)})},_.prototype.update=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},_.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},_.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},_.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,k([this._parent,this],w(e),!1)),this},_.prototype.node=function(){return this._elements[0]},_.prototype.nodes=function(){return this._elements},_.prototype.transitions=function(){return this._transitions},_.prototype.parent=function(){return this._parent},_y=new WeakSet,Sy=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new _([t],null,this._parent,this._document)},_.registry={g:j.Group,rect:j.Rect,circle:j.Circle,path:j.Path,text:j.Text,ellipse:j.Ellipse,image:j.Image,line:j.Line,polygon:j.Polygon,polyline:j.Polyline,html:j.HTML};var _y,Sy,Ey=_;function _(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),_y.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function S(t){return new Ey([t],null,t,t.ownerDocument)}function Ay(t,e,n){return t.querySelector(e)?S(t).select(e):S(t).append(n)}function Ty(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function Py(t){var t=t.getLocalBounds(),t=w([t.min,t.max],2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function Ly(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function Ny(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function Cy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)By(t,e[r]);return t}var jy=5,By=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=jy),Object.entries(i).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Je(t)?(Je(r[e])||(n[e]={}),a<o?By(r[e],t,a+1,o):n[e]=i[e]):Ue(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function Fy(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function Ry(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function Iy(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function Dy(a,o){return void 0===a&&(a=0),void 0===o&&(o=!1),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,o&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var zy,Wy=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function Gy(t){return en(t)||rn(t)?new j.Text({style:{text:String(t)}}):t}function Hy(t){return t*Math.PI/180}function Vy(t){return Number((180*t/Math.PI).toPrecision(5))}function qy(t,e){var t=(t instanceof j.DisplayObject?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function Yy(t,e){if(e)try{var o=t instanceof j.DisplayObject?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof j.DisplayObject?r:r.node()).getBBox()).width,a=r.height,[(r=w([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function $y(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function Uy(t,e){return qe(t)?t.apply(void 0,k([],w(e),!1)):t}function Xy(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t instanceof Ey?t.node().removeChildren():t instanceof j.DisplayObject?t.removeChildren():t instanceof HTMLElement&&(t.innerHTML="")}),t?n(e):(r&&i(e),null)}function Ky(){return null!==zy&&zy.apply(this,arguments)||this}function Zy(e,n){return me(t,r=j.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t,e){var n;this.attr(bn({},this.attributes,t=void 0===t?{}:t)),null!=(n=(t=this.descriptor).render)&&n.call(t,this.attributes,this,e)},t;function t(t){t=r.call(this,Cy({},{style:n},t))||this;return t.descriptor=e,t}var r}me(Ky,zy=j.CustomElement);function Jy(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=w(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function Qy(t){return t.charAt(0).toUpperCase()+t.slice(1)}function tm(t,e,n){void 0===n&&(n="...");t=t instanceof j.Text?t:t.node();"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}Object.defineProperty(nm.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(nm.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),nm.fromRect=function(t){return new nm(t.x,t.y,t.width,t.height)},nm.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}};var em=nm;function nm(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}function rm(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,o=w([s+o.width,l+o.height],2),c=o[0],o=o[1];s<e&&(e=s),l<n&&(n=l),r<c&&(r=c),i<o&&(i=o)}return new em(e,n,r-e,i-n)}function im(n,t,e){function r(t){var e=w(u?["height",a]:["width",i],2),n=e[0],r=e[1];switch(c){case"flex-start":return 0;case"flex-end":return r-t[n];case"center":return r/2-t[n]/2;default:return 0}}var i=n.width,a=n.height,o=void 0===(o=e.flexDirection)?"row":o,s=(e.flexWrap,e.justifyContent),l=void 0===s?"flex-start":s;e.alignContent;var c=void 0===(s=e.alignItems)?"flex-start":s,u="row"===o,e="row"===o||"column"===o,f=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],h=(s=w([0,0],2))[0],d=s[1],e=rm(o=t.map(function(t){var e=t.width,t=t.height,n=w([h,d],2),r=n[0],n=n[1],i=w([h+e*f[0],d+t*f[1]],2);return h=i[0],d=i[1],new em(r,n,e,t)})),p={"flex-start":0,"flex-end":u?i-e.width:a-e.height,center:u?(i-e.width)/2:(a-e.height)/2};return rm(s=o.map(function(t){var e=t.x,n=t.y,t=em.fromRect(t);return t.x=u?e+p[l]:e,t.y=u?n:n+p[l],t})),s.map(function(t){var e=t.x,n=t.y,t=em.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=em.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function am(t,e,n){return[]}function om(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}function sm(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r.attr(e);x(t)||x(n)||n===t||(i[e]=n,a[e]=t)}),e?0<Object.keys(i).length?r.animate([i,a],v({fill:"both"},e)):null:("update"in r?r.update(t):r.attr(t),null)}var lm,cm=function(e,n){return function(t){return e*(1-t)+n*t}};function um(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?cm(e,t):Array.isArray(e)&&Array.isArray(t)?(i=e,o=(a=t)?a.length:0,s=i?Math.min(o,i.length):0,function(t){for(var e=new Array(s),n=new Array(o),r=0,r=0;r<s;++r)e[r]=um(i[r],a[r]);for(;r<o;++r)n[r]=a[r];for(r=0;r<s;++r)n[r]=e[r](t);return n}):"object"==typeof e&&"object"==typeof t?(void 0===(n=e)&&(n={}),void 0===(t=t)&&(t={}),r={},l={},Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];e in n?r[e]=um(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function fm(t,e){var n=e?"visibility":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t instanceof j.DisplayObject&&e(t,n)})}(t,function(t){t.attr("visible",n)})}function hm(){return null!==lm&&lm.apply(this,arguments)||this}me(hm,lm=j.Group),hm.prototype.appendChild=function(t,e){return this.destroyChildren(),fm(t,!1),lm.prototype.appendChild.call(this,t,e)};me(pm,dm=j.CustomElement),pm.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},pm.prototype.update=function(t,e){return this.attr(Cy({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},pm.prototype.clear=function(){this.removeChildren()},pm.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},pm.prototype.attributeChangedCallback=function(){},pm.prototype.bindEvents=function(t,e){};var dm,l=pm;function pm(t){return dm.call(this,t)||this}function gm(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function ym(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function mm(t,e,n){return[["M",t-n,e],["L",t+n,e]]}o=gm,As=mm;function vm(t){n="default",Xe(e=t)&&e instanceof Image?n="image":qe(e)?n="symbol":en(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}me(wm,bm=l),wm.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=(t.class,Q(t,["x","y","symbol","size","class"])),l=vm(a);Xy(!!l,S(e),function(t){t.maybeAppendByClassName("marker",l).addClassName("".concat(l,"-marker")).call(function(t){var e,n;"image"===l?t.styles({img:a,width:e=2*o,height:e,x:-o,y:-o}):(e=o/2,n=qe(a)?a:wm.getSymbol(a),t.styles(v({path:null==n?void 0:n(r,i,e)},s)))})})},wm.MARKER_SYMBOL_MAP=new Map,wm.registerSymbol=function(t,e){wm.MARKER_SYMBOL_MAP.set(t,e)},wm.getSymbol=function(t){return wm.MARKER_SYMBOL_MAP.get(t)};var bm,xm=wm;function wm(){return null!==bm&&bm.apply(this,arguments)||this}xm.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),xm.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),xm.registerSymbol("line",ym),xm.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),xm.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),xm.registerSymbol("circle",gm),xm.registerSymbol("point",o),xm.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),xm.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),xm.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),xm.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),xm.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),xm.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),xm.registerSymbol("line",ym),xm.registerSymbol("dot",mm),xm.registerSymbol("dash",As),xm.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),xm.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),xm.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),xm.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),xm.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});me(Om,km=l),Om.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=w(py(void 0===i?0:i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=Ay(e,".tag-content","g").attr("className","tag-content").node(),y=Ay(g,".tag-marker",function(){return new xm({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(y=y).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):y.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:y.style.y}),m=u.x,y=u.y,y=(S(g).maybeAppendByClassName("tag-text","text").styles(v(v({fontFamily:"sans-serif",fontSize:12,text:x(o)?"":"".concat(o),x:m,y:y},s),{textBaseline:"middle"})).call(function(t){o||t.remove()}),u=i,m=h,y=f||"start",s=t||"top",t=(f=g).getLocalBounds(),r=n=0,"start"===y&&(n=u),"center"===y&&(n=-t.halfExtents[0]),"end"===y&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),g.getLocalBounds());S(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:(g.style.zIndex||0)-1,y:y.min[1]-h,x:y.min[0]-i,width:null!==c?i+d+2*y.halfExtents[0]:0,height:null!==c?h+p+2*y.halfExtents[1]:0,radius:null!=l?l:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},c))},Om.tag="tag",Om.defaultOptions={style:{padding:4,spacing:4}};var km,Mm=Om;function Om(t){return km.call(this,bn({},Om.defaultOptions,t))||this}var _m,Sm,Em={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Am={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},Tm={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function Pm(t){var n=_m.call(this,Cy({},Pm.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function Lm(t){return Sm.call(this,bn({},Lm.defaultOptions,t))||this}me(Pm,_m=l),Object.defineProperty(Pm.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=ln(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Pm.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=bn({},wn(Em,[n,e]),by(wn(Am,[t,e]),r),by(wn(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Tm[e]&&(i[t]=wn(Tm,[e,t]))}),Object.keys(Tm.strict[e]).forEach(function(t){i[t]=wn(Tm,["strict",e,t])}),bn(i,by(wn(this.attributes,e),"disabled"))),i},Pm.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.marker,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),w(py(r),4)),a=(r[0],r[1]),o=(r[2],r[3]),s=this.buttonHeight,l=this.getStyle("markerStyle"),c=this.markerSize,r=Ay(e,".marker",function(){return new xm({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},l),{symbol:i,x:o+c/2,y:s/2,size:c}))}).node().getLocalBounds(),u=this.getStyle("textStyle"),r=(this.textShape=Ay(e,".text","text").attr("className","text").styles(v(v({x:c?r.max[0]+t:o,y:s/2},u),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),u=this.getStyle("buttonStyle");S(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},u),{height:s,width:o+(c?c+t:0)+2*r.halfExtents[0]+a}))},Pm.prototype.update=function(t){this.attr(bn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Pm.prototype.setState=function(t){this.update({state:t})},Pm.prototype.hide=function(){this.style.visibility="hidden"},Pm.prototype.show=function(){this.style.visibility="visible"},Pm.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Pm.tag="button",Pm.defaultOptions={style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},me(Lm,Sm=l),Lm.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=w(py(void 0===i?0:i),3),i=t[0],f=t[1],t=t[2],h=Ay(e,".container","g").styles({className:"container",x:n+t,y:r+i}),d=0,p=0,g=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Mm({className:"breadcrumb-item",style:v(v({x:d,y:p,text:x(n.text)?n.id:n.text,textStyle:l},mn(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,x(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),g.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new j.Text({className:"".concat(Lm.tag,"-separator"),id:"".concat(Lm.tag,"-separator-").concat(t),style:v(v(v(v({},my),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Lm.prototype.update=function(t){this.attr(bn({},this.attributes,t)),this.render(this.attributes,this)},Lm.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},Lm.tag="breadcrumb",Lm.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},my),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};me(jm,Nm=j.DisplayObject),jm.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},jm.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},jm.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},jm.prototype.createLines=function(t){S(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){S(this).styles(t)})},function(t){return t.each(function(t){S(this).styles(t)})},function(t){return t.remove()})},jm.prototype.createAreas=function(t){S(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){S(this).styles(t)})},function(t){return t.each(function(t){S(this).styles(t)})},function(t){return t.remove()})};var Nm,Cm=jm;function jm(t){var e=this,n=t.style,t=Q(t,["style"]);return(e=Nm.call(this,bn({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=e.appendChild(new j.Group({name:"lines"})),e.areasGroup=e.appendChild(new j.Group({name:"areas"})),e.render(),e}me(Rm,Bm=j.DisplayObject),Rm.prototype.render=function(){var t=this.attributes.columns;S(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){S(this).styles(t)})},function(t){return t.each(function(t){S(this).styles(t)})},function(t){return t.remove()})},Rm.prototype.update=function(t){this.attr(bn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Rm.prototype.clear=function(){this.removeChildren()};var Bm,Fm=Rm;function Rm(t){var e=this,n=t.style,t=Q(t,["style"]);return(e=Bm.call(this,bn({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new j.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Im(t){return 0===t.length?[0,0]:[tn(function(t,e){if(Ue(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=qe(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return tn(t)||0})),Qe(function(t,e){if(Ue(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=qe(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Qe(t)||0}))]}function Dm(t){for(var e=dn(t),n=e[0].length,t=w([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function zm(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=ce([0,0],c,x=t[s]),u=ue([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=fe(m=pe([0,0],d,h),m,e),0!==(y=(p=he(x,h))+(g=he(x,d)))&&(p/=y,g/=y),y=fe([0,0],m,-p),m=fe([0,0],m,g),v=le([0,0],x,y),b=ce([0,0],b=le([0,0],x,m),ue([0,0],d,x)),b=ue([0,0],b,ce([0,0],d,x)),v=ce([0,0],v=le([0,0],x,y=fe([0,0],y=pe([0,0],b,x),-p/g)),ue([0,0],h,x)),v=ue([0,0],v,ce([0,0],h,x)),b=le([0,0],x,m=fe([0,0],m=pe([0,0],x,v),g/p)),o&&(v=ce([0,0],v=ue([0,0],v,c),u),b=ce([0,0],b=ue([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function Wm(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return k([e===n?"M":"L"],w(t),!1)});return e?t.reverse():t}function Gm(t,e){if(void 0===e&&(e=!1),t.length<=2)return Wm(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];xn(a,n.slice(-2))||n.push.apply(n,k([],w(a),!1))}var o=zm(n,!1);return e?o.unshift(k(["M"],w(t[r-1]),!1)):o.unshift(k(["M"],w(t[0]),!1)),o}function Hm(t,e,n){t=dn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}me(Ym,Vm=l),Object.defineProperty(Ym.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=dn(t),rn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Ym.prototype,"data",{get:function(){return this.attributes.isStack?Dm(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Ym.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Ym.prototype,"baseline",{get:function(){var t=this.scales.y,e=w(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Ym.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Ym.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,l,c,u=this.attributes,f=u.isStack,h=u.smooth,d=xy(this.attributes,"area"),p=xy(this.attributes,"line"),u=this.containerCfg.width,g=this.data;return 0===g[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,g=g,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=w(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=w([a,o],2),o=e[0],a=e[1]),t=g.map(function(t){return t.map(function(t,e){return[r.map(e),nn(i.map(t),o,a)]})}),e=[],d&&(g=this.baseline,e=f?(h?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Gm(o),l=void 0,l=0===i?Hm(s,e,n):(a=Gm(t[i-1],!0),o=o[0],a[0][0]="L",k(k(k([],w(s),!1),w(a),!1),[k(["M"],w(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Wm(t[i]),s=void 0,s=0===i?Hm(o,e,n):((a=Wm(t[i-1],!0))[0][0]="L",k(k(k([],w(o),!1),w(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(s=h,l=u,c=g,t.map(function(t){return Hm((s?Gm:Wm)(t),l,c)}))),{lines:t.map(function(t,e){return v({stroke:n.getColor(e),path:(h?Gm:Wm)(t)},p)}),areas:e.map(function(t,e){return v({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Ym.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=xy(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=Dm(s));var e=this.createScales(s),l=e.x,c=e.y,e=w(Im(s),2),n=e[0],e=e[1],u=new y0({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return v(v({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Ym.prototype.render=function(t,e){this.containerShape=Ay(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=Ay(e,".".concat(r),function(){return new("line"===n?Cm:Fm)({className:r,style:i})}).styles(i).node()},Ym.prototype.update=function(t){this.attr(bn({},this.attributes,t)),this.render(this.attributes,this)},Ym.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Ym.prototype.getColor=function(t){var e=this.attributes.color;return Ue(e)?e[t%e.length]:qe(e)?e.call(null,t):e},Ym.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=w(Im(t),2),s=o[0],o=o[1],s=new y0({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new y0({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new a0({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},Ym.tag="sparkline",Ym.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var Vm,qm=Ym;function Ym(t){return Vm.call(this,bn({},Ym.defaultOptions,t))||this}var $m,Um={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},Xm={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},Km={orient:"horizontal",type:"start",showLabel:!0},Zm=Jy({labelGroup:"label-group",label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Jm=Zy({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,Q(t,["size","radius","orient","class"])),a=2.4*n,r=S(e).maybeAppendByClassName(Zm.iconRect,"rect").styles(v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(Zm.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(Zm.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),Qm=(me(tv,$m=l),tv.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=w(My(xy(this.attributes,"label"),[]),2),i=r[0],r=r[1];Xy(!!n,S(t).maybeAppendByClassName(Zm.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(Zm.label,"text").styles(v(v({},Xm),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},tv.prototype.renderIcon=function(t){var e=this.attributes,n=e.iconShape,n=void 0===n?function(){return new Jm({style:r})}:n,e=e.orient,r=v(v({orient:e},Um),xy(this.attributes,"icon"));this.icon=S(t).maybeAppendByClassName(Zm.icon,n).update(r)},tv.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},tv);function tv(t){return $m.call(this,Cy({},{style:Km},t))||this}me(rv,ev=l),Object.defineProperty(rv.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(rv.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=xy(this.attributes,"sparkline")).padding,t=Q(t,["padding"]),e=(i=w(py(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.trackLineWidth,v(v({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(rv.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=w(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(rv.prototype,"availableSpace",{get:function(){var t=w(py(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),rv.prototype.getValues=function(){return this.values},rv.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attr("values",t=void 0===t?[0,0]:t);t=!1!==e&&this.animation;sm(this.selectionShape.node(),this.selectionCfg,t),sm(this.startHandle.node(),this.getHandleShapeCfg("start"),t),sm(this.endHandle.node(),this.getHandleShapeCfg("end"),t)},rv.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.update({values:t}),e&&this.onValueChange(n)},rv.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=xy(this.attributes,"track");this.trackShape=S(t).maybeAppendByClassName("slider-track","rect").styles(v(v(v({},this.shape),n),{cursor:e?"crosshair":"default"}))},rv.prototype.renderSparkline=function(t){var n=this;Xy("horizontal"===this.attributes.orient,S(t).maybeAppendByClassName("slider-sparkline-group","g"),function(t){var e=n.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new qm({style:e})}).call(function(t){t.node().update(e)})})},Object.defineProperty(rv.prototype,"selectionCfg",{get:function(){var t=xy(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),rv.prototype.renderSelection=function(t){function e(t){var e="".concat(t,"-handle"),n=r.getHandleShapeCfg(t);return r.foregroundGroup.maybeAppendByClassName(e,function(){return new Qm({style:n})}).style("type",t).update(n)}var r=this;this.foregroundGroup=S(t).maybeAppendByClassName("slider-foreground","g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").styles(this.selectionCfg);this.startHandle=e("start"),this.endHandle=e("end")},rv.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},rv.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=w(this.range,2),r=n[0],n=n[1],i=w(this.getValues().map(function(t){return dy(t,e)}),2),a=i[0],i=i[1],t=w((t||[a,i]).map(function(t){return dy(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=w([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},rv.prototype.calcMask=function(t){var t=w(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},rv.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=w(this.clampValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},rv.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=xy(this.attributes,"handle"),a=xy(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new j.Text({style:v(v(v({visibility:"hidden"},my),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,g="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:g,text:n}},rv.prototype.getHandleLabelShapeCfg=function(t){var e;return this.attributes.showLabel?(e=xy(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},rv.prototype.getHandleIconShapeCfg=function(){var t=this.attributes,e=t.orient,t=t.handleIconShape,n=xy(this.attributes,"handleIcon"),r=this.getOrientVal(["ew-resize","ns-resize"]),i=this.getHandleSize();return v(v({},n),{shape:t,orient:e,cursor:r,size:i})},rv.prototype.getHandleShapeCfg=function(t){var e=this.attributes,n=e.showHandle,e=e.showLabel,r=this.calcHandlePosition(t),i=r.x,r=r.y,a=this.calcHandleText(t);return v(v(v({zIndex:3,showLabel:e,visibility:n?"visible":"hidden"},ky(this.getHandleIconShapeCfg(),"icon")),ky(v(v({},this.getHandleLabelShapeCfg(t)),a),"label")),{x:i,y:r})},rv.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},rv.prototype.getOrientVal=function(t){var t=w(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},rv.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=w(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},rv.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},rv.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new j.CustomEvent(n,{detail:t}))})},rv.prototype.bindEvents=function(){var n=this,t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n.onDragStart(e)(t)}),t.on("touchstart",function(t){n.onDragStart(e)(t)})}),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},rv.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},rv.tag="slider",rv.defaultOptions={style:v(v(v({values:[0,1],trackLength:200,trackSize:20,slidable:!0,brushable:!0,scrollable:!0,orient:"horizontal",trackZIndex:-1,trackFill:"#416180",trackOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,showLabel:!0,handleSpacing:2,formatter:function(t){return t}},ky(Km,"handle")),ky(Um,"handleIcon")),ky(Xm,"handleLabel"))};var ev,nv=rv;function rv(t){var a=ev.call(this,bn({},rv.defaultOptions,t))||this;return a.range=[0,1],a.animation={duration:100,fill:"both"},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(Oy(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(Oy(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new j.CustomEvent("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}me(ov,iv=l),Object.defineProperty(ov.prototype,"padding",{get:function(){return py(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(ov.prototype,"value",{get:function(){var t=this.attributes.value,e=w(this.range,2),n=e[0],e=e[1];return nn(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(ov.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(ov.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=w(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=w(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(ov.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(ov.prototype,"thumbRadius",{get:function(){var t,e;return this.attributes.isRound?(t=(e=this.availableSpace).width,e=e.height,this.attributes.thumbRadius||this.getOrientVal([e,t])/2):0},enumerable:!1,configurable:!0}),ov.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=w(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},ov.prototype.getValue=function(){return this.value},ov.prototype.renderSlider=function(t){var e=this.attributes,n=e.orient,r=e.trackSize,i=e.padding,e=e.slidable,a=w(wy(this.attributes,["track","thumb"]),2),o=a[0],a=a[1],s=v(v({orient:n,padding:i,slidable:e,trackSize:r,brushable:!1,showHandle:!1,values:this.getValues(),trackLength:this.trackLength,trackRadius:this.trackRadius,selectionRadius:this.thumbRadius},ky(o,"track")),ky(a,"selection"));this.slider=S(t).maybeAppendByClassName("scrollbar",function(){return new nv({style:s})}).update(s).node()},ov.prototype.render=function(t,e){this.renderSlider(e)},ov.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.style.value,r=w(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(nn(t,i,r)),e),this.onValueChange(n)},ov.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},ov.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},ov.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},ov.tag="scrollbar",ov.defaultOptions={style:{value:0,trackSize:10,isRound:!0,slidable:!0,scrollable:!0,orient:"vertical",padding:[2,2,2,2]}};var iv,av=ov;function ov(t){var a=iv.call(this,bn({},ov.defaultOptions,t))||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.style.value;t!==e&&(a.dispatchEvent(new j.CustomEvent("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new j.CustomEvent("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=w(a.getLocalPosition(),2))[0],e=e[1],n=(i=w(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(Oy(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new j.CustomEvent("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new j.CustomEvent("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new j.CustomEvent("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new j.CustomEvent("trackMouseleave",{detail:t.detail}))},a}function sv(t,e){return sm(t,{opacity:0},e)}function lv(t,e){t?t.finished.then(e):e()}var cv={style:{data:[],animate:{duration:100,easing:"ease-in-out-sine",fill:"both"},dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",showArrow:!0,lineArrow:new j.Path({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},uv=(bn({},cv,{style:{type:"arc"}}),bn({},cv,{style:{}}),Jy({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis")),fv=Jy({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function hv(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function dv(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?hv(r):e?(i=Ly(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=w(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):hv(t)}function pv(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=w([dv(t,n),dv(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=w([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=w([Ly(e,o),Ly(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function gv(t,e,n){var r=n.animate,i=(n.type,n.center,n.connect),a=n.areaFill;if(n.closed,!(e.length<2)&&a&&i){for(var o=Array.isArray(a)?a:[a,"transparent"],s=[],l=0;l<e.length-1;l++){var c=w([e[l].points,e[l+1].points],2),c=pv(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}t.selectAll(fv.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=Uy(t,[t,e,s]);this.attr(t)}).attr("className",fv.region.name)},function(t){return t.each(function(t,e){sm(this,Uy(t,[t,e,s]),r.update)})},function(t){return t.each(function(){return ve(this,void 0,void 0,function(){return be(this,function(t){switch(t.label){case 0:return[4,sv(this,r.exit)];case 1:return t.sent(),this.remove(),[2]}})})})})}}me(vv,yv=l),vv.prototype.render=function(t,e){t.class;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.animate,t.type,t.center,t.areaFill,t.closed,Q(t,["class","items","animate","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=w(e),r=n[0];return n.slice(1),v(v({},t),{points:k(k([],w(e),!1),[r],!1)})}):o),l=S(e).maybeAppendByClassName(fv.lineGroup,"g"),e=S(e).maybeAppendByClassName(fv.regionGroup,"g");l=l,r=s,i=(n=t).animate,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:dv(t.points,n)}}),l.selectAll(fv.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").attr("className",fv.line.name).styles({stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]}).each(function(t,e){t=Uy(v({path:t.path},r),[t,e,a]);this.attr(t)})},function(t){return t.each(function(t,e){sm(this,Uy(v({path:t.path},r),[t,e,a]),i.update)})},function(t){return t.each(function(){var e;return ve(this,void 0,void 0,function(){return be(this,function(t){switch(t.label){case 0:return[4,null==(e=sv(this,i.exit))?void 0:e.finished];case 1:return t.sent(),this.remove(),[2]}})})})}),gv(e,o,t)};var yv,mv=vv;function vv(){return null!==yv&&yv.apply(this,arguments)||this}function bv(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=w(t,2);return[t[0],Uy(t[1],e)]}))}function xv(t,e){return e&&qe(e)?t.filter(e):t}var wv=pn(function(t,e){var e=w(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return k([t],w(e.angleRange),!1).join()}),kv=pn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=w(e.startPos,2))[0],n=n[1],i=w(e.endPos,2),de([0,0],[(r=w([i[0]-r,i[1]-n],2))[0],r[1]])):(i=Hy(wv(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?k(k([],w(n.startPos),!1),w(n.endPos),!1):k(k(k([],w(n.angleRange),!1),w(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function Mv(t,e,n){var t=kv(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var Ov=pn(function(t,e){var n=w(e.startPos,2),r=n[0],n=n[1],e=w(e.endPos,2),e=w([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return k(k([t],w(e.startPos),!1),w(e.endPos),!1).join()}),_v=pn(function(t,e){var n=e.radius,r=w(e.center,2),i=r[0],r=r[1],t=Hy(wv(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return k(k(k([t],w(e.angleRange),!1),[e.radius],!1),w(e.center),!1).join()});function Sv(t,e){return("linear"===e.type?Ov:_v)(t,e)}function Ev(t,e){return e-t==360}function Av(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=w([i,i],2),l=s[0],s=s[1],c=w([Hy(t),Hy(e)],2),u=c[0],c=c[1],f=w(a(u),2),h=f[0],f=f[1],d=w(a(c),2),p=d[0],d=d[1];return(Ev(t,e)?(u=(c=w(a((c+u)/2),2))[0],c=c[1],"M".concat(h,",").concat(f," A ").concat(l,",").concat(s," 0 1,0 ").concat(u,", ").concat(c," A ").concat(l,",").concat(s," 0 1,0 ").concat(p,", ")):(u=180<o?1:0,c=e<t?0:1,"M".concat(h,",").concat(f,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,","))).concat(d)}function Tv(t,e,n,s){var l=e.angleRange,c=e.center,u=e.radius;return t.selectAll(uv.line.class).data([{path:Av.apply(void 0,k(k(k([],w(l),!1),w(c),!1),[u],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",uv.line.name).styles(v({angleRange:l,center:c,radius:u},n)).style("path",function(t){return t.path})},function(t){return t.styles(n).transition(function(){var t,r,e,n,i,a=this,o=(n=(e=(e=t=this).attributes).angleRange,o=e.center,e=e.radius,n=k(k(k([],w(n),!1),w(o),!1),[e],!1),o=k(k(k([],w(l),!1),w(c),!1),[u],!1),(e=s.update)?(i=void 0===(i=e.duration)?0:i,r=um(n,o),o=Math.ceil(+i/16),i=new Array(o).fill(0).map(function(t,e,n){return{__keyframe_data__:r(e/(n.length-1))}}),t.animate(i,e)):(t.attr("__keyframe_data__",n),null));return o&&(o.onframe=i=function(){var t=wn(a.style,"__keyframe_data__");a.style.path=Av.apply(void 0,k([],w(t),!1))},o.onfinish=i),o}).styles({angleRange:l,center:c,radius:u})},function(t){return t.remove()}).styles(n).transitions()}function Pv(t){var t=w(t,2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function Lv(e,t,n,r){function i(t){return e.selectAll(uv.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(uv.line.name," ").concat(t.className)}).styles(n).transition(function(t){return sm(this,Pv(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return sm(this,Pv(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.startPos,c=t.endPos,u=t.truncRange,f=t.lineExtension,h=w([l,c],2),d=w(h[0],2),p=d[0],d=d[1],h=w(h[1],2),g=h[0],h=h[1],c=w(f?(l=w([l=l,c=c,f=void 0===(f=f)?[0,0]:f],3),f=(c=w(l[0],2))[0],c=c[1],y=(a=w(l[1],2))[0],a=a[1],m=(l=w(l[2],2))[0],l=l[1],f=(y=w([y-f,a-c],2))[0],a=y[1],c=Math.sqrt(Math.pow(f,2)+Math.pow(a,2)),m=(y=w([-m/c,l/c],2))[0],l=y[1],[m*f,m*a,l*f,l*a]):new Array(4).fill(0),4),y=c[0],m=c[1],f=c[2],l=c[3];return u?(c=(a=w(u,2))[0],u=a[1],s=(c=w([p+(g-p)*c,d+(h-d)*c],2))[0],c=c[1],o=(u=w([p+(g-p)*u,d+(h-d)*u],2))[0],u=u[1],s=i([{line:[[p+y,d+m],[s,c]],className:uv.lineFirst.name},{line:[[o,u],[g+f,h+l]],className:uv.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,s):i([{line:[[p+y,d+m],[g+f,h+l]],className:uv.line.name}])}function Nv(t,e,n,r){var i,a,o,s,l,c=e.type,r=("linear"===c?Lv:Tv)(t,e,n,r);return t=t,c=c,n=n,i=(e=e).showArrow,a=e.lineArrow,o=e.truncRange,s=void 0===(s=e.lineArrowOffset)?0:s,l=e.lineArrowSize,c="arc"!==c&&o?t.select(uv.lineSecond.class):t.select(uv.line.class),!i||!a||"arc"===e.type&&Ev.apply(void 0,k([],w(e.angleRange),!1))?c.style("markerEnd",null):((o=Gy(a)).attr(n),om(o,l,!0),c.style("markerEnd",o).style("markerEndOffset",-s)),r}function Cv(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function jv(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=w(Sv(t,r),2),n=e[0],e=e[1],t=w(fe([0,0],Mv(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function Bv(t,e,n,r,i){var a=r.type,o=r.closed,s=r.areaFill,l=r.connect,c=Cv(n),u=xv(e,n.gridFilter),e="segment"===a?jv(u,n):function(t,a,e){var o,s,l=e.controlAngles;if(!(e=Cv(a)))throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(l&&0!==l.length)return e=w(e,2),o=e[0],s=e[1],t.map(function(t){var t=w(Sv(t.value,a),2),e=t[0],t=t[1],e=w([e-o,t-s],2),n=e[0],r=e[1],i=[];return l.forEach(function(t){var t=Hy(t),t=w([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];i.push([n*e-r*t+o,n*t+r*e+s])}),{points:i}});throw new Error("Invalid gridControlAngles")}(u,n,r);t.maybeAppendByClassName(uv.grid,function(){return new mv({})}).update(v(v({type:a,animate:i,connect:l,closed:o,center:c},r),{items:e,areaFill:qe(s)?u.map(function(t,e){return Uy(s,[t,e,u])}):s}))}Object.defineProperty(Rv.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Rv.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Rv.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Rv.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Rv.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Rv.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Rv.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Rv.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Rv.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Rv.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Fv=Rv;function Rv(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function Iv(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=w(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=w(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function Dv(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),w(n,4)),c=p[0],g=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-g,u+l+n,f+i+(void 0===c?g:c)),e.setEulerAngles(r),t.rotatedPoints(Hy(r),h,d)}function zv(t,a){var o;return k([],w(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=Dv(new Fv,n,i),Iv(r=Dv(new Fv,r,i),[n[0],n[1],n[2],n[3]])||Iv(r,[n[0],n[1],n[4],n[5]])||Iv(r,[n[4],n[5],n[6],n[7]])||Iv(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var Wv=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var Gv=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=Wv,f=2,h=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,k([1],w(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==kv(0,n)[1]&&0!==kv(0,n)[0]||(n=Py(t[0]).left,t=Py(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*g/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse());zv((l?k(k([l],w(d),!1),[s],!1):k([s],w(d),!1)).filter(function(t){return Wy(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=u(((c=h).forEach(r.show),c),{seq:f}),f++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return zv(t,s).length<1}function a(n){t.forEach(function(t,e){e=Ue(n)?n[e]:n;x(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,e=void 0===(l=e.recoverWhenFailed)||l,l=t.map(function(t){return+(qy(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;e&&a(l)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=r.getTextShape(t[0]),d=e.style.fontFamily||"sans-serif",y=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:y,fontStyle:i,fontVariant:a}),f=fy(c,e)||1,h=fy(s,e)||1,d=fy(l,e),p=(!x(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),g=t.slice(),y=w(u,4),m=(y[0],y[1],y[2],y[3],d);h+f<m;m-=f){var v=function(e){return g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=zv(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function Hv(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=Gv.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function Vv(t){for(var e=t;e<0;)e+=360;return e%360}var qv=pn(function(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1],n=w([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return k(k([],w(t),!1),w(e),!1).join()});function Yv(t,e){return Mv(t,e.labelDirection,e)}function $v(t,e,n){var r,i=n.labelAlign,e=qy(e,"rotate");return e?+e%180:(e=0,r=Yv(t.value,n),t=kv(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?qv([1,0],r):qv([t[0]<0?-1:1,0],t),$y(n=((n=Vy(e))+360)%180,-90,90)||(n+=180),n))}function Uv(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=Yv(t,n),n=Vv(e),e=Vv(Vy(qv([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":$y(n,90,270)?$y(e,90,270)?"start":"end":$y(e,90,270)?"end":"start";if(0===e){if($y(n,0,90,!1,!0))return"start";if($y(n,0,90)||$y(n,270,360))return"start"}if(90===e){if($y(n,0,90,!1,!0))return"start";if($y(n,90,180)||$y(n,270,360))return"end"}if(270===e){if($y(n,0,90,!1,!0))return"end";if($y(n,90,180)||$y(n,270,360))return"start"}if(180===e){if(90===n)return"start";if($y(n,0,90)||$y(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(uv.labelItem.class);"text"===(null==n?void 0:n.nodeName)&&S(n).style("textAlign",t)}function Xv(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=Uy(r.labelSpacing,[t,e,n]),s=w([Yv(t.value,r),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(s,o)],2),o=w(le([0,0],fe([0,0],s[0],l+(1===s[1]?Uy(i?a:0,[t,e,n]):0)),Sv(t.value,r)),2);return{x:o[0],y:o[1]}}function Kv(n){Hv(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){Uv(+e,t,n)},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&tm(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function Zv(t,e,n,r,i,a){var o,s=wn(e,"_elements");0!==s.length&&(o=wn(e,"_transitions"),(e=s.map(function(t){return function(t,e,n,r,i,a){var o=this,s=S(this).append(t.element).attr("className",uv.labelItem.name).node(),l=(i=w(My(bv(i,[t,e,n])),2))[0],c=(i=i[1]).transform,i=Q(i,["transform"]);return"text"===(null==s?void 0:s.nodeName)&&s.attr(v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textAlign:"center",textBaseline:"middle"},l)),this.attr(i),lv(s=sm(this,Xv(t,e,n,r),a),function(){Yy(o,c),Uv($v(t,o,r),o,r)}),s}.call(t,t.__data__,0,n,r,i,a)})).forEach(function(t,e){return o[e]=t}),0===e.filter(function(t){return!!t}).length?Kv.call(t,r):Promise.all(e).then(function(){Kv.call(t,r)}))}function Jv(e,t,l,n,r){var i=xv(t,l.labelFilter).map(function(t,e,n){return v({element:(r=t,i=e,a=n,s=(o=l).labelFormatter,qe(s)?function(){return Gy(Uy(s,[r,i,a,Yv(r.value,o)]))}:function(){return Gy(r.label||"")})},t);var r,i,a,o,s});return e.selectAll(uv.label.class).data(i,function(t,e){return"".concat(t.value,"-").concat(t.label)}).join(function(t){return t.append("g").attr("className",uv.label.name).call(function(t){Zv(e,t,i,l,n,!1)})},function(t){return t.each(function(){S(this).node().removeChildren()}).call(function(t){Zv(e,t,i,l,n,r.update)})},function(t){return t.transition(function(){var t=this,e=sv(this,r.exit);return lv(e,function(){S(t).remove()}),e})}).transitions()}function Qv(t,e){return Mv(t,e.tickDirection,e)}var tb=pn(function(t,e){t=w(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return k(k([],w(t),!1),[e],!1).join()});function eb(t,e,n,r,i,a,o){var s=Qv(t.value,a),a=(l=t,c=e,u=n,s=s,a=(a=a).tickLength,s=w(tb(s,Uy(a,[l,c,u])),2),a=w(s[0],2),l=a[0],c=a[1],u=w(s[1],2),{x1:l,x2:u[0],y1:c,y2:u[1]}),s=a.x1,l=a.x2,c=a.y1,u=a.y2,a=w(My(bv(o,[t,e,n])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(v({x1:s,x2:l,y1:c,y2:u},o)),i.attr(t),r.styles(o)}function nb(t,e,n,r,i,a){o=S(this),s=t,l=e,c=n,f=(u=r).tickFormatter,h=Qv(s.value,u),u="line",f instanceof j.DisplayObject?u=function(){return f}:qe(f)&&(u=function(){return Uy(f,[s,l,c,h])});eb(t,e,n,o.append(u).attr("className",uv.tickItem.name),this,r,i);var o,s,l,c,u,f,h,e=w(Sv(t.value,r),2);return sm(this,{x:e[0],y:e[1]},a)}var rb={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"},ib=Jy({text:"text"},"title");function ab(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function ob(r,t){t=Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}me(cb,sb=l),cb.prototype.getAvailableSpace=function(){var t=this.attributes,r=t.width,i=t.height,e=t.position,n=t.spacing,t=t.inset,a=this.querySelector(ib.text.class);if(!a)return new em(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=w(py(n),4),l=a[0],c=a[1],u=a[2],f=a[3],n=w([0,0,+r,+i],4),h=n[0],d=n[1],p=n[2],g=n[3],a=ab(e);if(a.includes("i"))return new em(h,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=w(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=w([+r-o-f],1),p=n[0]),"b"===t&&(n=w([+i-s-l],1),g=n[0]),"l"===t&&(n=w(0===e?[o+c,+r-o-c]:[0,+r],2),h=n[0],p=n[1])});n=w(py(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=w([n+a,e+t],2),t=a[0],a=a[1];return new em(h+n,d+e,p-t,g-a)},cb.prototype.getBBox=function(){return this.title?this.title.getBBox():new em(0,0,0,0)},cb.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,t.class,Q(t,["width","height","position","spacing","class"])),u=w(My(c),1)[0],f=(f=(t=t).width,r=t.height,t=t.position,i=w([+f/2,+r/2],2),a=(i=w([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=ab(t)).includes("l")&&(a=(n=w([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=w([+f,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(f=w([0,"top"],2))[0],i=f[1]),t.includes("b")&&(o=(n=w([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),h=f.x,d=f.y,p=f.textAlign,g=f.textBaseline;Xy(!!c.text,e,function(t){l.title=S(t).maybeAppendByClassName(ib.text,"text").styles(u).call(ob,{x:h,y:d,textAlign:p,textBaseline:g}).node()})};var sb,lb=cb;function cb(t){return sb.call(this,Cy({},{style:rb},t=void 0===t?{}:t))||this}function ub(t,e,n){var r,i,a,o,s,l,c,u,t=t.select(uv.mainGroup.class);return t=t,e=e,i=void 0===(i=(n=n).titlePosition)?"lb":i,a=void 0===(a=n.titleSpacing)?0:a,o=ab(i),s=(l=t.node().getBBox()).x,l=l.y,c=(t=w(t.node().getBounds().halfExtents,2))[0],t=t[1],u=(e=w(e.node().getBounds().halfExtents,2))[0],e=e[1],s=w([s+c,l+t],2),s=(l=w([s[0],s[1]],2))[0],l=l[1],["start","end"].includes(i)&&"linear"===n.type?(r=n.startPos,n=n.endPos,n=(i=w("start"===i?[r,n]:[n,r],2))[0],r=(i=w(fe([0,0],de([0,0],[-(r=i[1])[0]+n[0],-r[1]+n[1]]),a),2))[0],i=i[1],{x:n[0]+r,y:n[1]+i}):(o.includes("l")&&(s-=c+u+a),o.includes("r")&&(s+=c+u+a),o.includes("t")&&(l-=t+e+a),o.includes("b")&&(l+=t+e+a),{x:s,y:l})}function fb(t,s,l,c,e){var u,f,n,r;return l.title?(t=w((t=t,n=(r=l).title,r=t.maybeAppendByClassName(uv.title,function(){return Gy(n)}),[t,r]),2),u=t[0],f=t[1],r=function(){var t=f,e=u,n=s,r=l,i=(a=w(My(a=c),2))[0],a=a[1],o=void 0===(o=a.transform)?"":o,a=Q(a,["transform"]);t.styles(i),e.styles(a),a=(i=ub(n,e,r)).x,n=i.y,e.node().setPosition(a,n),Yy(t,o)},e.update?((t=f.node().animate([],e.update))?(t.onframe=r,t.onfinish=r):r(),t):(r(),null)):null}me(pb,hb=l),pb.prototype.render=function(e,n,t){var r=yy(e),i=r.type,a=r.data,o=(r.class,r.dataThreshold),o=void 0===o?100:o,s=(r.crossSize,r.animate),l=(r.title,r.showTitle),c=(r.titleSpacing,r.truncRange),u=(r.truncShape,r.showLine),f=(r.lineExtension,r.lineArrow,r.lineArrowOffset,r.lineArrowSize,r.showTick),h=(r.tickDirection,r.tickLength,r.tickFilter,r.tickFormatter,r.showLabel),d=(r.labelAlign,r.labelDirection,r.labelSpacing,r.labelFilter,r.labelFormatter,r.labelTransforms,r.showGrid),r=(r.gridFilter,r.gridLength,Q(r,["type","data","class","dataThreshold","crossSize","animate","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),i=w(wy("linear"===i?(r.startPos,r.endPos,Q(r,["startPos","endPos"])):(r.angleRange,r.radius,r.center,Q(r,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),p=i[0],g=i[1],y=i[2],m=i[3],v=i[4],b=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(a,o).filter(function(t){t=t.value;return!(c&&t>c[0]&&t<c[1])}),x=(r=void 0===t?s:t)?"enter"in r||"update"in r||"exit"in r?r:{enter:r,update:r,exit:r}:{enter:!1,update:!1,exit:!1},i=(Xy(d,S(n).maybeAppendByClassName(uv.gridGroup,"g"),function(t){return Bv(t,b,e,v,x)}),S(n).maybeAppendByClassName(uv.mainGroup,"g")),a=Xy(u,i.maybeAppendByClassName(uv.lineGroup,"g"),function(t){return Nv(t,e,g,x)})||[],o=Xy(f,i.maybeAppendByClassName(uv.tickGroup,"g"),function(t){return t=t,r=y,i=x,a=xv(b,(n=e).tickFilter),t.selectAll(uv.tick.class).data(a,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",uv.tick.name).transition(function(t,e){return nb.call(this,t,e,a,n,r,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),nb.call(this,t,e,a,n,r,i.update)})},function(t){return t.transition(function(){var t=this,e=sv(this,i.exit);return lv(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],s=Xy(h,i.maybeAppendByClassName(uv.labelGroup,"g"),function(t){return Jv(t,b,e,m,x)})||[],t=Xy(l,S(n).maybeAppendByClassName(uv.titleGroup,"g"),function(t){return fb(t,S(n),e,p,x)});return k(k(k(k([],w(a),!1),w(o),!1),w(s),!1),[t],!1).filter(function(t){return!!t})};var hb,db=pb;function pb(t){return hb.call(this,Cy({},cv,t))||this}var gb,yb={effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",($a=0)-(Ps=6),(Ns=0)-Ps],["L",$a+Ps,Ns],["L",$a-Ps,Ns+Ps],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},mb=Jy({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),vb=(me(bb,gb=l),Object.defineProperty(bb.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return nn(void 0===t?0:t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=w((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,k([],w(t),!1))})),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),bb.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(bb.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"finished",{get:function(){var t,e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),bb.prototype.getBBox=function(){var t=gb.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new em(e,t,i+n.width,r)},bb.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,t=t.effect,i=this.currPage,a=this.playState,o=(this.finished,this.playWindow),s=this.pageViews;return"idle"!==a||e<0||s.length<=0||e>=s.length||(s[i].setLocalPosition(0,0),this.prepareFollowingPage(e),a={duration:r,easing:t,fill:"both"},i=(s=w(this.getFollowingPageDiff(e),2))[0],r=s[1],this.playState="running",Promise.all([o.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-i,", ").concat(-r,")")}],a)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n.innerCurrPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:this.finished}},bb.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?{finished:this.finished}:(t=t?(n-1+e)%e:nn(n-1,0,e),this.goTo(t))},bb.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?{finished:this.finished}:(t=t?(n+1)%e:nn(n+1,0,e),this.goTo(t))},bb.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;this.clipPath=t.maybeAppendByClassName(mb.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())},bb.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},bb.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,w("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=w(i.offset,3),o=w(a[0],2),s=o[0],c=o[1],l=w(a[1],2),r=l[0],o=l[1],l=w(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},bb.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(mb.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},bb.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orient,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},bb.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=w(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},bb.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(mb.controller,"g").style("visibility",u?"visible":"hidden");u&&(i=(u=w(wy(this.attributes,["button","pageNum"]),2))[0],u=u[1],r=(i=w(My(i),2))[0],i=i[1],e=r.size,n=Q(r,["size"]),r=t.maybeAppendByClassName(mb.prevBtnGroup,"g").styles(i),this.prevBtnGroup=r.node(),a=r.maybeAppendByClassName(mb.prevBtn,"path"),i=t.maybeAppendByClassName(mb.nextBtnGroup,"g").styles(i),this.nextBtnGroup=i.node(),[a,i.maybeAppendByClassName(mb.nextBtn,"path")].forEach(function(t){t.styles(v(v({},n),{transformOrigin:"center"})),om(t.node(),e,!0)}),a=t.maybeAppendByClassName(mb.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(mb.pageInfo,"text").styles(v(v({},my),u)),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),r.on("click",function(){o.prev()}),i.on("click",function(){o.next()}))},bb.prototype.render=function(t,e){e=S(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},bb.prototype.bindEvents=function(){function t(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}var r,i,a,o,e=this;r=function(){return e.render(e.attributes,e)},i=50;this.playWindow.addEventListener(j.ElementEvent.INSERTED,t),this.playWindow.addEventListener(j.ElementEvent.REMOVED,t)},bb);function bb(t){t=gb.call(this,Cy({},{style:yb},t))||this;return t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t.contentGroup=t.appendChild(new j.Group({class:mb.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new j.Group({class:mb.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function xb(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}xm.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),xm.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),xm.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var wb,kb=Jy({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),Mb={span:[1,1],marker:function(){return new j.Circle({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},Ob=(me(_b,wb=l),Object.defineProperty(_b.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(en(t)||rn(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,n=void 0===n?0:n,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height;return{markerWidth:n,labelWidth:r,valueWidth:i,height:Math.max(n,t,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=w(py(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=w(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=w(this.span,2),a=(e=w([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=w(py(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=w(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),_b.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=xy(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(kb.markerGroup,"g"),Xy(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(kb.marker,r).styles(a),om(e.markerGroup.node(),i,!0)})},_b.prototype.renderLabel=function(t){var e=this.attributes.label,n=xy(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(kb.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(kb.label,function(){return Gy(e)}).styles(n)},_b.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=xy(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(kb.valueGroup,"g"),Xy(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(kb.value,function(){return Gy(n)}).styles(r)})},_b.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=xy(this.attributes,"background");this.background=t.maybeAppendByClassName(kb.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(kb.background,"rect").styles(v({width:n,height:e},r))},_b.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=w(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),tm(this.labelGroup.select(kb.label.class),e),this.showValue&&(this.valueGroup.styles({x:t,y:r}),tm(this.valueGroup.select(kb.value.class),n))},_b.prototype.render=function(t,e){e=S(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},_b);function _b(t){return wb.call(this,Cy({},{style:Mb},t))||this}function Sb(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var Eb,Ab=Jy({page:"item-page",navigator:"navigator",item:"item"},"items"),Tb={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:vn,mouseenter:vn,mouseleave:vn},Pb=(me(Lb,Eb=l),Object.defineProperty(Lb.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(Lb.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,s=xy(this.attributes,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:v({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=w(t,2);return[t[0],Uy(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Lb.prototype.getGridLayout=function(){var u=this,t=this.attributes,f=t.orient,h=t.width,d=t.rowPadding,p=t.colPadding,g=w(this.navigatorShape,1)[0],t=w(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),w(a,2)),o=a[0],a=a[1],s=(h-g-(m-1)*p)/m,t=t.getBBox().height,l=w([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=w([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=w([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},Lb.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=w(this.navigatorShape,1)[0],r=w(this.grid,2),s=r[0],l=r[1],r=w([e-t,n],2),c=r[0],u=r[1],e=w([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&Sb(g,function(t){return t<l})?(r=w([m+r,v,i],3),f=r[0],h=r[1],m=r[2]):(i=w([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&Sb(y,function(t){return t<s})?(r=w([m,v,n],3),f=r[0],h=r[1],m=r[2]):(i=w([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(Lb.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),Lb.prototype.ifHorizontal=function(t,e){return xb(this.attributes.orient,t,e)},Lb.prototype.flattenPage=function(e){e.querySelectorAll(Ab.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(Ab.page.class).forEach(function(t){e.removeChild(t).destroy()})},Lb.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));S(t).selectAll(Ab.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new Ob({style:t})}).attr("className",Ab.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("mouseenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("mouseleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},Lb.prototype.relayoutNavigator=function(){var t=this.attributes,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=w(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update(v({},"grid"===e?{pageWidth:t-i,pageHeight:n-r}:{}))},Lb.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=w(t,2);return{page:t[0],layouts:t[1]}}),u=k([],w(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new j.Group({className:Ab.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=en(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Xe(r[t])||(r[t]=rn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},Lb.prototype.renderNavigator=function(t){var e=this.attributes.orient,n=xy(this.attributes,"nav"),n=v(v({},n),{orient:e});return this.navigator=t.maybeAppendByClassName(Ab.navigator,function(){return new vb({})}).update(n).node(),this.navigator},Lb.prototype.getBBox=function(){return this.navigator.getBBox()},Lb.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(S(e)),this.renderItems(n.getContainer()),this.adjustLayout())},Lb.prototype.dispatchCustomEvent=function(t,e){t=new j.CustomEvent(t,{detail:e});this.dispatchEvent(t)},Lb);function Lb(t){t=Eb.call(this,Cy({},{style:Tb},t))||this;return t.navigatorShape=[0,0],t}var Nb,Cb=Jy({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),jb=v(v({},ky(my,"label")),{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}),Bb=(me(Fb,Nb=l),Fb.prototype.render=function(t,e){var n=S(e).maybeAppendByClassName(Cb.markerGroup,"g"),n=(this.renderMarker(n),S(e).maybeAppendByClassName(Cb.labelGroup,"g"));this.renderLabel(n)},Fb.prototype.attributeChangedCallback=function(){this.render(this.attributes,this)},Fb.prototype.renderMarker=function(t){var n=this,e=this.attributes,r=e.orient,e=e.markerSymbol,i=void 0===e?xb(r,"horizontalHandle","verticalHandle"):e;Xy(!!i,t,function(t){var e=xy(n.attributes,"marker"),e=v({symbol:i},e);n.marker=t.maybeAppendByClassName(Cb.marker,function(){return new xm({})}).update(e)})},Fb.prototype.renderLabel=function(t){var s=this,e=this.attributes,l=e.orient,n=e.spacing,c=void 0===n?0:n,n=e.showLabel,u=e.formatter;Xy(n,t,function(t){var e=xy(s.attributes,"label"),n=e.text,e=Q(e,["text"]),r=(null==(r=t.select(Cb.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=w(xb(l,[0,(void 0===r?0:r)+c,"center","top"],[(void 0===i?0:i)+c,0,"start","middle"]),4),i=r[0],a=r[1],o=r[2],r=r[3];t.maybeAppendByClassName(Cb.label,"text").styles(v(v({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},Fb);function Fb(t){return Nb.call(this,Cy({},{style:jb},t))||this}var Rb,Rs={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},Ib=bn({},Rs,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),Db=bn({},Rs,ky(jb,"handle"),{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,labelAlign:"value",labelDirection:"positive",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),zb=Jy({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),Wb=(me(Gb,Rb=l),Gb.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=w(My(xy(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(zb.titleGroup,"g").styles(a),v(v({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(zb.title,function(){return new lb({style:s})}).update(s)},Gb.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=w(wy(this.attributes,["title"]),2),a=w(My(a[1]),2),o=a[0],a=a[1],o=v(v({},o),{width:i,height:e});this.itemsGroup=t.maybeAppendByClassName(zb.itemsGroup,"g").styles(v({x:n,y:r},a)),this.items=this.itemsGroup.maybeAppendByClassName(zb.items,function(){return new Pb({style:{data:[]}})}),this.items.node().update(o)},Gb.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.title.node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Gb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new em(0,0,n,t)},enumerable:!1,configurable:!0}),Gb.prototype.getBBox=function(){return t=this.title.node(),e=this.items.node(),n=(i=t.attributes).position,r=i.spacing,i=i.inset,a=t.getBBox(),o=e.getBBox(),n=ab(n),r=(t=w(py(t.attributes.text?r:0),4))[0],s=t[1],l=t[2],t=t[3],c=(i=w(py(i),4))[0],u=i[1],f=i[2],i=i[3],s=(t=w([t+s,r+l],2))[0],r=t[1],t=(l=w([i+u,c+f],2))[0],i=l[1],"l"===n[0]?new em(a.x,a.y,o.width+a.width+s+t,Math.max(o.height+i,a.height)):"t"===n[0]?new em(a.x,a.y,Math.max(o.width+t,a.width),o.height+a.height+r+i):(c=(u=w([e.attributes.width||o.width,e.attributes.height||o.height],2))[0],f=u[1],new em(o.x,o.y,c+a.width+s+t,f+a.height+r+i));var t,e,n,r,i,a,o,s,l,c,u,f},Gb.prototype.render=function(t,e){var n=t.width,t=t.height,e=S(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},Gb);function Gb(t){return Rb.call(this,Cy({},Ib,t))||this}var Hb,Vb={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},qb=Jy({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Yb=(me($b,Hb=l),$b.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.style).position,o=(i=w(py(i.padding),4))[0],e=i[1],n=i[2],i=i[3],a=(r=this.label.node().getLocalBounds()).min,r=r.max,i=[[a[0]-i,a[1]-o],[r[0]+e,r[1]+n]],a=this.getPath(t,i),o=xy(this.attributes,"background"),this.background=S(this.group).maybeAppendByClassName(qb.background,"path").styles(v(v({},o),{path:a})),this.group.appendChild(this.label.node()))},$b.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=w(My(xy(this.attributes,"label")),2),r=t[0],t=t[1];this.label=S(this.group).maybeAppendByClassName(qb.labelGroup,"g").styles(t),e&&this.label.maybeAppendByClassName(qb.label,function(){return Gy(n(e))}).style("text",n(e).toString()).selectAll("text").styles(v(v({},my),r))},$b.prototype.adjustLayout=function(){var t=w(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},$b.prototype.getPath=function(n,t){var r=this,t=w(t,2),e=w(t[0],2),i=e[0],e=e[1],t=w(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=w(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[k(["M"],w(t[0]),!1),k(["L"],w(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},$b.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=w(t,2))[0],t=t[1],r=(e=w(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,k([],w(t),!1)),t=w(t,2),r=w(t[0],2),i=r[0],r=r[1],t=w(t[1],2),a=t[0],t=t[1],a=w(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=w(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=w([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},$b.prototype.bindEvents=function(){this.label.on(j.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},$b.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},$b);function $b(t){t=Hb.call(this,Cy({},{style:v({visibility:"hidden"},Vb)},t))||this;return t.point=[0,0],t.group=t.appendChild(new j.Group({})),t.isMutationObserved=!0,t}function Ub(t,e){var t=w(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var Xb=Jy({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Kb(t){var e=t.orient,n=t.size,t=t.len;return xb(e,[t,n],[n,t])}function Zb(t){var e=t.type,t=w(Kb(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function Jb(t){var i,a,o,e=t.orient,r=t.color,n=t.block,t=t.partition,s=(l=qe(r)?new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))}):r).length,l=l.map(function(t){return j.parseColor(t).toString()});return s?1===s?l[0]:n?(i=t,n=e,a=Array.from(l),o=i.length,new Array(o).fill(0).reduce(function(t,e,n){var r=a[n%a.length];return t+" ".concat(i[n],":").concat(r).concat(n<o-1?" ".concat(i[n+1],":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):l.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(xb(e,"0","270"),")")):""}function Qb(t,e,n){var r,i,a,o=Jb(e),t=t.maybeAppendByClassName(Xb.selection,"path").styles(v({path:Zb(e),fill:o},n)),n=t.maybeAppendByClassName(Xb.clipPath,"path").styles({path:(n=(o=e).orient,(e=o.range)?(i=(o=w(Kb(o),2))[0],o=o[1],r=(e=w(e,2))[0],e=e[1],a=xb(n,r*i,0),r=xb(n,0,r*o),i=xb(n,e*i,i),[["M",a,r],["L",a,a=xb(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var t2,e2,n2,r2,i2=Zy({render:function(t,e){var n,r=w(wy(t,["selection","track"]),2),i=r[0],r=r[1],a=S(e).maybeAppendByClassName(Xb.trackGroup,"g");n=t,r=r,a.maybeAppendByClassName(Xb.track,"path").styles(v({path:Zb(n)},r)),Qb(S(e).maybeAppendByClassName(Xb.selectionGroup,"g"),t,i)}},v({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})),a2=pn(function(t){return{min:Math.min.apply(Math,k([],w(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,k([],w(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),o2=(me(f,t2=l),Object.defineProperty(f.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),f.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new em(0,0,e,t)},f.prototype.render=function(t,e){var n=this,r=(this.renderTitle(S(e)),this.title.node().getAvailableSpace()),i=r.x,r=r.y,t=t.showLabel,e=S(e).maybeAppendByClassName(zb.contentGroup,"g").styles({x:i,y:r}),i=(Xy(!!t,e.maybeAppendByClassName(zb.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(zb.ribbonGroup,"g"));this.handlesGroup=e.maybeAppendByClassName(zb.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(f.prototype,"range",{get:function(){var t=this.attributes.data;return a2(t)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonRange",{get:function(){var t=w(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=w(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),f.prototype.ifHorizontal=function(t,e){return xb(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},f.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,r=void 0===r?"":r,i=e.width,e=e.height,a=xy(this.attributes,"title"),o=v(v({width:i,height:e},a),{text:n?r:""});this.title=t.maybeAppendByClassName(zb.title,function(){return new lb({style:o})}).update(o)},Object.defineProperty(f.prototype,"labelFixedSpacing",{get:function(){return this.attributes.labelShowTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][t]},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(uv.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new em(0,0,t,e)),this.cacheLabelBBox):new em(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelShape",{get:function(){var t,e=this.attributes,n=e.showLabel,e=e.labelSpacing,e=void 0===e?0:e;return n?{width:t=(n=this.labelBBox).width,height:n=n.height,size:this.ifHorizontal(n,t)+e+this.labelFixedSpacing,len:this.ifHorizontal(t,n)}:{width:0,height:0,size:0,len:0}},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.title.node().getAvailableSpace(),n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.len,n=w(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,len:0},a=t.size,t=t.len,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=w(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=w(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new em(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,t=t.height;return this.ifHorizontal({size:t,len:e},{size:e,len:t})},enumerable:!1,configurable:!0}),f.prototype.renderRibbon=function(t){var e=this.attributes,n=e.type,r=e.orient,i=e.color,a=e.block,e=e.data,o=xy(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,f=this.ribbonShape,h=f.len,f=f.size;this.ribbon=t.maybeAppendByClassName(zb.ribbon,function(){return new i2({})}).update(v({x:u,y:s,len:h,size:f,type:n,orient:r,color:i,block:a,partition:e.map(function(t){return(t.value-l)/(c-l)}),range:this.ribbonRange},o))},f.prototype.getHandleClassName=function(t){return"".concat(zb.prefix("".concat(t,"-handle")))},f.prototype.renderHandles=function(){var e=this,t=this.attributes,n=t.showHandle,t=t.orient,r=xy(this.attributes,"handle"),r=(r.formatter,Q(r,["formatter"])),i=w(this.selection,2),a=i[0],i=i[1],o=v({orient:t},r),s=this;this.handlesGroup.selectAll(zb.handle.class).data(n?[{value:a,type:"start"},{value:i,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new Bb({})}).attr("className",function(t){return"".concat(zb.handle," ").concat(e.getHandleClassName(t.type))}).styles(o).style("labelText",function(t){return t.value}).each(function(t){var e=S(this);"start"===t.type?s.startHandle=e:s.endHandle=e})},function(t){return t.styles(o).style("labelText",function(t){return t.value})},function(t){return t.remove()})},f.prototype.adjustHandles=function(){var t=w(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(f.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new em(0,0,0,0);var t=this.startHandle.node().getBBox(),e=t.width,t=t.height,n=this.endHandle.node().getBBox(),r=n.width,n=n.height,e=w([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new em(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=w(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],len:n[1]}},enumerable:!1,configurable:!0}),f.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,r=r.y,a=this.ribbonShape.size,e=this.getOffset(e),i=w(this.ifHorizontal([i+e,r+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,r+e]),2),a=i[0],r=i[1],e=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null!=e&&e.attr("formatter",n),null!=e&&e.setLocalPosition(a,r)},f.prototype.renderIndicator=function(t){var e=xy(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(zb.indicator,function(){return new Yb({style:e})}).update(e)},Object.defineProperty(f.prototype,"labelData",{get:function(){var s=this;return this.attributes.data.reduce(function(t,e,n,r){var i,a,o=null!=(o=null==e?void 0:e.id)?o:n.toString();return t.push(v(v({},e),{id:o,index:n,type:"value",label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:s.ribbonScale.map(e.value)})),n<r.length-1&&(i=r[n+1],a=((i=(r=w([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(v(v({},e),{id:o,index:n,type:"range",range:[i,r],label:[i,r].join("~"),value:s.ribbonScale.map(a)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"labelStyle",{get:function(){var t=w(["center","middle"],2),e=t[0],t=t[1],n=this.labelPosition;return"top"===n?t="bottom":"bottom"===n?t="top":"left"===n?e="end":"right"===n&&(e="start"),{labelTextAlign:e,labelTextBaseline:t}},enumerable:!1,configurable:!0}),f.prototype.renderLabel=function(t){var e=xy(this.attributes,"label"),n=e.formatter,r=e.filtrate,i=(e.filter,e.align),a=e.labelDirection,o=(e.tickLength,e.showTick),o=void 0!==o&&o,e=w(wy(Q(e,["formatter","filtrate","filter","align","labelDirection","tickLength","showTick"]),["tick"]),2),s=e[0],e=e[1],o=v(v(v({type:"linear",startPos:[0,0],endPos:[0,0],data:this.labelData,showLine:!1,showGrid:!1,showTick:o,tickDirection:a,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(s).map(function(t){var t=w(t,2),e=t[0],t=t[1];return["tick".concat(Qy(e)),t]}))),Object.fromEntries(Object.entries(e).map(function(t){var t=w(t,2),e=t[0],t=t[1];return["label".concat(Qy(e)),t]}))),a={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===i&&(!r||r(t,t.index,n.filter(function(t){return t.type===i})))},labelFormatter:n},l=v(v({},o),a);this.label=t.maybeAppendByClassName(zb.label,function(){return new db({style:l})}).node(),this.label.update(l,!1)},Object.defineProperty(f.prototype,"labelAxisCfg",{get:function(){var t=this.attributes,e=t.labelDirection,n=t.labelShowTick,t=t.labelSpacing,r=this.ribbonShape.size,i=this.labelPosition,a=this.labelFixedSpacing,o=w([0,0,0],3),s=o[0],l=o[1],o=o[2],c=r+t;return n?(o=c,l=a,"positive"===e?"right"===i?o=s=c:"bottom"===i&&(s=o):"negative"!==e||"top"!==i&&"left"!==i||(s=r)):"positive"===e?"right"===i?l=c:"bottom"===i&&(s=r+a,l=t):"negative"!==e||"left"!==i&&"top"!==i||(l=t),{offset:s,spacing:l,tickLength:o}},enumerable:!1,configurable:!0}),f.prototype.adjustLabel=function(){var t,e,n,r,i,a,o;this.attributes.showLabel&&(o=(a=this.ribbonBBox).x,t=a.y,i=a.width,a=a.height,e=(r=this.labelAxisCfg).offset,n=r.spacing,r=r.tickLength,a=(i=w(this.ifHorizontal([[o,t+e],[o+i,t+e]],[[o+e,t+a],[o+e,t]]),2))[0],o=i[1],this.label.update({startPos:a,endPos:o,tickLength:r,labelSpacing:n},!1))},f.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},f.prototype.showIndicator=function(t,e){var n,r,i,a;void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t?(i=(a=this.range).min,a=a.max,n=(r=this.ribbonBBox).x,r=r.y,t=nn(t,i,a),i=this.getOffset(t),a=this.ifHorizontal([i+n,r],[n,i+r]),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(t=this.indicator.node()).setLocalPosition.apply(t,k([],w(a),!1))):this.hideIndicator()},f.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},f.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},f.prototype.setSelection=function(t,e){this.updateSelection(t,e)},f.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=w(this.selection,2),c=l[0],l=l[1],t=w([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=w((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=w(n,2))[0],n=n[1],a=(c=w(c,2))[0],c=c[1],o=(l=w(l,2))[0],l=l[1],c=(a=w([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=w([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[dy(c,r),dy(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(f.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return ln(t)?dy(.01*(e-n),0):t},enumerable:!1,configurable:!0}),f.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Ub(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},f.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=w(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,k([],w(Oy(t)),!1));return nn(this.getOffset(i-a,!0),r,n)},f.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.ribbonShape.len,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},f.prototype.dispatchSelection=function(){var t=new j.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},f.prototype.dispatchIndicated=function(t,e){t=new j.CustomEvent("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([Dy(100)],f.prototype,"dispatchSelection",null),t([Dy(100)],f.prototype,"dispatchIndicated",null),f);function f(t){var a=t2.call(this,Cy({},Db,t))||this;return a.eventToOffsetScale=new y0({}),a.innerRibbonScale=new y0({}),a.cacheLabelBBox=null,a.cacheHandleBBox=null,a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Ub(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),w(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function s2(t){e2||(e2=document.createElement("table"),r2=document.createElement("tr"),n2=/^\s*<(\w+|!)[^>]*>/,r2={tr:document.createElement("tbody"),tbody:e2,thead:e2,tfoot:e2,td:r2,th:r2,"*":document.createElement("div")});var e=n2.test(t)&&RegExp.$1,e=(e&&e in r2||(e="*"),r2[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var l2,ks="tooltip",c2="tooltip-title",u2="tooltip-list",Es="tooltip-list-item",Xa="tooltip-list-item-name",Os="tooltip-list-item-marker",f2="tooltip-list-item-name-label",_s="tooltip-list-item-value",Mc="tooltip-crosshair-x",n="tooltip-crosshair-y",Na={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},e=((a={})[".".concat(ks)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},a[".".concat(c2)]={color:"rgba(0, 0, 0, 0.45)"},a[".".concat(u2)]={margin:"0px","list-style-type":"none",padding:"0px"},a[".".concat(Es)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},a[".".concat(Os)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},a[".".concat(Xa)]={display:"flex","align-items":"center","max-width":"216px"},a[".".concat(f2)]=v({flex:1},Na),a[".".concat(_s)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Na),a[".".concat(Mc)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},a[".".concat(n)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},a),h2=(me(d2,l2=l),Object.defineProperty(d2.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),d2.prototype.getContainer=function(){return this.element},Object.defineProperty(d2.prototype,"position",{set:function(t){var t=w(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"items",{get:function(){return this.attributes.items.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=Q(t,["name","value","color","index"]);return v({name:n,value:r,color:i,index:null!=a?a:e},t)})},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"HTMLTooltipItemsElements",{get:function(){var r=this.attributes.template,i=[];return this.items.forEach(function(t){var e,n;i.push(s2((e=r.item,n=t,e&&n?e.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):e)))}),i},enumerable:!1,configurable:!0}),Object.defineProperty(d2.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return en(t)?Ny(t):cn(t)?t:void 0},enumerable:!1,configurable:!0}),d2.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},d2.prototype.update=function(t){this.attr(bn({},this.attributes,t)),this.render(this.attributes,this)},d2.prototype.clear=function(){this.element.innerHTML=""},d2.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},d2.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},d2.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},d2.prototype.initShape=function(){var t=this.attributes.template;this.element=s2(t.container),this.id&&this.element.setAttribute("id",this.id)},d2.prototype.renderHTMLTooltipElement=function(){var e,r,t=this.attributes,n=t.title,t=t.enterable,i=this.element,a=this.customContent,a=(this.element.style.pointerEvents=t?"auto":"none",this.clear(),a?i.appendChild(a):(t=this.attributes.template,n?(i.innerHTML=t.title,i.getElementsByClassName(c2)[0].innerHTML=n):null!=(t=null==(a=i.getElementsByClassName(c2))?void 0:a[0])&&t.remove(),n=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=u2,n.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=i,Object.entries(a).forEach(function(t){var t=w(t,2),e=t[0],n=t[1];k([r],w(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},d2.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,o=t.width,s=t.height,l=[-o/2,-s/2];return e.forEach(function(t){var e=w(l,2),n=e[0],e=e[1],t=w(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},d2.prototype.setOffsetPosition=function(t){var t=w(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat((void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},d2.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},d2.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=w(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=w([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},d2.tag="tooltip",d2.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(ks,'"></div>'),title:'<div class="'.concat(c2,'"></div>'),item:'<li class="'.concat(Es,'" data-index={index}>\n <span class="').concat(Xa,'">\n <span class="').concat(Os,'" style="background:{color}"></span>\n <span class="').concat(f2,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(_s,'" title="{value}">{value}</span>\n </li>')},style:e}},t([Dy(100)],d2.prototype,"updatePosition",null),d2);function d2(t){t=l2.call(this,bn({},d2.defaultOptions,t))||this;return t.visibility="visible",t.initShape(),t.render(t.attributes,t),t}var p2,g2={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function y2(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function m2(t){return p2.call(this,bn({},m2.defaultOptions,t))||this}me(m2,p2=l),m2.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=S(e).maybeAppendByClassName("switch-content","g").node(),l=e.getLocalBounds(),n=wn(g2,n,g2.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&S(e).maybeAppendByClassName("switch-tag",function(){return new Mm({})}).call(function(t){var e,t=t.node(),n=(t.update(bn({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),S(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:f,fillOpacity:r?.4:1},h)).node()),g=S(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},h)).node();S(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:f}).call(function(t){var e,t=t.node(),n=y2(p,a,o),r=y2(p,a,!o);t.attr("x")&&!xn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},m2.tag="switch",m2.defaultOptions={style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var v2,b2,x2,w2,r={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},Ms=Cy({},r,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),Ta=Cy({},r,{type:"circle",defaultRadius:0}),Ss=Cy({},r,{type:"polygon",defaultRadius:0,startAngle:0}),Ca=(me(k2,v2=l),Object.defineProperty(k2.prototype,"localPointer",{get:function(){var t=w(this.getPosition(),2),e=t[0],t=t[1],n=w(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"tagCfg",{get:function(){var t=xy(this.attributes,"tag");return t.position,Q(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"crosshairCfg",{get:function(){var t=xy(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),k2.prototype.render=function(t,e){var n=this,e=S(e).maybeAppendByClassName(".crosshair-group","g").node();this.shapesGroup=e,this.tagShape=S(e).maybeAppend(".crosshair-tag",function(){return new Mm({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=S(e).maybeAppendByClassName(".crosshair-path","path").node().attr(this.crosshairCfg),this.adjustLayout()},k2.prototype.update=function(t){this.attr(bn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},k2.prototype.setPointer=function(t){this.pointer=t},k2.tag="crosshair-base",k2.defaultOptions={style:r},k2);function k2(t){return v2.call(this,bn({},k2.defaultOptions,t))||this}function M2(t){return b2.call(this,Cy({},M2.defaultOptions,t))||this}function O2(t){return x2.call(this,Cy({},O2.defaultOptions,t))||this}function _2(t){return w2.call(this,Cy({},_2.defaultOptions,t))||this}me(M2,b2=Ca),Object.defineProperty(M2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(M2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=w(this.getPosition(),2))[0],e=e[1],[(n=w(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(M2.prototype,"isVertical",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(M2.prototype,"tagShapeSpace",{get:function(){var t=Ty(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),M2.prototype.update=function(t){b2.prototype.update.call(this,t)},M2.prototype.setPointer=function(t){b2.prototype.setPointer.call(this,t),this.adjustPosition()},M2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},M2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},M2.prototype.adjustPosition=function(){var t=w(this.localPointer,2),e=t[0],t=t[1],n=w(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},M2.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=w(e.startPos,2),a=i[0],i=i[1],e=w(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=w(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},M2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},M2.tag="line-crosshair",M2.defaultOptions={style:Ms},t([Dy(20)],M2.prototype,"setPointer",null),me(O2,x2=Ca),Object.defineProperty(O2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),O2.prototype.update=function(t){x2.prototype.update.call(this,t)},O2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(x2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=w(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},O2.prototype.adjustLayout=function(){this.tagShape.hide()},O2.prototype.createCirclePath=function(t){var e=this.attributes,n=w(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return gm(r,n,t||e)},O2.tag="circle-crosshair",O2.defaultOptions={style:Ta},t([Dy(20)],O2.prototype,"setPointer",null),me(_2,w2=Ca),Object.defineProperty(_2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),_2.prototype.update=function(t){w2.prototype.update.call(this,t)},Object.defineProperty(_2.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),_2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(w2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=w(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=Iy(n,[t,e])/Iy(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},_2.prototype.adjustLayout=function(){this.tagShape.hide()},_2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=w(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=w(t,2),t=w(fe([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},_2.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=w(t,2),c=t[0],u=t[1],f=this.points,t=w(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=w(f[p-1],2),y=g[0],g=g[1],m=w(f[p%f.length],2),v=m[0],m=m[1],y=(i=[h,d],y=[y+h,g+d],g=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=w(r=[c,u],2))[0],r=r[1],a=(i=w(i,2))[0],i=i[1],o=(y=w(y,2))[0],y=y[1],s=(g=w(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(Fy(m,a,r,i,o,y)&&Ry(l,o,y),Fy(m,a,r,i,s,g)&&Ry(l,s,g),Fy(o,s,y,g,m,r)&&Ry(l,m,r),Fy(o,s,y,g,a,i))&&Ry(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=w(y,2))[0],n=s[1])}return[e,n]},_2.tag="polygon-crosshair",_2.defaultOptions={style:Ss},t([Dy(20)],_2.prototype,"setPointer",null);me(T2,S2=j.DisplayObject),Object.defineProperty(T2.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Ue(t)?t.map(function(t){return Ue(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=w(t,2),n=t[0],t=t[1];return"wavy"===t?v({path:r.getWavyPath(n)},i):"double"===t?v({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},v(v({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),T2.prototype.update=function(t){var e=this;this.attr(Cy({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new j.Path({style:t}))})},T2.prototype.clear=function(){this.removeChildren()},T2.prototype.getLinePos=function(t){var e=w(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=w([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=w([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=w([0,a*r],2))[0],n):(s=(t=w([0,a*e+i/2],2))[0],t))[1];return[s,o]},T2.prototype.getLinePath=function(t){var e=this.attributes.width,t=w(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},T2.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=w(this.getLinePos(t),2),a=i[0],i=i[1],o=w([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=w([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=w([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=w([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},T2.prototype.getWavyPath=function(t){return[]},T2.tag="decoration",T2.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var S2,E2,A2=T2;function T2(t){t=S2.call(this,Cy({},T2.defaultOptions,t))||this;return t.update({}),t}function P2(t){t=E2.call(this,Cy({},P2.defaultOptions,t))||this;return t.init(),t}me(P2,E2=l),Object.defineProperty(P2.prototype,"textWidth",{get:function(){var e=this;return Qe(this.renderText.split("\n").map(function(t){return uy(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"textHeight",{get:function(){return Ty(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"height",{get:function(){var t=this.attributes.height;return rn(t)&&0!==t?t:Ty(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return hy(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:hy(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return cy(t,rn(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&rn(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"font",{get:function(){return mn(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},my),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return v({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return Cy({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(P2.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),P2.prototype.init=function(){this.initShape(),this.update({})},P2.prototype.update=function(t){this.attr(Cy({},this.attributes,t)),this.render()},P2.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new A2({style:t}))})},P2.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},P2.prototype.initShape=function(){this.backgroundShape=new j.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new j.Group({name:"decoration-group"}),this.textShape=new j.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},P2.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&rn(n)&&"clip"===e&&(this.clipRect=new j.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},P2.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;rn(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},P2.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},P2.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},P2.tag="paragraph",P2.defaultOptions={style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var L2,ja=v(v({},my),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),N2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},C2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function j2(t){return L2.call(this,bn({},j2.defaultOptions,t))||this}me(j2,L2=l),j2.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,Ay(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=fn({},this.checked?N2.selected:N2.default,r),r=fn({},C2,i),t=(this.checkboxBoxShape=Ay(a,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(a.style.zIndex||0)-1},e)).node(),Ay(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},r)),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;Ay(a,".checkbox-label","text").styles(v({className:"checkbox-label",x:e,y:r},n))},j2.tag="checkbox",j2.defaultOptions={style:{x:0,y:0,label:v({text:""},ja),spacing:4,checked:!1}};var B2="gui-poptip",F2="gui-poptip-arrow",R2="gui-poptip-text",I2=((i={})[".".concat(B2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},i[".".concat(R2)]={"text-align":"center"},i[".".concat(B2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},i[".".concat(B2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},i[".".concat(B2,"[data-position='right']")]={transform:"translate(0, -50%)"},i[".".concat(B2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},i[".".concat(B2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},i[".".concat(B2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},i[".".concat(B2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},i[".".concat(B2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},i[".".concat(B2,"[data-position='right-top']")]={transform:"translate(0, 0)"},i[".".concat(B2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},i[".".concat(B2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},i[".".concat(B2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},i[".".concat(F2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},i[".".concat(B2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},i["[data-position='top'] .".concat(F2)]={bottom:"-2px"},i[".".concat(B2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},i["[data-position='left'] .".concat(F2)]={right:"-2px"},i[".".concat(B2,"[data-position='right']")]={transform:"translate(5px, -50%)"},i["[data-position='right'] .".concat(F2)]={left:"-2px"},i[".".concat(B2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},i["[data-position='bottom'] .".concat(F2)]={top:"-2px"},i[".".concat(B2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},i["[data-position='top-left'] .".concat(F2)]={left:"10px",bottom:"-2px"},i[".".concat(B2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},i["[data-position='top-right'] .".concat(F2)]={right:"10px",bottom:"-2px"},i[".".concat(B2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},i["[data-position='left-top'] .".concat(F2)]={right:"-2px",top:"8px"},i[".".concat(B2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},i["[data-position='left-bottom'] .".concat(F2)]={right:"-2px",bottom:"8px"},i[".".concat(B2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},i["[data-position='right-top'] .".concat(F2)]={left:"-2px",top:"8px"},i[".".concat(B2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},i["[data-position='right-bottom'] .".concat(F2)]={left:"-2px",bottom:"8px"},i[".".concat(B2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},i["[data-position='bottom-left'] .".concat(F2)]={top:"-2px",left:"8px"},i[".".concat(B2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},i["[data-position='bottom-right'] .".concat(F2)]={top:"-2px",right:"8px"},i),D2=void 0;var z2;function W2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function G2(t){var n,r;return n=W2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(D2,t)}(t)}function H2(t){t=z2.call(this,bn({style:{id:"gui-poptip"}},H2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}me(H2,z2=l),Object.defineProperty(H2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),H2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},H2.prototype.update=function(t){this.attr(bn({},this.style,t)),this.render(this.attributes,this)},H2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=Q(i,["html","target"]),n=fn({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=w(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},H2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=w(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},H2.prototype.clear=function(){this.container.innerHTML=""},H2.prototype.destroy=function(){var t,e=this;k([],w(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},H2.prototype.showTip=function(t,e,n){var r,i=wn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(R2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},H2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},H2.prototype.getContainer=function(){return this.container},H2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(B2).concat(t?" ".concat(t):"")},H2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=G2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},H2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(F2,'"></span>'));t.innerHTML=n,en(r)?t.innerHTML+=r:r&&cn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(R2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},H2.prototype.applyStyles=function(){var t,e=Cy({},I2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},H2.prototype.setOffsetPosition=function(t,e,n){var n=w(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},H2.tag="poptip",H2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:I2,template:'<div class="'.concat(R2,'"></div>')}};me(q2,V2=j.Group),Object.defineProperty(q2.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=py(t)},enumerable:!1,configurable:!0}),Object.defineProperty(q2.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=py(t)},enumerable:!1,configurable:!0}),q2.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=w(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new em(e-i,n-a,r+i+o,t+a+s)},q2.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,V2.prototype.appendChild.call(this,t,e),t},q2.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=w(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=w(this.$margin,4),s=o[0],o=o[3];return new em(n+o,r+s,e-n-i,t-r-a)},q2.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:im,grid:am})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},q2.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},q2.prototype.destroy=function(){this.removeAllEventListeners()},q2.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=e:"padding"===t&&(this.padding=e),this.layout()};var V2,Fa=q2;function q2(t){var e=V2.call(this,t)||this,t=(e.layoutEvents=[j.ElementEvent.BOUNDS_CHANGED,j.ElementEvent.INSERTED,j.ElementEvent.REMOVED],e.$margin=py(0),e.$padding=py(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}function Y2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return j1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=rg(l,t),t=rg(t,i),i=rg(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),j1()(s)}const $2=Tg(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=Q(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=et(e,"background"),h=f["padding"],f=Q(f,["padding"]),d=et(e,"connector"),{points:p=[]}=d,d=Q(d,["points"]),i=[[+i,+a],[+n,+r]],a=nt(t).maybeAppend("text","text").call(A,e).node(),n=Y2(nt(t).maybeAppend("background","rect").style("zIndex",-1).call(A,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(A,o?f:{}).node(),i,p,u),r=l&&new xm({id:"startMarker",style:Object.assign({x:0,y:0},et(e,"startMarker"))}),a=c&&new xm({id:"endMarker",style:Object.assign({x:0,y:0},et(e,"endMarker"))});nt(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(A,s?d:{})}),U2=t=>{const l=Q(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Q(bg(r,i,a,o),[]),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return nt(new $2).style("x",i).style("y",o).call(A,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(A,a).call(A,l).node()}};U2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const X2=Tg(t=>{var e=Q(t.attributes,["class","x","y"]);const n=et(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(nt(t).maybeAppend("marker",()=>new xm({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());nt(t).maybeAppend("text","text").style("x",i).style("y",a).call(A,e)}),K2=t=>{const s=Q(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),i=r["defaultColor"],a=Q(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return nt(new X2).call(A,a).style("x",r).style("y",o).call(A,e).call(A,s).node()}},Z2=(K2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Tg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;nt(t).maybeAppend("connect-path",()=>new j.Path({})).style("d",n).call(A,i),nt(t).maybeAppend("area-path",()=>new j.Path({})).style("d",e).call(A,r)}));const J2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:h=!1}=t,d=Q(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=bg(n,r,i,a),r=n["defaultColor"],i=Q(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=wg(c,e),n=l&&n?yg(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=et(s,"connect"),i=!!o.length,n=t=>nt(new j.Path({})).style("d",t).call(A,s).node();return Bu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=B1().curve(F1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,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 D1(a())},delete t.lineX0,t.lineEndAngle=function(){return D1(o())},delete t.lineX1,t.lineInnerRadius=function(){return D1(s())},delete t.lineY0,t.lineOuterRadius=function(){return D1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I1(t)):e()._curve},t.angle((t,e)=>ag(ng(r[e],n))).outerRadius((t,e)=>rg(r[e],n)).innerRadius((t,e)=>rg(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):nt(new Z2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return(ju(c)?B1().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(f)):B1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f))).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):nt(new Z2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},Q2=(J2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Bu(n)?K1:L1;return J2(Object.assign({curve:i},a))(t,e,n,r)}),tx=(Q2.props=Object.assign({},J2.props),t=>{const{alpha:a=.5}=t,o=Q(t,["alpha"]);return(t,e,n,r)=>{var i=Bu(n)?U1:Y1;return J2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),ex=(tx.props=Object.assign({},J2.props),i=>(t,e,n,r)=>J2(Object.assign({curve:J1},i))(t,e,n,r)),nx=(ex.props=Object.assign({},J2.props),i=>(t,e,n,r)=>J2(Object.assign({curve:Q1},i))(t,e,n,r)),rx=(nx.props=Object.assign({},J2.props),i=>(t,e,n,r)=>J2(Object.assign({curve:tg},i))(t,e,n,r)),ix=(rx.props=Object.assign({},J2.props),t=>{const l=t["arrowSize"],c=Q(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=bg(r,a,o,s),a=r["defaultColor"],o=Q(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=x1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=pg(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),nt(new j.Path).call(A,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(A,c).node()}}),ax=(ix.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Q(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),i=r["defaultColor"],a=Q(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=x1();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),nt(new j.Path).call(A,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(A,s).node()}});ax.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ox=t=>{const{cornerRatio:u=1/3}=t,f=Q(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=bg(r,o,s,l),o=r["defaultColor"],s=Q(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=x1(),Bu(o)?(i=rg(t,c=o.getCenter()),i=(rg(e,c)-i)*n+i,a.moveTo(t[0],t[1]),gg(a,t,e,c,i)):ju(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return nt(new j.Path).call(A,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(A,f).node()}},sx=(ox.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Q(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),i=r["defaultColor"],a=Q(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=x1();return t.moveTo(e[0],e[1]),Bu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):gg(t,e,i,lg(e,i),rg(e,i)/2),nt(new j.Path).call(A,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(A,s).node()}}),lx=(sx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=Q(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),i=r["defaultColor"],a=Q(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return nt(new j.Image).call(A,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(A,u).node()}});lx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const cx=t=>{const l=Q(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=bg(r,e,i,a),e=r["defaultColor"],i=Q(r,["defaultColor"]),a=function(i,t){const a=x1();if(Bu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>rg(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?gg(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return nt(new j.Path).call(A,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(A,l).node()}};cx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ux=t=>{const l=Q(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=bg(r,e,i,a),e=r["defaultColor"],i=Q(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=x1();return Bu(e)?(n=rg(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),gg(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),gg(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return nt(new j.Path).call(A,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(A,l).node()}};ux.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const fx=t=>{const y=Q(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=bg(r,e,f,h),{defaultColor:e,fill:f=e,stroke:h=e}=r,e=Q(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=x1(),Bu(t)?([i,a]=t=t.getCenter(),o=ig(ng(r[0],t)),s=ig(ng(r[1],t)),g=rg(t,r[2]),l=rg(t,r[3]),c=rg(t,r[8]),u=rg(t,r[10]),t=rg(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return nt(new j.Path).call(A,e).style("d",g.toString()).style("stroke",h).style("fill",d||f).style("transform",p).call(A,y).node()}};fx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const hx=t=>{const s=Q(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=Q(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,Bu(t=n)?(t=t.getCenter(),A1()({startAngle:0,endAngle:2*Math.PI,outerRadius:rg(a[0],t),innerRadius:rg(a[1],t)})):j1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,Bu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return nt(new j.Path({})).call(A,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(A,s).node()}};function dx(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}hx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const px=Tg(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=Q(e,["points","class","endMarker","direction"]),i=et(e,"endMarker"),n=(n=n,j1().x(t=>t[0]).y(t=>t[1])(n));nt(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new xm({className:"marker",style:Object.assign(Object.assign({},i),{symbol:dx})}):null).call(A,e)});const gx=t=>{const{offset:s=0,connectLength1:l}=t,c=Q(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=bg(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=Q(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(ju(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return nt(new px).call(A,o).style("points",n).style("stroke",r||i).style("transform",e).call(A,c).node()}};function yx(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=Nf(a.x,c),i=Nf(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function mx(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=vg(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=bx(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?vx(s,h,n):lg(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function vx(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function bx(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function xx(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=vg(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:bx(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=vx(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function wx(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function kx(t,e,n,r){var i=n["bounds"];return 1===i.length?wx(0,0,n):(Fu(r)?mx:zu(r)?xx:yx)(t,e,n,r)}function Mx(t,e,n){var{innerRadius:n,outerRadius:t}=vg(n,t,[e.y,e.y1]);return n+(t-n)}function Ox(t,e,n){var{startAngle:n,endAngle:t}=vg(n,t,[e.y,e.y1]);return(n+t)/2}function _x(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,f=r.getCenter(),h=Ox(e,n,r),d=0<Math.sin(h)?1:-1,i=bx(h,i,a),a={textAlign:0<d||Fu(r)?"start":"end",textBaseline:"middle",rotate:i},i=Mx(e,n,r),[[e,n],[r,f],[h,i]]=function(t,e,n,r,i){var[n,a]=vx(t,e,n),[t,r]=vx(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(f,h,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=h+l,c={connector:s,connectorPoints:[[r-o,f-i],[h-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:h+l,y:i},a),c)}gx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Sx=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=ku(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=ig(ng(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}},bottom:kx,bottomLeft:kx,bottomRight:kx,inside:kx,left:kx,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?wx(0,0,n):(Fu(r)?mx:zu(r)?_x:yx)(t,e,n,r)},right:kx,spider:function(t,e,n,r){var i,a,o,s,l,c;return zu(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=Q(_x(0,e,n,r),[]),s=r.getCenter(),l=Mx(e,n,r),e=Ox(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return zu(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=Q(_x(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(zu(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=ag([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=vx(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:kx,topLeft:kx,topRight:kx});function Ex(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:zu(o)?"inside":ju(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=Sx[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const Ax=o=>(t,e,n,r)=>{var i=e["text"],a=Q(e,["text","x","y"]),t=Ex(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=Q(t,["rotate","transform"]);return nt(new $2).call(A,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(A,a).node()},Tx=(Ax.props={},t=>{const s=t["colorAttribute"],l=Q(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Q(bg(r,i,a,o),["stroke"]),{d:i,color:a}=e;return nt(new j.Path).call(A,r).style("d",i).style(s,a).call(A,l).node()}}),Px=(Tx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Tx(Object.assign({colorAttribute:"fill"},t))),Lx=(Px.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Tx(Object.assign({fill:"none",colorAttribute:"stroke"},t))),Nx=(Lx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=Q(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),Cx=(Nx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),jx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:Cx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:Cx.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:Cx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Cx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Cx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Cx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Cx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Cx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Cx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Cx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Cx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:Cx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:Cx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:Cx.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:Cx.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:Cx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:Cx.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleSpacing:0,gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:Cx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:Cx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:Cx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:Cx.BLACK,navButtonFillOpacity:.65,navPageNumFill:Cx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:Cx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:Cx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:Cx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:Cx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",labelShowTick:!0,labelSpacing:8},label:{fill:Cx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Cx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:Cx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:Cx.STROKE,backgroundFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:Cx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:Cx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,trackStroke:"none",thumbFill:"#000",thumbFillOpacity:.15,thumbStroke:"none",thumbHighlightedFillOpacity:.2},title:{titleFill:Cx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:Cx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},Bx=(jx.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),Fx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:Bx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:Bx.BLACK,lineWidth:1}},text:{text:{fill:Bx.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:Bx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Bx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Bx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Bx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Bx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Bx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Bx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Bx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Bx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:Bx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:Bx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:Bx.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:Bx.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:Bx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:Bx.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:Bx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:Bx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:Bx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:Bx.BLACK,navButtonFillOpacity:.45,navPageNumFill:Bx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:Bx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:Bx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:Bx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:Bx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:Bx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Bx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:Bx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:Bx.STROKE,backgroundFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:Bx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:Bx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:Bx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:Bx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},Rx=(Fx.props={},Fx.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),Ix=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:Rx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:Rx.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:Rx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Rx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Rx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Rx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Rx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Rx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Rx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Rx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Rx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:Rx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:Rx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,line:!0,lineStroke:"#888",lineStrokeOpacity:1,lineLineWidth:1,lineArrow:null,tickStroke:Rx.STROKE,tickStrokeOpacity:1,tickLineWidth:1,tickLength:5,labelFill:Rx.BLACK,labelFillOpacity:1,labelFontSize:10,labelAutoRotate:!1,labelFontWeight:"normal",labelSpacing:4,labelAlign:"horizontal",gridStroke:"#ddd",gridStrokeOpacity:1,gridLineWidth:1,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:4,titleTextBaseline:"bottom",labelSpacing:8,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:4,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:Rx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemLabelFill:Rx.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemValueFill:Rx.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:Rx.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:Rx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,backgroundFill:"transparent"},continuousLegend:{showTitle:!1,labelFill:Rx.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:Rx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:Rx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:Rx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},label:{fill:Rx.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Rx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:Rx.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:Rx.STROKE,backgroundFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:Rx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:Rx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:Rx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:Rx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function Dx(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}Ix.props={};var zx,Wx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gx(t){var e;if(e=Wx.exec(t))return new Hx({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]});throw new Error("invalid format: "+t)}function Hx(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Vx(t,e){var n,e=Dx(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}Gx.prototype=Hx.prototype,Hx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qx={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Vx(100*t,e),r:Vx,s:function(t,e){var n,r,i=Dx(t,e);return i?(n=i[0],(i=(i=i[1])-(zx=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Dx(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Yx(t){return t}var $x,Ux=Array.prototype.map,Xx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Kx(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?Yx:(s=Ux.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?Yx:(e=Ux.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=Gx(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):qx[m]||(void 0===g&&(g=12),y=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=qx[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?Xx[8+zx/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return O(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=Gx(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=Dx(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=Xx[8+e/3];return function(t){return n(r*t)+i}}}}function Zx(t,e,n){return t.querySelector(e)?nt(t).select(e):nt(t).append(n)}function Jx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function Qx(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","center","center"],bottom:["row","center","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}Ra=Kx({thousands:",",grouping:[3],currency:["$",""]}),$x=Ra.format,Ra.formatPrefix;class tw extends Fa{update(t){this.attr(t);var e,t=Q(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function ew(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function nw(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function rw(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=tu(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new y0({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return Du(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new y0({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new y0({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return Bu(s)||ju(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:ju(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),Fu(s)&&"center"===o?i.map(t=>{var e=t["value"],t=Q(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function iw(t,e,n){var r;return!(Bu(r=e)&&ju(r)||Iu(e))&&(void 0===t?!!n.getTicks:t)}function aw(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+Ef(e)]),Object.assign({},n,r)}(n,i);return"bottom"===i?Object.assign(Object.assign({},n),{titlePosition:t.getTicks?"right-bottom":"bottom",titleTransformOrigin:"center",titleTransform:t.getTicks?"translate(-100%, 0)":void 0}):"center"===i?Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive",labelTransform:"center"===r?"translate(50%, 0)":"",tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(t=a)||t===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var ow,Ia=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?$x(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const sw=Ia(t=>{const{direction:f="left",important:h={},labelFormatter:d=t=>""+t,orientation:p,position:g,tickCount:y,tickFilter:m,tickMethod:v,title:b}=t,x=Q(t,["direction","important","labelFormatter","order","orientation","position","size","tickCount","tickFilter","tickMethod","title","transform"]);return([t],e,n,r)=>{var e=e["bbox"],i=t.getOptions()["domain"],i=rw(t,i,y,d,m,v,g,n),r=aw(t,0,r,f,g,p),{labelAutoRotate:a=!0,labelAutoHide:o=!1,label:s=!0,tick:l=!0,line:c=!1,grid:u}=Object.assign({},r,x),u=iw(u,n,t),t=function(t,e){var[e,n]=nw(e);return t.includes("bottom")||t.includes("top")?n:e}(g,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o],showLine:!0};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o],showLine:!0};if("number"==typeof e){var[t,a]=r.getCenter(),[s,l]=Wu(r);const[u,f]=Gu(r);var r=o/2,o=s*r,s=l*r,[l,r]=[t+n,a+i],[e,c]=[Math.cos(e),Math.sin(e)];return{startPos:[l+s*e,r+s*c],endPos:[l+o*e,r+o*c],gridClosed:f-u==360,gridCenter:[t+n,i+a],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(f-u)/(n.length-1)*e)}}}return{}}(g,p,e,n),{showLine:n=c}=e,c=Q(e,["showLine"]),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:i,title:Jx(b),showLabel:s,labelTransforms:(e=a,r=[],o&&r.push({type:"hide"}),e&&r.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),r),showGrid:u,showTick:l,gridLength:t}),x),{showLine:!0}),n?null:{lineOpacity:0}),c),h);return new db({className:"axis",style:i})}}),lw=Ia(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,title:f,grid:h=!1,important:d={}}=t,p=Q(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","title","grid","important"]);return([t],e,n,r)=>{var e=e["bbox"],i=t.getOptions()["domain"],t=rw(t,i,c,s,l,u,o,n),[i,a]=Wu(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=Gu(i),[l,c]=nw(i),e={center:e,radius:a,angleRange:[o,s],titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(nw(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new db({style:tt({},i,e,Object.assign(Object.assign({type:"arc",data:t,title:Jx(f),showGrid:h},p),d))})}}),cw=(sw.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},lw.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>sw(t)),uw=(cw.props=Object.assign(Object.assign({},sw.props),{defaultPosition:"bottom"}),t=>sw(t));uw.props=Object.assign(Object.assign({},sw.props),{defaultPosition:"left"});const fw=a=>{const{important:o={}}=a,s=Q(a,["important"]);return(t,e,n,r)=>{return sw(Object.assign(Object.assign(Object.assign({},s),(i=a.orientation,(i%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:i>-Math.PI/2&&i<Math.PI/2?{titleTransform:"translate(50%, 0)"}:i>Math.PI/2&&i<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=Gu(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{showGrid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,r,n,e)),o)}))(t,e,n,r);var i}};function hw(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Af("Unknown Component: "+t)};return[t=>{var e=t["type"],t=Q(t,["type"]);return r(e)(Object.assign({},t))},r]}function dw(t,e,n,r,i={}){const[a]=hw("shape",e);return()=>a({type:"point."+t})([[0,0],[0,0]],Object.assign({size:6},i),n,r)}function pw(t,e,n,r,i){var{labelFormatter:a=t=>""+t}=e,e={itemMarker:function(t,e,n,r,i){t=ew(t,"shape");const a=e["itemMarker"];if(!t||a)return"function"==typeof a?a:(t,e)=>dw(a||"point",n,r,i,{color:t.color});{const o=t.getOptions()["range"];return(t,e)=>dw(o[e],n,r,i,{color:t.color})}}(t,e,n,r,i),itemMarkerOpacity:function(t){if(t=ew(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(t)};const o="string"==typeof a?$x(a):a,s=ew(t,"color");return Object.assign(Object.assign({},e),{data:s.getOptions().domain.map(t=>({id:t,label:o(t),color:s.map(t)}))})}fw.props=Object.assign(Object.assign({},sw.props),{defaultPosition:"center"});const gw=f=>{const{position:h,dx:d=0,dy:p=0,title:g,gridCol:y,gridRow:m}=f,v=Q(f,["order","size","position","orientation","itemMarker","labelFormatter","dx","dy","title","gridCol","gridRow","layout"]);return(t,e,n,r)=>{var{library:i,bbox:a}=e,{x:a,y:o,width:s,height:l}=a,e=Qx(h,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[c,u]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(h,m,y),u=Object.assign({orient:["right","left","center"].includes(h)?"vertical":"horizontal",width:s,height:l,gridCol:null!==y&&void 0!==y?y:u,gridRow:null!==m&&void 0!==m?m:c,rowPadding:0,colPadding:8,titleText:Jx(g)},pw(t,f,i,n,r)),{legend:c={}}=r,t=new tw({style:Object.assign({x:a+d,y:o+p,width:s,height:l},e)});return t.appendChild(new Wb({className:"legend-category",style:Object.assign({},c,u,v)})),t}};gw.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const yw=l=>{const{title:c,dx:u=0,dy:f=0,position:h,labelFormatter:d}=l,p=Q(l,["title","dx","dy","position","layout","labelFormatter"]);return(t,e,n,r)=>{var i=e["bbox"],{x:i,y:a,width:o,height:s}=i,e=Qx(h,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),o=new tw({style:Object.assign({x:i+u,y:a+f,width:o,height:s},e)}),{continuousLegend:s={}}=r;return o.appendChild(new o2({style:Object.assign({},s,Object.assign(Object.assign({x:i,y:a,titleText:Jx(c),titleFontSize:12,showHandle:!1,showIndicator:!1,labelAlign:"value",labelFormatter:"string"==typeof d?t=>$x(d)(t.label):d},function(t){var{position:t="top",size:e,length:n=yw.props.defaultLength}=t,[n,e,t]={left:["vertical",e,n],right:["vertical",e,n],top:["horizontal",n,e],bottom:["horizontal",n,e]}[t];return{orient:n,width:e,height:t}}(l)),function(t,e){const r=ew(t,"color");var{domain:n,range:i}=r.getOptions();const{length:a=yw.props.defaultLength}=e,[o,s]=[n[0],n.slice(-1)[0]];if(r instanceof w0){e=r.thresholds;if(r instanceof O0||r instanceof S0)return{data:[o,...e,s].map((t,e)=>({value:t/s,label:t})),color:i};const c=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return{data:c,color:i,labelFilter:(t,e)=>0<e&&e<c.length-1}}const l=ew(t,"opacity");return{data:r.getTicks().map(t=>({value:t})),color:new Array(a).fill(0).map((t,e)=>{var e=(s-o)/(a-1)*e+o,n=r.map(e);const i=l?l.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}), ([\d]{1,3}), ([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})}}(t,l)),p)})),o}},mw=(yw.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200},e=>(...t)=>yw(Object.assign({},{block:!0},e))(...t)),vw=(mw.props=Object.assign(Object.assign({},yw.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>yw(Object.assign({},{type:"size",block:!0,labelShowTick:!1},t))),bw=(vw.props=Object.assign(Object.assign({},yw.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>yw(Object.assign({},{type:"size",labelShowTick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function xw(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}bw.props=Object.assign(Object.assign({},yw.props),{defaultPosition:"top",defaultOrientation:"horizontal"});ow={render(t,e){const{y:n,width:r,title:i,subtitle:a,spacing:o=2,align:s="left"}=t,l=Q(t,["x","y","width","title","subtitle","spacing","align"]);t=et(l,"title");const c=et(l,"subtitle"),u=Zx(e,".title","text").attr("className","title").call(A,Object.assign(Object.assign(Object.assign({},xw(0,n,r,s)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();Zx(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},xw(0,u.max[1]+o,r,s)),{fontSize:12,textBaseline:"top",text:a}),c))})}};const ww=class extends j.CustomElement{constructor(t){super(t),this.descriptor=ow}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(tt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},kw=s=>(t,e,n,r)=>{var{x:e,y:i,width:a,height:o}=e.bbox;return new ww({style:tt({},{style:r.title},Object.assign({x:e,y:i,width:a,height:o},s))})};function Mw(t){return t.getBandWidth}function Ow(t,e,n){if(!Mw(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Kc(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function _w(t,e){var n,r;return Mw(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):cu(e)}kw.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const Sw=t=>{const{orient:u,labelFormatter:f}=t,h=Q(t,["orient","labelFormatter","size"]);return([e],t,n,r)=>{var i,t=t["bbox"],{x:t,y:a,width:o,height:s}=t,{slider:r={}}=r;const l=(null==(i=e.getFormatter)?void 0:i.call(e))||(t=>t),c="string"==typeof f?$x(f):f;return new nv({className:"slider",style:Object.assign({},r,Object.assign({x:t,y:a,trackLength:"horizontal"===u?o:s,orient:u,formatter:t=>{return(c||l)(Ow(e,t,!0))}},h))})}},Ew=(Sw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>Sw(Object.assign(Object.assign({},t),{orient:"horizontal"}))),Aw=(Ew.props=Object.assign(Object.assign({},Sw.props),{defaultPosition:"bottom"}),t=>Sw(Object.assign(Object.assign({},t),{orient:"vertical"}))),Tw=(Aw.props=Object.assign(Object.assign({},Sw.props),{defaultPosition:"left"}),t=>{const s=t["orient"],l=Q(t,["orient","labelFormatter"]);return(t,e,n,r)=>{var e=e["bbox"],{x:e,y:i,width:a,height:o}=e,{scrollbar:r={}}=r;return new av({className:"scrollbar",style:Object.assign({},r,Object.assign(Object.assign({x:e,y:i,trackLength:"horizontal"===s?a:o},l),{orient:s,value:0,contentLength:1500,viewportLength:"horizontal"===s?a:o}))})}}),Pw=(Tw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>Tw(Object.assign(Object.assign({},t),{orient:"horizontal"}))),Lw=(Pw.props=Object.assign(Object.assign({},Tw.props),{defaultPosition:"bottom"}),t=>Tw(Object.assign(Object.assign({},t),{orient:"vertical"})));Lw.props=Object.assign(Object.assign({},Tw.props),{defaultPosition:"left"});class Nw{constructor(t){this.$value=t}static of(t){return new Nw(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Cw(t,e,n){return Nw.of({}).call(jw,t).call(jw,e).call(jw,n).value()}function jw(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function Bw(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const Fw=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],Rw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ju(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Cw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Iw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ju(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Cw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Dw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ju(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Cw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},zw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=ju(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Cw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Ww=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],Cw(i,n,l))},Gw=(Ww.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Cw(i,n,l))});function Hw(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function Vw(t,e){var[n,r,i,t]=Hw(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
2
2
|
M ${t} ${e}
|
|
3
3
|
L ${t+n} ${e}
|
|
4
4
|
L ${t+n} ${e+r}
|
|
5
5
|
L ${t} ${e+r}
|
|
6
6
|
Z
|
|
7
|
-
`}([h,d,f,s]))}c-=u,l+=1}return o}function wx(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function kx(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],y=F.convertToPath(e),g=F.convertToPath(n);return d===p&&"path"!==d||(void 0===y||void 0===g)?(a=n,p=r,[d,h,o,l]=bx(i=e),[u,f,s,c]=bx(a),u-=d,d=f-h,f=s/o,h=c/l,s=[Object.assign({transform:"translate(0, 0) scale(1, 1)"},fx(i,hx)),Object.assign({transform:`translate(${u}, ${d}) scale(${f}, ${h})`},fx(a,hx))],(o=i.animate(s,p)).finished.then(()=>wx(a,i)),o):(c=y,d="path"===(u=(l=t)["nodeName"])?l:(wx(u=new F.Path({style:Object.assign(Object.assign({},fx(l,hx)),{d:c})}),l),u),f=[Object.assign({path:y},fx(e,hx)),Object.assign({path:g},fx(n,hx))],h=d.animate(f,r),d.style.transform="scale(1, 1)",d.style.transform="none",h)}vx.props={};const Mx=y=>(t,e,n,r,i)=>{[a="pack"]=[y.split];var a="function"==typeof a?a:xx,i=cx(i,n,y),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,kx(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return kx(t,new F.Path({style:Object.assign({path:d[e]},fx(l,hx))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return kx(t,t,new F.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Ox=(Mx.props={},b=>{return F.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:F.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!iu(r))return dx(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:f}=e,{points:e,y:t,y1:h}=(K(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=Gp().cornerRadius(s).padAngle(l*Math.PI/180),p=N1(r,e,[t,h]),{startAngle:y,endAngle:g}=p,m=new F.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=F.convertToPath(m);return m.style.transform="none",t};s=[{waveInArcAngle:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:y+1e-4,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{waveInArcAngle:g,fillOpacity:c,strokeOpacity:u,opacity:f}],l=a.animate(s,cx(i,n,b));return l.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:g}))},l}}),_x=(Ox.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,cx(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Sx=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,cx(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Ex=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],cx(i,n,o))},Ax=(Ex.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=dx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),Px=(Ax.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=yx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function Tx(t){return J(t).selectAll("."+et).nodes()}function Nx(t){return J(t).select("."+nt).node()}function Lx(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function jx(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function Cx(){return t=>t.__data__.color}function Fx(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Ix(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function Rx(o,s=(t,e)=>t){const l="__states__",c="__ordinal__",i=t=>{var{[l]:e=[],[c]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),Q(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);t.setAttribute(r,i),r in n||(n[r]=a)}t[c]=n}},a=t=>{t[l]||(t[l]=[])};return{setState:(t,...e)=>{a(t),t[l]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[l].indexOf(r);-1!==r&&t[l].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[l].indexOf(e))}}function Bx(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function Dx(l,t){var{valueof:c=(t,e)=>t}=t,u=K(t,["valueof"]);const f="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=_p();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),_1(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=K(i,["fill"]),r=new F.Path({className:f+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||f;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function zx(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=K(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=Nc(o,i);n=Bx(o,r);const[c,u]=Dx(t,Object.assign({elements:o,valueof:n},Q(e,"link"))),{setState:f,removeState:h}=Rx(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?f(n,"highlighted"):f(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)h(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function Wx(n){return t=>{var{container:t,view:e}=t;return zx(t,Object.assign(Object.assign({},jx(n)),{elements:Tx,datum:Ix(e)}))}}function Hx(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return zx(t,Object.assign(Object.assign({},jx(n)),{elements:Tx,datum:Ix(e),groupKey:Fx(e)}))}}function Vx(n){return t=>{var{container:t,view:e}=t;return zx(t,Object.assign(Object.assign(Object.assign({},n),jx(n)),{elements:Tx,datum:Ix(e),groupKey:Cx()}))}}function qx(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=K(e,["elements","datum","groupKey","link","single"]);const f=n(t),h=new Set(f),d=Nc(f,l);n=Bx(f,r);const[p,y]=Dx(t,Object.assign({elements:f,valueof:n},Q(e,"link"))),{setState:g,removeState:i,hasState:m}=Rx(e,n),v=()=>{for(const t of f)i(t,"selected","unselected");c&&y()},a=t=>{t=t.target;if(!h.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of f)n.has(i)?g(i,"selected"):g(i,"unselected");c&&(y(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!f.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)g(o,"unselected");c&&y(t)}else{e=r.some(t=>m(t,"selected"));for(const s of f)a.has(s)?g(s,"selected"):m(s,"selected")||g(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function Gx(n){return t=>{var{container:t,view:e}=t;return qx(t,Object.assign(Object.assign({},jx(n)),{elements:Tx,datum:Ix(e)}))}}function Yx(n){return t=>{var{container:t,view:e}=t;return qx(t,Object.assign(Object.assign({},jx(n)),{elements:Tx,datum:Ix(e),groupKey:Fx(e)}))}}function Ux(n){return t=>{var{container:t,view:e}=t;return qx(t,Object.assign(Object.assign({},jx(n)),{elements:Tx,datum:Ix(e),groupKey:Cx()}))}}function Xx(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=K(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Fc(t.map(t=>d[t])),u=I({},e),f=u.marks.find(t=>"line"===t.type);t=Yc(Lc(t,t=>Yc(t,t=>+h[t])/Xc(t,t=>+h[t]),t=>l[t]).values());I(f,{scale:{y:{domain:[1/t,t]}}});const p=Nx(r),y=r.getElementsByClassName(et);const g=Nc(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),m=new F.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},Q(A,"rule"))}),v=new F.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},Q(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[kc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var k;const M=Rs(t=>{t=Lx(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of y){var{seriesIndex:a,key:o}=u.__data__,s=a[xc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),g.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return k=[0,0],ne(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[xc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function $x({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Nx(n),a=I({},e);for(const s of a.marks)s.animate=!1;const o=Rs(t=>{var e,n,t=Lx(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function Zx(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new pb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r),{items:e,title:a}=e;i.show(),i.update({x:n,y:r,items:e,title:a}),t.tooltipElement=i}function Kx(t){t=t.tooltipElement;t&&t.hide()}function Qx(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>$u(t)))}function Jx(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function t5(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter($u),t=t.flatMap((r,t)=>{var t=n[t],e=K(r,["title"]);const i=Jx(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions();return Object.assign({color:i,name:function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e;return t&&t.invert?t.invert(e):n&&n.invert?n.invert(r):null}(o,r)||n,value:void 0===e?e:""+e},Qx(a({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function e5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function n5(t,e){return void 0===t?e:t}function r5(l,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:c,coordinate:u,showCrosshairs:f,item:h}=t,t=K(t,["elements","wait","leading","trailing","scale","coordinate","showCrosshairs","item"]);const d=e(l),[,p]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(l),y=new Map(d.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Fc(e)]})),g=Q(t,"crosshairs"),a=Rs(t=>{const r=Lx(l,t);var t=l.getBounds(),e=t.min[0],t=t.min[1];if(r){var n=d.map(t=>{var e=y.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[cs(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=u.invert(t);return kc(e,t)})(r,e)),{x:e,y:n}=t;return[t,u.map([e,n])]}),i=n.map(t=>t[0]),n=n.map(t=>t[1]),i=t5(d,h,c,i);if(Zx(l,i,r[0]+e,r[1]+t),f){i=l,e=n,n=(t=Object.assign(Object.assign({},g),{height:p}))["height"],t=K(t,["height"]);const a=e=Qc(e.map(t=>t[0])),o=e,s=n;(n=i.ruleY||(e=new F.Line({style:Object.assign({x1:a,x2:o,y1:0,y2:s,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),i.appendChild(e),e)).style.x1=a,n.style.x2=o,n.style.y1=0,n.style.y2=s,i.ruleY=n}}},n,{leading:r,trailing:i}),o=()=>{var t;Kx(l),f&&(t=l).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return l.addEventListener("pointerenter",a),l.addEventListener("pointermove",a),l.addEventListener("pointerleave",o),()=>{l.removeEventListener("pointerover",a),l.removeEventListener("pointerout",a),l.removeEventListener("pointerleave",o)}}function i5(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=Nc(t,o),u=Rs(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=K(n,["title"]);const a=Jx(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=i[t].getOptions();return Object.assign({color:a,name:n,value:void 0===e?e:""+e},Qx(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):t5(n,s,i),{offsetX:t,offsetY:e}=t,Zx(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&Kx(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f)}}function a5(t){const{shared:o,showCrosshairs:s,series:l,item:c=()=>({})}=t,u=K(t,["shared","showCrosshairs","series","name","item"]);return t=>{var{container:t,view:e}=t,{scale:n,markState:r,coordinate:i}=e,a=e5(r,"seriesTooltip"),r=e5(r,"showCrosshairs"),t=Nx(t);return n5(l,a)?r5(t,Object.assign(Object.assign({},u),{elements:Tx,scale:n,coordinate:i,showCrosshairs:n5(s,r),item:c})):i5(t,Object.assign(Object.assign({},u),{elements:Tx,scale:n,coordinate:i,groupKey:o?Fx(e):void 0,item:c}))}}function o5(n){return(t,...e)=>I({},n(t,...e),t)}function s5(n){return(t,...e)=>I({},t,n(t,...e))}function l5(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=K(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}Px.props={};const c5=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=K(t,["data"]);return Object.assign(Object.assign({},t),{data:l5(e,o),x:n,y:r,width:i,height:a})})},u5=(c5.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var y=n[t],g=y["data"],y=K(y,["data"]),g=l5(g,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:g},y)),p+=h[t]+i}return d}),f5=(u5.props={},()=>t=>{var e=t["children"],t=K(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=K(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=K(t,["data","scale","axis","legend"]);return Object.assign({data:l5(e,a),scale:I({},o,n),axis:!(!r||!s)&&I({},s,r),legend:!(!i||!l)&&I({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),h5=(f5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:k,x:M,y:O,key:_,frame:S,title:E,labelTransform:A}=t,t=K(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform"]);return[{type:"standardView",x:M,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),d5=(h5.props={},o5(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Nc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),p5=o5(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:I({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:I({title:i},o)}}}),y5=o5(()=>({animate:{enterType:"fadeIn"}})),g5=s5(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),m5=s5(()=>({type:"cell"})),v5=s5(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),b5=s5((t,c=function(t){t=t.points;return M1(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?x5(a,e):(t=e.length?void 0:null,I({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?x5(r,e):(n=e.length?void 0:null,I({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1}=t,S=e["value"],{x:E,y:A}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=S1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[E]:t,[A]:e}=t,t=void 0===E||t===n,e=void 0===A||e===r;return t&&e}).map(t=>S.filter(t)),v=f?Yc(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:E,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:A,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],y=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=K(t,["scale","key","facet","axis","legend"]),a=null==(a=null==e?void 0:e.y)?void 0:a.guide,o=null==(o=null==e?void 0:e.x)?void 0:o.guide,s={x:{tickCount:E?5:void 0},y:{tickCount:A?5:void 0}},r=r?y:0===y.length?[]:S,l={color:{domain:P}},o={x:w5(o,w)(p,r),y:w5(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+g+O,y:f+m+_,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:I(s,e,l),axis:I({},i,o),legend:!1},t),M)})})}}});function x5(t,e){return e.length?I({title:!1,tickLine:null,label:null,subTickLine:null},t):I({title:!1,tickLine:null,label:null,subTickLine:null,grid:null},t)}function w5(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const k5=()=>t=>{return[lx.of(t).call(m5).call(p5).call(y5).call(d5).call(g5).call(v5).call(b5).value()]},M5=(k5.props={},o5(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),O5=s5(t=>{const{data:w,children:c,x:k=0,y:M=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=S1(t);const s=t.map(({points:t})=>M1(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,y]=l[c],g=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=K(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return x5(r,e)})(g,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return x5(n,e)})(g,w)};return Object.assign({data:w,key:i+"-"+c,x:u+m+k,y:f+v+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:I({x:{facet:!1},y:{facet:!1}},e),axis:I({x:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5},y:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5}},o,l),legend:!1,encode:I({},a,{x:p,y:y})},t)})})}}}),_5=s5(t=>{var e=t["encode"],t=K(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=K(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const S5=()=>t=>{return[lx.of(t).call(m5).call(p5).call(O5).call(_5).call(y5).call(g5).call(M5).value()]},E5=o5(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),A5=o5(t=>({coordinates:[{type:"polar"}]})),P5=t=>{var e=t["encode"],t=K(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function T5(t){return t=>null}function N5(t){var t=t["points"],[t,e,n,r]=t,i=x1(t,r),t=b1(t,r),r=b1(e,n),r=(e=r,r=w1(r=t),e=w1(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=k1(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const L5=()=>t=>{return[lx.of(t).call(m5).call(P5).call(p5).call(A5).call(v5).call(b5,N5,T5,T5,{frame:!1}).call(y5).call(g5).call(E5).value()]};const j5=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=I({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function C5(t,e){if(null!==t)return{type:"column",value:t,field:e}}function F5(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function I5(t,e){var n=[];for(const r of t)n[r]=e;return n}function R5(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function B5(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=R5(t,i);if(null!==n)return[n,r]}return[null,null]}function D5(t){return!(t instanceof Date)&&"object"==typeof t}j5.props={};const z5=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y1:C5(I5(t,0))}})]};function W5(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=R5(r,t))?void 0:t[0]]}).filter(([,t])=>$u(t));return Array.from(Nc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function H5(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:bc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>$5(t=>r(e[t]))):"series"===t?G5:"value"===t?Y5:"sum"===t?U5:"maxIndex"===t?X5:()=>null}function V5(t,e){for(const n of t)n.sort(e)}function q5(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function G5(t,e,n){return $5(t=>n[t])}function Y5(t,e,n){return $5(t=>e[t])}function U5(t,n,e){t=S1(t),t=Array.from(Nc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return $5(t=>r.get(e[t]))}function X5(t,n,e){t=S1(t),t=Array.from(Nc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Uc(e,t=>n[t])]));return $5(t=>r.get(e[t]))}function $5(n){return(t,e)=>bc(n(t),n(e))}z5.props={};const Z5=(t={})=>{const{groupBy:P="x",orderBy:T=null,reverse:N=!1,y:L="y",y1:j="y1",series:C=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=R5(r,"y"),[s,l]=R5(r,"y1"),[r]=C?B5(r,"series","color"):R5(r,"color"),c=W5(P,t,e),n=H5(T)(n,a,r),u=(n&&V5(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){N&&_.reverse();var y=s?+s[_[0]]:0,g=[],m=[];for(const S of _){var v=h[S]=+a[S]-y;v<0?m.push(S):0<=v&&g.push(S)}var b=0<g.length?g:m,x=0<m.length?m:g;let t=g.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=y;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=y;for(const A of g){var k=h[A];0<k?r=u[A]=(f[A]=r)+k:u[A]=f[A]=r}}const M=new Set(d),O=new Set(p);r="y"===L?u:f,n="y"===j?u:f;return[t,I({},e,{encode:{y:C5(r,o),y1:C5(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>O.has(e)},i)})]}};function K5(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}Z5.props={};const Q5=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(K5)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",Z5({groupBy:r})(t,e,n))},J5=(Q5.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=R5(n,i),[t,I({},e,{encode:{title:C5(r,n)}})])}}),tw=(J5.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,I({},e,{encode:{x:C5(I5(t,0))},scale:{x:{guide:null}}})]}),ew=(tw.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y:C5(I5(t,0))},scale:{y:{guide:null}}})]}),nw=(ew.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,I({},e,{encode:{size:F5(I5(t,3))}})]}),rw=(nw.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=K(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,I({},e,{encode:{key:C5(r)}})]}),iw=(rw.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=R5(n,"color"),[t,I({},e,{encode:{series:C5(r,i)}})])}),aw=(iw.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(D5)?[t,e]:[t,I({},e,{encode:{y:C5(n)}})]}),ow=(aw.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(D5)?[t,e]:[t,I({},e,{encode:{x:C5(n)}})]}),sw=(ow.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=R5(n,"y"),[t,I({},e,{encode:{y1:C5([...r])}})])}),lw=(sw.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=R5(n,"x"),[t,I({},e,{encode:{x1:C5([...r])}})])}),cw=(lw.props={},t=>{const a=t["channel"];return(t,e)=>{const r=e["encode"];var n=r["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(a)?a:[a];let i=0;n=n.flatMap(e=>Object.entries(r).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{var[e,n]=R5(r,t),t=[[t,C5(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),C5(e,n)]),i++),t}));return[t,I({},e,{encode:Object.fromEntries(n)})]}}),uw=(cw.props={},()=>(t,e)=>[t,I({scale:{x:{padding:0},y:{padding:0}}},e)]),fw=(uw.props={},()=>(t,e)=>{var{style:n={}}=e,r=K(e,["data","style"]),{x:i,y:a}=n,n=K(n,["x","y"]);return null==i||null==a?[t,e]:[[0],I({},r,{data:[0],cartesian:!0,encode:{x:C5([i||0]),y:C5([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),hw=(fw.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,I({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),dw=(hw.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(D5)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,I({},e,{encode:{x:C5(n),y:C5(r)}})])}),pw=(dw.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,I({},e,{encode:{series:F5(I5(t,void 0))}})]:[t,e]}),yw=(pw.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return K(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=R5(r,"y"),[r]=B5(r,"series","color"),o=q5(r,i),i=W5(c,t,e),n=H5(f)(n,a,r),s=(n&&V5(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,I({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:C5(s)}})]}}),gw=(yw.props={},t=>{const{groupBy:p=["x"],reducer:y=(t,e)=>e[t[0]],orderBy:g=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,R5(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Nc(n,t=>f[t]).values());a.push(...o)}i=a}if(g){const[h]=R5(e,g);h&&i.sort((t,e)=>y(t,h)-y(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[I5(n,r)]:B5(e,"enterDuration",I5(n,r));var[l]=B5(e,"enterDelay",I5(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=Yc(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,I({},t,{encode:{enterDuration:F5(s),enterDelay:F5(c)}})]}});gw.props={};const mw=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=K(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R5(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=W5(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>Xc(t,t=>e[+t]),max:(t,e)=>Yc(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Qc(t,t=>e[+t]),median:(t,e)=>Jc(t,t=>e[+t]),sum:(t,e)=>nu(t,t=>e[+t]),deviation:(t,e)=>_c(t,t=>e[+t])}[r]||Yc;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,I({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,C5(e,R5(n,t)[1])]))})]}};function vw(t,e,n){return null===t?[-.5,.5]:(t=q5(t,e),[-(e=new O0({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function bw(t,e,n){return e*(1-t)+n*t}mw.props={};const xw=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=R5(n,"x"),[n]=R5(n,"y");const o=vw(a,r,l),s=vw(n,i,c);a=t.map(()=>bw(u(),...s)),r=t.map(()=>bw(u(),...o));return[t,I({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:C5(a),dx:C5(r)}})]}},ww=(xw.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=R5(n,"x");const i=vw(n,r,a);n=t.map(()=>bw(o(),...i));return[t,I({scale:{x:{padding:.5}}},e,{encode:{dx:C5(n)}})]}}),kw=(ww.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=K(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,R5(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=W5(y,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Sc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,I({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,C5(e,R5(n,t)[1])]))})]}}),Mw=(kw.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=R5(n,"y");var[,i]=R5(n,"y1"),n=(f?B5(n,"series","color"):R5(n,"color"),W5(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,I({},e,{encode:{y1:C5(a,i)}})]}});function Ow(t,e){return[t[0]]}function _w(t,e){return[t[t.length-1]]}function Sw(t,e){return[t[Uc(t,t=>e[t])]]}function Ew(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}(t,t=>e[t])]]}Mw.props={};const Aw=(t={})=>{const{groupBy:s="series"}=t,l=K(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=W5(s,t,e),[r,i]=Object.entries(l)[0];const[a]=R5(n,r),o="function"==typeof(n=i)?n:{first:Ow,last:_w,max:Sw,min:Ew}[n]||Ow;return[t.flatMap(t=>o(t,a)),e]}},Pw=(Aw.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return Aw(Object.assign({x:e},t))}),Tw=(Pw.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return Aw(Object.assign({y:e},t))});function Nw(e){return t=>null===t?e:e+" of "+t}function Lw(){return[(t,e)=>Qc(t,t=>+e[t]),Nw("mean")]}function jw(){return[(t,e)=>Jc(t,t=>+e[t]),Nw("median")]}function Cw(){return[(t,e)=>Yc(t,t=>+e[t]),Nw("max")]}function Fw(){return[(t,e)=>Xc(t,t=>+e[t]),Nw("min")]}function Iw(){return[(t,e)=>t.length,Nw("count")]}function Rw(){return[(t,e)=>nu(t,t=>+e[t]),Nw("sum")]}function Bw(){return[(t,e)=>e[t[0]],Nw("first")]}function Dw(){return[(t,e)=>e[t[t.length-1]],Nw("last")]}Tw.props={};const zw=(t={})=>{const i=t["groupBy"],a=K(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=i(t,e);var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:Lw,max:Cw,count:Iw,first:Bw,last:Dw,sum:Rw,min:Fw,median:jw}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=R5(s,t);return[t,C5(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),n=Object.keys(s).map(t=>{const[e,n]=R5(s,t);return[t,C5(l.map(t=>e[t[0]]),n)]}),r=l.map(t=>o[t[0]]);return[S1(l),I({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},Ww=(zw.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=K(t,["channels"]);return zw(Object.assign(Object.assign({},e),{groupBy:(t,e)=>W5(n,t,e)}))}),Hw=(Ww.props={},(t={})=>Ww(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),Vw=(Hw.props={},(t={})=>Ww(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),qw=(Vw.props={},(t={})=>Ww(Object.assign(Object.assign({},t),{channels:["color"]})));qw.props={};const Gw=(t={})=>{const{reverse:s=!1,slice:l,channel:c}=t,u=K(t,["reverse","slice","channel"]);return(t,e)=>{var n=e["encode"];const[r]=R5(n,c);var i,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=R5(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>Yc(t,t=>+a[t]);if("min"===i)return t=>Xc(t,t=>+a[t]);if("sum"===i)return t=>nu(t,t=>+a[t]);if("median"===i)return t=>Jc(t,t=>+a[t]);if("mean"===i)return t=>Qc(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(c,u,n),n=(a=t,o=t=>r[t],(2!==(i=n).length?Fc(Lc(a,i,o),([t,e],[n,r])=>bc(e,r)||bc(t,n)):Fc(Nc(a,o),([t,e],[n,r])=>i(e,r)||bc(t,n))).map(([t])=>t)),a=(s&&n.reverse(),"number"==typeof l?[0,l]:l),o=l?n.slice(...a):n;return[t,I(e,{scale:{[c]:{domain:o}}})]}},Yw=(Gw.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channel:"x"}))),Uw=(Yw.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channel:"color"}))),Xw=(Uw.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channel:"y"})));Xw.props={};const $w=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=R5(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):R5(r,s)[0],r=jc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>nu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,I({},e,{scale:{x:{flex:r}}})]}};function Zw(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=M1(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}$w.props={};const Kw=()=>(t,e)=>[t,I({},e,{modifier:Zw,axis:!1})],Qw=(Kw.props={},"thresholds");function Jw(t){var[e,n]=Sc(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Oc(t))/(3.49*_c(t)))))}const t3=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=K(t,["groupChannels","binChannels"]),u={};return zw(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(Qw)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=R5(n,t);return t}),a=Q(c,Qw),o=t.filter(e=>i.every(t=>$u(t[e]))),r=[...s.map(t=>{var[t]=R5(n,t);return t}).filter($u).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||Jw(n),e=Gc().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Nc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},e3=(t3.props={},(t={})=>{var e=t["thresholds"];return t3(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});e3.props={};var aa="object"==typeof He&&He&&He.Object===Object&&He,oa="object"==typeof self&&self&&self.Object===Object&&self,la=aa||oa||Function("return this")(),sa=la.Symbol,ca=Object.prototype,n3=ca.hasOwnProperty,r3=ca.toString,i3=sa?sa.toStringTag:void 0;var a3=Object.prototype.toString;var o3="[object Null]",s3="[object Undefined]",l3=sa?sa.toStringTag:void 0;function c3(t){if(null==t)return void 0===t?s3:o3;if(l3&&l3 in Object(t)){var e=t,n=n3.call(e,i3),r=e[i3];try{var i=!(e[i3]=void 0)}catch(t){}var a=r3.call(e);return i&&(n?e[i3]=r:delete e[i3]),a}return a3.call(t)}function u3(t){return null!=t&&"object"==typeof t}var f3=Array.isArray;function h3(t){return t}var d3="[object AsyncFunction]",p3="[object Function]",y3="[object GeneratorFunction]",g3="[object Proxy]";function m3(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var v3=/^(?:0|[1-9]\d*)$/;var b3=9007199254740991;function x3(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=b3}function w3(t){return null!=t&&x3(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=c3(t))==p3||e==y3||e==d3||e==g3}(t)}var k3=Object.prototype;function M3(t){return u3(t)&&"[object Arguments]"==c3(t)}var f=Object.prototype,O3=f.hasOwnProperty,_3=f.propertyIsEnumerable,S3=M3(function(){return arguments}())?M3:function(t){return u3(t)&&O3.call(t,"callee")&&!_3.call(t,"callee")};var ua="object"==typeof v&&v&&!v.nodeType&&v,Oo=ua&&"object"==typeof module&&module&&!module.nodeType&&module,wo=Oo&&Oo.exports===ua?la.Buffer:void 0,E3=(wo?wo.isBuffer:void 0)||function(){return!1},A3={};A3["[object Float32Array]"]=A3["[object Float64Array]"]=A3["[object Int8Array]"]=A3["[object Int16Array]"]=A3["[object Int32Array]"]=A3["[object Uint8Array]"]=A3["[object Uint8ClampedArray]"]=A3["[object Uint16Array]"]=A3["[object Uint32Array]"]=!0,A3["[object Arguments]"]=A3["[object Array]"]=A3["[object ArrayBuffer]"]=A3["[object Boolean]"]=A3["[object DataView]"]=A3["[object Date]"]=A3["[object Error]"]=A3["[object Function]"]=A3["[object Map]"]=A3["[object Number]"]=A3["[object Object]"]=A3["[object RegExp]"]=A3["[object Set]"]=A3["[object String]"]=A3["[object WeakMap]"]=!1;var P3,Po="object"==typeof v&&v&&!v.nodeType&&v,T3=Po&&"object"==typeof module&&module&&!module.nodeType&&module,N3=T3&&T3.exports===Po&&aa.process,go=function(){try{var t=T3&&T3.require&&T3.require("util").types;return t?t:N3&&N3.binding&&N3.binding("util")}catch(t){}}(),No=go&&go.isTypedArray,L3=No?(P3=No,function(t){return P3(t)}):function(t){return u3(t)&&x3(t.length)&&!!A3[c3(t)]},j3=Object.prototype.hasOwnProperty;function C3(t,e){var n,r,i,a,o=f3(t),s=!o&&S3(t),l=!o&&!s&&E3(t),c=!o&&!s&&!l&&L3(t),u=o||s||l||c,f=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(n in t)!e&&!j3.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=h)?9007199254740991:i)&&("number"==a||"symbol"!=a&&v3.test(r))&&-1<r&&r%1==0&&r<i))||f.push(n);return f}F3=Object.keys,I3=Object;var F3,I3,R3=function(t){return F3(I3(t))},B3=Object.prototype.hasOwnProperty;function D3(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||k3))return R3(t);var e,n,r,i=[];for(r in Object(t))B3.call(t,r)&&"constructor"!=r&&i.push(r);return i}function z3(t){return(w3(t)?C3:D3)(t)}var W3,H3=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[W3?o:++r];if(!1===e(i[s],s,i))break}return t};q3=function(t,e){return t&&H3(t,e,z3)};function V3(t,e){if(null!=t){if(!w3(t))return q3(t,e);for(var n=t.length,r=G3?n:-1,i=Object(t);(G3?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var q3,G3;function Y3(t,e){(f3(t)?m3:V3)(t,"function"==typeof(t=e)?t:h3)}function U3(t,e,n){return e<=t&&t<=n}function X3(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function $3(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return 1;0<X3(c[1]-n)!=0<X3(u[1]-n)&&X3(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function Z3(t){for(var e,n,r=[],i=t.length,a=0;a<i-1;a++){var o=t[a],s=t[a+1];r.push({from:{x:o[0],y:o[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function K3(t,c){var u=!1;return Y3(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,a=n.y-e.y,o=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(o*o+t*t)*(s*s+r*r)<(n=o*r-t*s)*n&&U3(r=(i*r-a*s)/n,0,1)&&U3((i*t-a*o)/n,0,1)?{x:e.x+r*o,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,a,o,s,l}),u}function Q3(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function J3(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function t4(t){return t.style.priority||0}const e4=()=>(n,t)=>{var r=[];n.sort((t,e)=>bc(t4(t),t4(e)));for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var a=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,a,t=Q3(e),o=Q3(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,Y3(n,function(t){if($3(e,t[0],t[1]))return!(r=!0)}),r?1:(Y3(e,function(t){if($3(n,t[0],t[1]))return!(r=!0)}),r||(i=Z3(e),o=Z3(n),a=!1,Y3(o,function(t){if(K3(i,t))return!(a=!0)}),a))}}(J3(i),J3(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function n4(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const r4=t=>{const{maxIter:k=10,maxError:M=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[y,g]=n4(),[m,v]=n4();var a,o,s,l,[c,t]=n4(),[u,n]=n4();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,y]=r;var[r,f]=f;g(b,y),v(b,y),t(b,f-y),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>bc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const y=m(h);var d=c(h),p=m(e),d=p-(y+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,y-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-y(w)}return i}},i4=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(cu(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=Ku(i,r);const o=n+e,s=n+r-e;t.forEach(t=>{var{x:e,x0:n,y0:r}=t.style,e=e<=a[0]?o-e:s-e,{x:e,y:i}=(t.style.x+=e,t.style),n=b1([n,r],a),r=b1([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},a4=t=>(t,e)=>{if(cu(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,x1(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=k1([e-a[0],n-a[1]]),n=r?i*(Math.sin(e)<0?-1:1):0,r=a[0]+Math.sin(e)*o,i=a[1]-Math.cos(e)*o;t.style.x=r+n,t.style.y=i,t.style.connectorPoints=[[-n,0]]})}return t};var T=1e-6,o4=1e-12,A=Math.PI,s4=A/2,l4=A/4,c4=2*A,u4=180/A,f4=A/180,h4=Math.abs,d4=Math.atan,p4=Math.atan2,P=Math.cos,y4=Math.ceil,g4=Math.exp,m4=Math.log,v4=Math.pow,N=Math.sin,b4=Math.sign||function(t){return 0<t?1:t<0?-1:0},x4=Math.sqrt,w4=Math.tan;function k4(t){return 1<t?0:t<-1?A:Math.acos(t)}function M4(t){return 1<t?s4:t<-1?-s4:Math.asin(t)}function O4(){}function _4(t,e){t&&E4.hasOwnProperty(t.type)&&E4[t.type](t,e)}var S4={Feature:function(t,e){_4(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)_4(n[r].geometry,e)}},E4={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){A4(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)A4(n[r],e,0)},Polygon:function(t,e){P4(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)P4(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)_4(n[r],e)}};function A4(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function P4(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)A4(t[n],e,1);e.polygonEnd()}function T4(t,e){t&&S4.hasOwnProperty(t.type)?S4[t.type](t,e):_4(t,e)}function N4(t){return[p4(t[1],t[0]),M4(t[2])]}function L4(t){var e=t[0],t=t[1],n=P(t);return[n*P(e),n*N(e),N(t)]}function j4(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function C4(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function F4(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function I4(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function R4(t){var e=x4(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function B4(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function D4(t,e){return[h4(t)>A?t+Math.round(-t/c4)*c4:t,e]}function z4(t,e,n){return(t%=c4)?e||n?B4(H4(t),V4(e,n)):H4(t):e||n?V4(e,n):D4}function W4(n){return function(t,e){return[A<(t+=n)?t-c4:t<-A?t+c4:t,e]}}function H4(t){var e=W4(t);return e.invert=W4(-t),e}function V4(t,e){var i=P(t),a=N(t),o=P(e),s=N(e);function n(t,e){var n=P(e),r=P(t)*n,t=N(t)*n,n=N(e),e=n*i+r*a;return[p4(t*o-e*s,r*i-n*a),M4(e*o+t*s)]}return n.invert=function(t,e){var n=P(e),r=P(t)*n,t=N(t)*n,n=N(e),e=n*o-t*s;return[p4(t*o+n*s,r*i+e*a),M4(e*i-r*a)]},n}function q4(t,e){(e=L4(e))[0]-=t,R4(e);t=k4(-e[1]);return((-e[2]<0?-t:t)+c4-T)%c4}function G4(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:O4,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function Y4(t,e){return h4(t[0]-e[0])<T&&h4(t[1]-e[1])<T}function U4(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function X4(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(Y4(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*T}s.push(n=new U4(r,t,null,!0)),l.push(n.o=new U4(r,null,n,!1)),s.push(n=new U4(i,t,null,!1)),l.push(n.o=new U4(i,null,n,!0))}}),s.length){for(l.sort(e),$4(s),$4(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function $4(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function Z4(t){return h4(t[0])<=A?t[0]:b4(t[0])*((h4(t[0])+A)%c4-A)}function K4(g,m,v,b){return function(s){var l,c,u,n=m(s),f=G4(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=y,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=tu(c);var t=function(t,e){var n=Z4(e),r=e[1],e=N(r),i=[N(n),-P(n),0],a=0,o=0,s=new Ec;1===e?r=s4+T:-1===e&&(r=-s4-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=Z4(h),p=h[1]/2+l4,y=N(p),g=P(p),m=0;m<f;++m,d=b,y=w,g=x,h=v){var v=u[m],b=Z4(v),x=v[1]/2+l4,w=N(x),x=P(x),k=b-d,M=0<=k?1:-1,O=M*k,_=A<O,S=y*w;s.add(p4(S*M*N(O),g*x+S*P(O))),a+=_?k+M*c4:k,_^n<=d^n<=b&&(R4(S=C4(L4(h),L4(v))),R4(O=C4(i,S)),(M=(_^0<=k?-1:1)*M4(O[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=k?1:-1)}return(a<-T||a<T&&s<-o4)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),X4(c,J4,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){g(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function y(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(Q4))}return e}}function Q4(t){return 1<t.length}function J4(t,e){return((t=t.x)[0]<0?t[1]-s4-T:s4-t[1])-((e=e.x)[0]<0?e[1]-s4-T:s4-e[1])}D4.invert=D4;var tk=K4(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?A:-A,l=h4(t-f);h4(l-A)<T?(c.point(f,h=0<(h+e)/2?s4:-s4),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&A<=l&&(h4(f-d)<T&&(f-=d*T),h4(t-s)<T&&(t-=s*T),l=h,i=e,o=N((n=f)-(r=t)),h=h4(o)>T?d4((N(l)*(a=P(i))*N(r)-N(i)*(r=P(l))*N(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*s4,r.point(-A,i),r.point(0,i),r.point(A,i),r.point(A,0),r.point(A,-i),r.point(0,-i),r.point(-A,-i),r.point(-A,0),r.point(-A,i)):h4(t[0]-e[0])>T?(t=t[0]<e[0]?A:-A,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-A,-s4]);function ek(d){var y=P(d),p=6*f4,f=0<y,h=h4(y)>T;function g(t,e){return P(t)*P(e)>y}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=C4(L4(t),L4(e)),h=j4(f,f),d=f[0],p=h-d*d;return p?(r=C4(u,f),F4(u=I4(u,y*h/p),I4(f,-y*d/p)),(p=(f=j4(u,h=r))*f-(d=j4(h,h))*(j4(u,u)-1))<0?void 0:(F4(p=I4(h,(-f-(r=x4(p)))/d),u),p=N4(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=h4((s=a-i)-A)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(h4(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:A<s^(i<=p[0]&&p[0]<=a))?(F4(c=I4(h,(-f+r)/d),u),[p,N4(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:A-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return K4(g,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=g(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?A:-A),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!Y4(o,n)&&!Y4(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&Y4(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=P(r),c=N(r),u=o*a;null==n?(n=r+o*c4,s=r-u/2):(n=q4(l,n),s=q4(l,s),(0<o?n<s:s<n)&&(n+=o*c4));for(var f,h=n;0<o?s<h:h<s;h-=u)f=N4([l,-c*P(h),-c*N(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-A,d-A])}var nk=1e9,rk=-nk;function ik(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return h4(t[0]-m)<T?0<e?0:3:h4(t[0]-b)<T?0<e?2:1:h4(t[1]-v)<T?0<e?1:0:0<e?3:2}function M(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,y=r,t=G4(),e={point:n,lineStart:function(){e.point=g,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(g(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&y.lineEnd()},polygonStart:function(){y=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=tu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&X4(i,M,t,k,r),r.polygonEnd());y=r,i=f=a=null}};function n(t,e){w(t,e)&&y.point(t,e)}function g(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(y.lineStart(),y.point(t,e))):i&&h?y.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(rk,Math.min(nk,c)),u=Math.max(rk,Math.min(nk,u))],r=[t=Math.max(rk,Math.min(nk,t)),e=Math.max(rk,Math.min(nk,e))],m,v,b,x)?i&&(y.lineStart(),y.point(t,e),p=!1):(h||(y.lineStart(),y.point(n[0],n[1])),y.point(r[0],r[1]),i||y.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function ak(t,e,n){var r=eu(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function ok(t,e,n){var r=eu(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function sk(){return y=p=10,g=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(g=+t[0],m=+t[1],e):[g,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],y=+t[1],e):[p,y]},e.precision=function(t){return arguments.length?(v=+t,u=ak(s,o,90),f=ok(r,n,v),h=ak(c,l,90),d=ok(a,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return eu(y4(a/g)*g,i,g).map(h).concat(eu(y4(c/m)*m,l,m).map(d)).concat(eu(y4(r/p)*p,n,p).filter(function(t){return h4(t%g)>T}).map(u)).concat(eu(y4(s/y)*y,o,y).filter(function(t){return h4(t%m)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,m,v}var lk,ck,uk,fk,hk=t=>t,dk=new Ec,pk=new Ec,yk={point:O4,lineStart:O4,lineEnd:O4,polygonStart:function(){yk.lineStart=gk,yk.lineEnd=bk},polygonEnd:function(){yk.lineStart=yk.lineEnd=yk.point=O4,dk.add(h4(pk)),pk=new Ec},result:function(){var t=dk/2;return dk=new Ec,t}};function gk(){yk.point=mk}function mk(t,e){yk.point=vk,lk=uk=t,ck=fk=e}function vk(t,e){pk.add(fk*t-uk*e),uk=t,fk=e}function bk(){vk(lk,ck)}var xk=yk,wk=1/0,kk=wk,Mk=-wk,Ok=Mk;var _k,Sk,Ek,Ak,Pk={point:function(t,e){t<wk&&(wk=t);Mk<t&&(Mk=t);e<kk&&(kk=e);Ok<e&&(Ok=e)},lineStart:O4,lineEnd:O4,polygonStart:O4,polygonEnd:O4,result:function(){var t=[[wk,kk],[Mk,Ok]];return Mk=Ok=-(kk=wk=1/0),t}},Tk=0,Nk=0,Lk=0,jk=0,Ck=0,Fk=0,Ik=0,Rk=0,Bk=0,Dk={point:zk,lineStart:Wk,lineEnd:qk,polygonStart:function(){Dk.lineStart=Gk,Dk.lineEnd=Yk},polygonEnd:function(){Dk.point=zk,Dk.lineStart=Wk,Dk.lineEnd=qk},result:function(){var t=Bk?[Ik/Bk,Rk/Bk]:Fk?[jk/Fk,Ck/Fk]:Lk?[Tk/Lk,Nk/Lk]:[NaN,NaN];return Tk=Nk=Lk=jk=Ck=Fk=Ik=Rk=Bk=0,t}};function zk(t,e){Tk+=t,Nk+=e,++Lk}function Wk(){Dk.point=Hk}function Hk(t,e){Dk.point=Vk,zk(Ek=t,Ak=e)}function Vk(t,e){var n=t-Ek,r=e-Ak,n=x4(n*n+r*r);jk+=n*(Ek+t)/2,Ck+=n*(Ak+e)/2,Fk+=n,zk(Ek=t,Ak=e)}function qk(){Dk.point=zk}function Gk(){Dk.point=Uk}function Yk(){Xk(_k,Sk)}function Uk(t,e){Dk.point=Xk,zk(_k=Ek=t,Sk=Ak=e)}function Xk(t,e){var n=t-Ek,r=e-Ak,n=x4(n*n+r*r);jk+=n*(Ek+t)/2,Ck+=n*(Ak+e)/2,Fk+=n,Ik+=(n=Ak*t-Ek*e)*(Ek+t),Rk+=n*(Ak+e),Bk+=3*n,zk(Ek=t,Ak=e)}var $k=Dk;function Zk(t){this._context=t}Zk.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,c4)}},result:O4};var Kk,Qk,Jk,tM,eM,nM=new Ec,rM={point:O4,lineStart:function(){rM.point=iM},lineEnd:function(){Kk&&aM(Qk,Jk),rM.point=O4},polygonStart:function(){Kk=!0},polygonEnd:function(){Kk=null},result:function(){var t=+nM;return nM=new Ec,t}};function iM(t,e){rM.point=aM,Qk=tM=t,Jk=eM=e}function aM(t,e){tM-=t,eM-=e,nM.add(x4(tM*tM+eM*eM)),tM=t,eM=e}var oM=rM;function sM(){this._string=[]}function lM(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function cM(e,n){var r,i,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),T4(t,r(i))),i.result()}return o.area=function(t){return T4(t,r(xk)),xk.result()},o.measure=function(t){return T4(t,r(oM)),oM.result()},o.bounds=function(t){return T4(t,r(Pk)),Pk.result()},o.centroid=function(t){return T4(t,r($k)),$k.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,hk):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new sM):new Zk(n=t),"function"!=typeof a&&i.pointRadius(a),o):n},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),o):a},o.projection(e).context(n)}function uM(r){return function(t){var e,n=new fM;for(e in r)n[e]=r[e];return n.stream=t,n}}function fM(){}function hM(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),T4(n,t.stream(Pk)),e(Pk.result()),null!=r&&t.clipExtent(r),t}function dM(i,a,t){return hM(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function pM(t,e,n){return dM(t,[[0,0],e],n)}function yM(r,i,t){return hM(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function gM(i,a,t){return hM(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}sM.prototype={_radius:4.5,_circle:lM(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=lM(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){var t;return this._string.length?(t=this._string.join(""),this._string=[],t):null}},fM.prototype={constructor:fM,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var mM=16,vM=P(30*f4);function bM(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,y={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),y.lineStart=v},polygonEnd:function(){r.polygonEnd(),y.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,y.point=g,r.lineStart()}function g(t,e){var n=L4([t,e]),e=E(t,e);P(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],mM,r),r.point(u,f)}function m(){y.point=t,r.lineEnd()}function v(){e(),y.point=b,y.lineEnd=x}function b(t,e){g(n=t,e),i=u,a=f,o=h,s=d,l=p,y.point=g}function x(){P(u,f,c,h,d,p,i,a,n,o,s,l,mM,r),y.lineEnd=m,m()}return y}):(n=t,uM({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function P(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,y,g,m,v,b,x,w,k,M,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(g=a+f,x=M4(g/=m=x4((p=r+c)*p+(y=i+u)*y+g*g)),v=h4(h4(g)-1)<T||h4(n-l)<T?(n+l)/2:p4(y,p),b=(x=E(v,x))[0],x=x[1],A<(M=_*(w=b-t)-O*(k=x-e))*M/S||.3<h4((O*w+_*k)/S-.5)||r*c+i*u+a*f<vM)&&(P(t,e,n,r,i,a,b,x,v,p/=m,y/=m,g,h,d),d.point(b,x),P(b,x,v,p,y,g,o,s,l,c,u,f,h,d))}}var xM=uM({point:function(t,e){this.stream.point(t*f4,e*f4)}});function wM(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,y,g,m;return e?(f=P(e),e=N(e),h=f*t,d=e*t,p=f/t,y=e/t,g=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-y*e+g),a*(m-y*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function kM(t){return MM(function(){return t})()}function MM(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,y=0,g=0,m=0,v=0,b=0,x=1,w=1,k=null,M=tk,O=null,_=hk,S=.5;function E(t){return l(t[0]*f4,t[1]*f4)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*u4,t[1]*u4]}function P(){var t=wM(f,0,0,x,w,b).apply(null,e(p,y)),t=wM(f,h-t[0],d-t[1],x,w,b);return r=z4(g,m,v),s=B4(e,t),l=B4(r,s),o=bM(s,S),T()}function T(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=xM((n=r,uM({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,k=void 0,T()):M},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,T()):_},E.clipAngle=function(t){return arguments.length?(M=+t?ek(k=t*f4):(k=null,tk),T()):k*u4},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,hk):ik(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,P()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],P()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*f4,y=t[1]%360*f4,P()):[p*u4,y*u4]},E.rotate=function(t){return arguments.length?(g=t[0]%360*f4,m=t[1]%360*f4,v=2<t.length?t[2]%360*f4:0,P()):[g*u4,m*u4,v*u4]},E.angle=function(t){return arguments.length?(b=t%360*f4,P()):b*u4},E.reflectX=function(t){return arguments.length?(x=t?-1:1,P()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,P()):w<0},E.precision=function(t){return arguments.length?(o=bM(s,S=t*t),T()):x4(S)},E.fitExtent=function(t,e){return dM(E,t,e)},E.fitSize=function(t,e){return pM(E,t,e)},E.fitWidth=function(t,e){return yM(E,t,e)},E.fitHeight=function(t,e){return gM(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,P()}}function OM(t){var e=0,n=A/3,r=MM(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*f4,n=t[1]*f4):[e*u4,n*u4]},t}function _M(t,e){var n,r,i,a=N(t),o=(a+N(e))/2;return h4(o)<T?(n=P(t),s.invert=function(t,e){return[t/n,M4(e*n)]},s):(i=x4(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=p4(t,h4(e))*b4(e);return e*o<0&&(n-=A*b4(t)*b4(e)),[n/o,M4((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,N(e)/n]}function l(t,e){e=x4(r-2*o*N(e))/o;return[e*N(t*=o),i-e*P(t)]}}function SM(){return OM(_M).scale(155.424).center([0,33.6442])}function EM(){return SM().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function AM(i){return function(t,e){var n=P(t),r=P(e),n=i(n*r);return n===1/0?[2,0]:[n*r*N(t),n*N(e)]}}function PM(a){return function(t,e){var n=x4(t*t+e*e),r=a(n),i=N(r),r=P(r);return[p4(t*i,n*r),M4(n&&e*i/n)]}}var TM=AM(function(t){return x4(2/(1+t))});TM.invert=PM(function(t){return 2*M4(t/2)});var NM=AM(function(t){return(t=k4(t))&&t/N(t)});function LM(t,e){return[t,m4(w4((s4+e)/2))]}function jM(r){var i,a,o,s=kM(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=A*l(),n=s((e=z4((e=s.rotate())[0]*f4,e[1]*f4,2<e.length?e[2]*f4:0),function(t){return(t=e.invert(t[0]*f4,t[1]*f4))[0]*=u4,t[1]*=u4,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===LM?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function CM(t){return w4((s4+t)/2)}function FM(t,e){var n=P(t),i=t===e?N(t):m4(n/P(e))/m4(CM(e)/CM(t)),a=n*v4(CM(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=b4(i)*x4(t*t+e*e),r=p4(t,h4(e))*b4(e);return e*i<0&&(r-=A*b4(t)*b4(e)),[r/i,2*d4(v4(a/n,1/i))-s4]},r):LM;function r(t,e){0<a?e<-s4+T&&(e=-s4+T):s4-T<e&&(e=s4-T);e=a/v4(CM(e),i);return[e*N(i*t),a-e*P(i*t)]}}function IM(t,e){return[t,e]}function RM(t,e){var n=P(t),r=t===e?N(t):(n-P(e))/(e-t),i=n/r+t;return h4(r)<T?IM:(a.invert=function(t,e){var e=i-e,n=p4(t,h4(e))*b4(e);return e*r<0&&(n-=A*b4(t)*b4(e)),[n/r,i-b4(r)*x4(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*N(t),i-e*P(t)]}}NM.invert=PM(function(t){return t}),LM.invert=function(t,e){return[t,2*d4(g4(e))-s4]},IM.invert=IM;var BM=1.340264,DM=-.081106,zM=893e-6,WM=.003796,HM=x4(3)/2;function VM(t,e){var e=M4(HM*N(e)),n=e*e,r=n*n*n;return[t*P(e)/(HM*(BM+3*DM*n+r*(7*zM+9*WM*n))),e*(BM+DM*n+r*(zM+WM*n))]}function qM(t,e){var n=P(e),r=P(t)*n;return[n*N(t)/r,N(e)/r]}function GM(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function YM(t,e){return[P(e)*N(t),N(e)]}function UM(t,e){var n=P(e),r=1+P(t)*n;return[n*N(t)/r,N(e)/r]}function XM(t,e){return[m4(w4((s4+e)/2)),-t]}VM.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(BM+DM*i+a*(zM+WM*i))-e)/(BM+3*DM*i+a*(7*zM+9*WM*i)))*r)*i*i,!(h4(n)<o4));++o);return[HM*t*(BM+3*DM*i+a*(7*zM+9*WM*i))/P(r),M4(N(r)/HM)]},qM.invert=PM(d4),GM.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),h4(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},YM.invert=PM(M4),UM.invert=PM(function(t){return 2*d4(t)}),XM.invert=function(t,e){return[-e,2*d4(g4(t))-s4]};var $M=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=EM(),l=SM().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=SM().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return dM(f,t,e)},f.fitSize=function(t,e){return pM(f,t,e)},f.fitWidth=function(t,e){return yM(f,t,e)},f.fitHeight=function(t,e){return gM(f,t,e)},f.scale(1070)},geoAlbers:EM,geoAzimuthalEqualArea:function(){return kM(TM).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:TM,geoAzimuthalEquidistant:function(){return kM(NM).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:NM,geoConicConformal:function(){return OM(FM).scale(109.5).parallels([30,30])},geoConicConformalRaw:FM,geoConicEqualArea:SM,geoConicEqualAreaRaw:_M,geoConicEquidistant:function(){return OM(RM).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:RM,geoEqualEarth:function(){return kM(VM).scale(177.158)},geoEqualEarthRaw:VM,geoEquirectangular:function(){return kM(IM).scale(152.63)},geoEquirectangularRaw:IM,geoGnomonic:function(){return kM(qM).scale(144.049).clipAngle(60)},geoGnomonicRaw:qM,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,y=1,g=1,m=uM({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=hk;function b(){return y=l*f,g=l*h,o=s=null,x}function x(t){var e,n=t[0]*y,t=t[1]*g;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/y,t/g]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,hk):ik(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=N(d=t%360*f4),r=P(d),b()):d*u4},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return dM(x,t,e)},x.fitSize=function(t,e){return pM(x,t,e)},x.fitWidth=function(t,e){return yM(x,t,e)},x.fitHeight=function(t,e){return gM(x,t,e)},x},geoProjection:kM,geoProjectionMutator:MM,geoMercator:function(){return jM(LM).scale(961/c4)},geoMercatorRaw:LM,geoNaturalEarth1:function(){return kM(GM).scale(175.295)},geoNaturalEarth1Raw:GM,geoOrthographic:function(){return kM(YM).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:YM,geoStereographic:function(){return kM(UM).scale(250).clipAngle(142)},geoStereographicRaw:UM,geoTransverseMercator:function(){var t=jM(XM),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:XM});function ZM(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function KM(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(JM),e.find(t=>t.sphere)?{type:"Sphere"}:ZM(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=cM(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function QM(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[sk()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function JM(t){return"geoPath"===t.type}var t6,Lo=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=K(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+ms(t);if(e=$M[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(QM);let y;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(KM(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);y=cM(i);const u=new F0({domain:[t,t+n]}),f=new F0({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return JM(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>y(t)})})):t;var e})})]},Ro=(Lo.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=K(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});Ro.props={};const e6={"composition.geoView":Lo,"composition.geoPath":Ro};function n6(){return Object.assign({"data.fetch":wh,"data.inline":Ph,"data.sortBy":Ah,"data.filter":Mh,"data.pick":Sh,"data.rename":Eh,"data.subset":_h,"data.fold":kh,"data.custom":Th,"data.map":Nh,"data.cluster":oh,"data.tree":sh,"data.sankey":Gu,"data.arc":Fh,"data.wordCloud":ed,"data.join":rd,"transform.maybeZeroY1":z5,"transform.maybeZeroX":tw,"transform.maybeStackY":Q5,"transform.maybeTitle":J5,"transform.maybeSeries":iw,"transform.maybeZeroPadding":uw,"transform.stackY":Z5,"transform.binX":e3,"transform.bin":t3,"transform.dodgeX":yw,"transform.jitter":xw,"transform.jitterX":ww,"transform.symmetryY":kw,"transform.diffY":Mw,"transform.stackEnter":gw,"transform.normalizeY":mw,"transform.select":Aw,"transform.selectX":Pw,"transform.selectY":Tw,"transform.groupX":Hw,"transform.groupY":Vw,"transform.groupColor":qw,"transform.group":Ww,"transform.maybeSize":nw,"transform.maybeZeroY":ew,"transform.maybeKey":rw,"transform.sortX":Yw,"transform.sortY":Xw,"transform.sortColor":Uw,"transform.flexX":$w,"transform.maybeTupleY":aw,"transform.maybeTupleX":ow,"transform.maybeIdentityY":sw,"transform.maybeIdentityX":lw,"transform.maybeTuple":dw,"transform.maybeVisualPosition":fw,"transform.maybeFunctionAttribute":hw,"transform.maybeGradient":pw,"transform.maybeTooltip":cw,"transform.pack":Kw,"coordinate.cartesian":zs,"coordinate.polar":Ws,"coordinate.helix":Hs,"coordinate.transpose":Vs,"coordinate.theta":Us,"coordinate.reflect":qs,"coordinate.reflectX":Gs,"coordinate.reflectY":Ys,"coordinate.parallel":$s,"coordinate.fisheye":Zs,"coordinate.fisheyeX":Ks,"coordinate.fisheyeY":Qs,"coordinate.radial":Xs,"encode.constant":Js,"encode.field":el,"encode.transform":tl,"encode.column":nl,"mark.interval":mc,"mark.rect":vc,"mark.line":hu,"mark.point":du,"mark.text":pu,"mark.cell":yu,"mark.area":gu,"mark.link":mu,"mark.image":vu,"mark.polygon":bu,"mark.box":xu,"mark.vector":wu,"mark.lineX":Mu,"mark.lineY":ku,"mark.connector":Ou,"mark.range":Eu,"mark.rangeX":Au,"mark.rangeY":Pu,"mark.sankey":Qu,"mark.path":Ju,"mark.treemap":af,"mark.pack":of,"mark.boxplot":yf,"mark.shape":gf,"mark.forceGraph":ih,"mark.tree":lh,"mark.wordCloud":id,"palette.category10":ad,"palette.category20":od,"palette.sequentialBlue":sd,"palette.sequentialDarkBlue":ld,"palette.sequentialGreen":cd,"palette.sequentialDarkGreen":ud,"palette.sequentialGrey":fd,"palette.sequentialOrange":hd,"palette.sequentialPink":dd,"palette.sequentialRed":pd,"palette.sequentialYellow":yd,"palette.sequentialPurple":gd,"palette.sequentialYellowOrange":md,"palette.sequentialYellowGreen":vd,"palette.sequentialPinkPurple":bd,"palette.sequentialGreenBlue":xd,"palette.divergingGreenYellow":wd,"palette.divergingRedBlue":kd,"palette.divergingGreenRed":Md,"palette.divergingRedPurple":Od,"scale.linear":lp,"scale.ordinal":cp,"scale.band":sp,"scale.identity":up,"scale.point":fp,"scale.time":hp,"scale.log":dp,"scale.pow":pp,"scale.sqrt":vp,"scale.threshold":yp,"scale.quantile":gp,"scale.quantize":mp,"scale.sequential":bp,"shape.interval.rect":F1,"shape.interval.hollow":I1,"shape.interval.funnel":R1,"shape.interval.pyramid":D1,"shape.rect.rect":F1,"shape.rect.hollow":I1,"shape.cell.cell":F1,"shape.cell.hollow":I1,"shape.line.line":V1,"shape.line.hv":G1,"shape.line.vh":Y1,"shape.line.hvh":U1,"shape.line.smooth":q1,"shape.point.bowtie":Z1,"shape.point.cross":K1,"shape.point.diamond":Q1,"shape.point.hexagon":J1,"shape.point.hollowBowtie":ty,"shape.point.hollowDiamond":ey,"shape.point.hollowHexagon":ny,"shape.point.hollow":ry,"shape.point.hollowSquare":iy,"shape.point.hollowTriangle":ay,"shape.point.hollowTriangleDown":oy,"shape.point.hyphen":sy,"shape.point.line":ly,"shape.point.plus":cy,"shape.point.point":uy,"shape.point.square":fy,"shape.point.tick":hy,"shape.point.triangle":dy,"shape.point.triangleDown":py,"shape.text.text":$b,"shape.area.area":t2,"shape.area.smooth":e2,"shape.area.step":n2,"shape.link.smooth":i2,"shape.link.vhv":a2,"shape.link.arc":o2,"shape.link.link":r2,"shape.image.image":s2,"shape.polygon.polygon":l2,"shape.polygon.ribbon":c2,"shape.box.box":u2,"shape.vector.vector":yy,"shape.label.label":M2,"shape.text.badge":Kb,"shape.lineX.line":f2,"shape.lineY.line":f2,"shape.shape.shape":E2,"shape.connector.connector":p2,"shape.range.range":F1,"shape.rangeX.range":F1,"shape.rangeY.range":F1,"shape.path.path":_2,"shape.path.hollow":S2,"theme.light":N2,"theme.dark":F2,"component.axisX":ex,"component.axisY":nx,"component.legendCategory":rx,"component.legendContinuous":ix,"component.title":sx,"animation.scaleInX":dx,"animation.scaleOutX":px,"animation.scaleInY":yx,"animation.scaleOutY":gx,"animation.waveIn":Ox,"animation.fadeIn":mx,"animation.fadeOut":vx,"animation.zoomIn":_x,"animation.zoomOut":Sx,"animation.pathIn":Ex,"animation.morphing":Mx,"animation.growInX":Ax,"animation.growInY":Px,"interaction.elementHighlight":Wx,"interaction.elementHighlightByX":Hx,"interaction.elementHighlightByColor":Vx,"interaction.elementSelect":Gx,"interaction.elementSelectByX":Yx,"interaction.elementSelectByColor":Ux,"interaction.fisheye":$x,"interaction.chartIndex":Xx,"interaction.tooltip":a5,"composition.spaceLayer":c5,"composition.spaceFlex":u5,"composition.mark":h5,"composition.view":f5,"composition.facetRect":k5,"composition.repeatMatrix":S5,"composition.facetCircle":L5,"composition.timingKeyframe":j5,"labelTransform.hideOverlap":e4,"labelTransform.dodgeY":r4,"labelTransform.spider":i4,"labelTransform.surround":a4},e6)}function r6(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function i6(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Uu("Unknown Component: "+t)};return[t=>{var e=t["type"],t=K(t,["type"]);return r(e)(Object.assign({},t))},r]}function y(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(ko=t6=t6||{}).BEFORE_RENDER="beforerender",ko.AFTER_RENDER="afterrender",ko.BEFORE_PAINT="beforepaint",ko.AFTER_PAINT="afterpaint",ko.BEFORE_CHANGE_DATA="beforechangedata",ko.AFTER_CHANGE_DATA="afterchangedata",ko.BEFORE_CLEAR="beforeclear",ko.AFTER_CLEAR="afterclear",ko.BEFORE_DESTROY="beforedestroy",ko.AFTER_DESTROY="afterdestroy",ko.BEFORE_CHANGE_SIZE="beforechangesize",ko.AFTER_CHANGE_SIZE="afterchangesize";c=y("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),n=y("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),a=y("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),r=y("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Ao=y("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Qa=y("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),_o=y("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),db=y("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),So=y("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Kl=y("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function a6(t,e,n){(t.prototype=e.prototype=n).constructor=t}function o6(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function s6(){}var l6=1/.7,e="\\s*([+-]?\\d+)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c6=/^#([0-9a-f]{3,8})$/,u6=new RegExp(`^rgb\\(${e},${e},${e}\\)$`),f6=new RegExp(`^rgb\\(${Ki},${Ki},${Ki}\\)$`),h6=new RegExp(`^rgba\\(${e},${e},${e},${Mo}\\)$`),d6=new RegExp(`^rgba\\(${Ki},${Ki},${Ki},${Mo}\\)$`),p6=new RegExp(`^hsl\\(${Mo},${Ki},${Ki}\\)$`),y6=new RegExp(`^hsla\\(${Mo},${Ki},${Ki},${Mo}\\)$`),g6={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function m6(){return this.rgb().formatHex()}function v6(){return this.rgb().formatRgb()}function b6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=c6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?x6(e):3===n?new O6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?w6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?w6(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=u6.exec(t))?new O6(e[1],e[2],e[3],1):(e=f6.exec(t))?new O6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h6.exec(t))?w6(e[1],e[2],e[3],e[4]):(e=d6.exec(t))?w6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p6.exec(t))?T6(e[1],e[2]/100,e[3]/100,1):(e=y6.exec(t))?T6(e[1],e[2]/100,e[3]/100,e[4]):g6.hasOwnProperty(t)?x6(g6[t]):"transparent"===t?new O6(NaN,NaN,NaN,0):null}function x6(t){return new O6(t>>16&255,t>>8&255,255&t,1)}function w6(t,e,n,r){return new O6(t=r<=0?e=n=NaN:t,e,n,r)}function k6(t){return(t=t instanceof s6?t:b6(t))?new O6((t=t.rgb()).r,t.g,t.b,t.opacity):new O6}function M6(t,e,n,r){return 1===arguments.length?k6(t):new O6(t,e,n,null==r?1:r)}function O6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _6(){return"#"+P6(this.r)+P6(this.g)+P6(this.b)}function S6(){var t=E6(this.opacity);return(1===t?"rgb(":"rgba(")+A6(this.r)+`, ${A6(this.g)}, `+A6(this.b)+(1===t?")":`, ${t})`)}function E6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function A6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function P6(t){return((t=A6(t))<16?"0":"")+t.toString(16)}function T6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new L6(t,e,n,r)}function N6(t){var e,n,r,i,a,o,s,l;return t instanceof L6?new L6(t.h,t.s,t.l,t.opacity):(t=t instanceof s6?t:b6(t))?t instanceof L6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new L6(o,s,l,t.opacity)):new L6}function L6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function j6(t){return(t=(t||0)%360)<0?t+360:t}function C6(t){return Math.max(0,Math.min(1,t||0))}function F6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}a6(s6,b6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:m6,formatHex:m6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return N6(this).formatHsl()},formatRgb:v6,toString:v6}),a6(O6,M6,o6(s6,{brighter(t){return t=null==t?l6:Math.pow(l6,t),new O6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new O6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new O6(A6(this.r),A6(this.g),A6(this.b),E6(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:_6,formatHex:_6,formatHex8:function(){return"#"+P6(this.r)+P6(this.g)+P6(this.b)+P6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:S6,toString:S6})),a6(L6,function(t,e,n,r){return 1===arguments.length?N6(t):new L6(t,e,n,null==r?1:r)},o6(s6,{brighter(t){return t=null==t?l6:Math.pow(l6,t),new L6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new L6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new O6(F6(240<=t?t-240:120+t,n,e),F6(t,n,e),F6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new L6(j6(this.h),C6(this.s),C6(this.l),E6(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(){var t=E6(this.opacity);return(1===t?"hsl(":"hsla(")+j6(this.h)+`, ${100*C6(this.s)}%, ${100*C6(this.l)}%`+(1===t?")":`, ${t})`)}}));const I6=Math.PI/180,R6=180/Math.PI;var B6=1.78277,D6=-.29227,z6=-.90649,W6=1.97294,H6=W6*z6,V6=W6*B6,q6=B6*D6- -.14861*z6;function G6(t,e,n,r){return 1===arguments.length?(i=t)instanceof Y6?new Y6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof O6?i:k6(i)).r/255,o=i.g/255,l=i.b/255,l=(W6*(o-(a=(q6*l+H6*a-V6*o)/(q6+H6-V6)))-D6*(o=l-a))/z6,new Y6((l=(s=Math.sqrt(l*l+o*o)/(W6*a*(1-a)))?Math.atan2(l,o)*R6-120:NaN)<0?l+360:l,s,a,i.opacity)):new Y6(t,e,n,null==r?1:r);var i,a,o,s,l}function Y6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}a6(Y6,G6,o6(s6,{brighter(t){return t=null==t?l6:Math.pow(l6,t),new Y6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Y6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*I6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new O6(255*(e+n*(-.14861*r+B6*t)),255*(e+n*(D6*r+z6*t)),255*(e+W6*r*n),this.opacity)}}));var U6=t=>()=>t;function X6(e,n){return function(t){return e+t*n}}function $6(a){return 1==(a=+a)?Z6:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):U6(isNaN(t)?e:t);var n,r,i}}function Z6(t,e){var n=e-t;return n?X6(t,n):U6(isNaN(t)?e:t)}!function t(e){var o=$6(e);function n(e,t){var n=o((e=M6(e)).r,(t=M6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=Z6(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);K6=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var K6,Q6=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=M6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=K6(r),i=K6(i),a=K6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function J6(s){return function t(o){function e(e,t){var n=s((e=G6(e)).h,(t=G6(t)).h),r=Z6(e.s,t.s),i=Z6(e.l,t.l),a=Z6(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}J6(function(t,e){var n=e-t;return n?X6(t,180<n||n<-180?n-360*Math.round(n/360):n):U6(isNaN(t)?e:t)});var Eo=J6(Z6),o=t=>Q6(t[t.length-1]),ea=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(y),ta=o(ea),ra=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(y),u=o(ra),na=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(y),ia=o(na),He=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(y),oa=o(He),ca=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(y),sa=o(ca),f=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(y),Oo=o(f),ua=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(y),la=o(ua),wo=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(y),Po=o(wo),aa=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(y),go=o(aa),No=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(y),Lo=o(No),Ro=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(y),ko=o(Ro),e=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(y),Ki=o(e),Mo=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(y),t8=o(Mo),e8=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(y),n8=o(e8),r8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(y),i8=o(r8),a8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(y),o8=o(a8),s8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(y),l8=o(s8),c8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(y),u8=o(c8),f8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(y),h8=o(f8),d8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(y),p8=o(d8),y8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(y),g8=o(y8),m8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(y),v8=o(m8),b8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(y),x8=o(b8),w8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(y),k8=o(w8),M8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(y),O8=o(M8),_8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(y),S8=o(_8),E8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(y),o=o(E8);var A8=Eo(G6(300,.5,0),G6(-240,.5,1)),P8=Eo(G6(-100,.75,.35),G6(80,1.5,.8)),Eo=Eo(G6(260,.75,.35),G6(80,1.5,.8)),T8=G6();var N8=M6(),L8=Math.PI/3,j8=2*Math.PI/3;function C8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var F8=C8(y("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),I8=C8(y("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),R8=C8(y("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),B8=C8(y("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),D8=Object.freeze({__proto__:null,schemeCategory10:c,schemeAccent:n,schemeDark2:a,schemePaired:r,schemePastel1:Ao,schemePastel2:Qa,schemeSet1:_o,schemeSet2:db,schemeSet3:So,schemeTableau10:Kl,interpolateBrBG:ta,schemeBrBG:ea,interpolatePRGn:u,schemePRGn:ra,interpolatePiYG:ia,schemePiYG:na,interpolatePuOr:oa,schemePuOr:He,interpolateRdBu:sa,schemeRdBu:ca,interpolateRdGy:Oo,schemeRdGy:f,interpolateRdYlBu:la,schemeRdYlBu:ua,interpolateRdYlGn:Po,schemeRdYlGn:wo,interpolateSpectral:go,schemeSpectral:aa,interpolateBuGn:Lo,schemeBuGn:No,interpolateBuPu:ko,schemeBuPu:Ro,interpolateGnBu:Ki,schemeGnBu:e,interpolateOrRd:t8,schemeOrRd:Mo,interpolatePuBuGn:n8,schemePuBuGn:e8,interpolatePuBu:i8,schemePuBu:r8,interpolatePuRd:o8,schemePuRd:a8,interpolateRdPu:l8,schemeRdPu:s8,interpolateYlGnBu:u8,schemeYlGnBu:c8,interpolateYlGn:h8,schemeYlGn:f8,interpolateYlOrBr:p8,schemeYlOrBr:d8,interpolateYlOrRd:g8,schemeYlOrRd:y8,interpolateBlues:v8,schemeBlues:m8,interpolateGreens:x8,schemeGreens:b8,interpolateGreys:k8,schemeGreys:w8,interpolatePurples:O8,schemePurples:M8,interpolateReds:S8,schemeReds:_8,interpolateOranges:o,schemeOranges:E8,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:A8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return T8.h=360*t-100,T8.s=1.5-1.5*e,T8.l=.8-.9*e,T8+""},interpolateWarm:P8,interpolateCool:Eo,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,N8.r=255*(e=Math.sin(t))*e,N8.g=255*(e=Math.sin(t+L8))*e,N8.b=255*(e=Math.sin(t+j8))*e,N8+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:F8,interpolateMagma:I8,interpolateInferno:R8,interpolatePlasma:B8});function z8(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function W8(t,e,n,r,i){var a=t[0],t=t[1],o=C();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function H8(t,e,n,r,i){var a=new F0({range:[e,e+r]}),o=new F0({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function V8(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function q8(t,e,n,r,i){return t[0]}function G8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new F0({range:[s,t]}),c=new F0({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=z8(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function Y8(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function U8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J8.apply(void 0,tO([[-1,-1]],e,!1))}function X8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J8.apply(void 0,tO([[-1,1]],e,!1))}function $8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return J8.apply(void 0,tO([[1,-1]],e,!1))}function Z8(t,e,n,r,i){var a,t=t[0],o=C();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function K8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new F0({range:[s,s+.99*l]}),f=new F0({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=z8(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function Q8(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new F0({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new I0({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var J8=function(t,e,n,r,i){var a=t[0],t=t[1],o=C();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},tO=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function eO(t){return 1/Math.tan(t)}function nO(t,e,n,r,i){var a=eO(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function rO(t,e,n,r,i){var a=eO(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function iO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function aO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function oO(t,e,n){return n?new F0({range:[0,1],domain:[0,e]}).map(t):t}function sO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=oO(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[iO(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[aO(e,s,o,0,1),t]}}}function lO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=oO(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],iO(t[1],s,o,0,1)]},untransform:function(t){return[t[0],aO(t[1],s,o,0,1)]}}}function cO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=oO(a,r,t=void 0!==t&&t),u=oO(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[iO(e,c,s,0,1),iO(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[aO(e,c,s,0,1),aO(t,u,l,0,1)]}}}function uO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new F0({range:[0,r]}),u=new F0({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=iO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=aO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var fO=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},hO=(dO.prototype.update=function(t){this.options=I({},this.options,t),this.recoordinate()},dO.prototype.clone=function(){return new dO(this.options)},dO.prototype.getOptions=function(){return this.options},dO.prototype.clear=function(){this.update({transformations:[]})},dO.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},dO.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},dO.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:fO(fO([],n,!0),[fO([],t,!0)],!1)}),this},dO.prototype.map=function(t){return this.output(t)},dO.prototype.invert=function(t){return this.input(t)},dO.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},dO.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?fO([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(fO([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||js,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):js}.apply(void 0,a)},dO.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=C();return e&&t.reverse(),t.forEach(function(t){return z(p,p,t)}),e&&(e=t=p,(d=new O(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return Lt(t,t,p),[t[0],t[1]]}},dO);function dO(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:H8,translate:W8,custom:V8,matrix:q8,polar:G8,transpose:Y8,scale:J8,"shear.x":nO,"shear.y":rO,reflect:U8,"reflect.x":X8,"reflect.y":$8,rotate:Z8,helix:K8,parallel:Q8,fisheye:cO,"fisheye.x":sO,"fisheye.y":lO,"fisheye.circular":uO},this.update(t)}function pO(t){return void 0!==t.find(t=>"polar"===t.type)}function yO(t){return void 0!==t.find(t=>"helix"===t.type)}function gO(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function mO(t){return void 0!==t.find(t=>"theta"===t.type)}function vO(t){return void 0!==t.find(t=>"radial"===t.type)}function bO(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:"string"==typeof i?"linear":2<(r||i||[]).length?OO(t):void 0===r?EO(e)?OO(t):AO(e)?"time":_O(t,i):EO([r])?OO(t):AO(e)?"time":_O(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)$u(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return SO(e);case"quantile":return function(t){return SO(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)$u(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=h0,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:mO(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=ms(e),i=D8["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=MO(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return MO(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function xO(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(wO)?Sc(e):t.every(kO)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function wO(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function kO(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function MO(t,e,n,r,i){var[i]=i6("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r,offset:a}=e;return function(t,n,r=t=>t){if(!t)return null;const e=ms(t),i=D8["scheme"+e],a=D8["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a)||i({type:r||t})}function OO(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function _O(t,e){return"color"!==t||e?"linear":"sequential"}function SO(t){return Array.from(new Set(t.flat()))}function EO(t){return PO(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function AO(t){return PO(t,t=>t instanceof Date)}function PO(t,e){for(const n of t)if(n.some(e))return!0;return!1}function TO(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=K(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function NO(t,i,a){return ne(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=i6("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=K(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ne(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),Yu)}([K(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?S1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function LO(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function jO(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=_1(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return $u(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function CO(t,e,n){var r=e["encode"];return r?(r=_1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function FO(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=i6("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=_1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function IO(l,t,e){var n,r=t["encode"],i=K(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=K(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function RO(t,e,n){const{axis:r={},legend:i={}}=e,a=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var o="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return I(e,{scale:Object.assign(Object.assign({},Object.fromEntries(o.map(t=>[t,{guide:a(r,t)}]))),{color:{guide:a(i,"color")},size:{guide:a(i,"size")}})}),[t,e]}function BO(t,e,n){var r=e["animate"];return r||void 0===r||I(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function DO(s,l,c){return ne(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ne(this,void 0,void 0,function*(){var t=c["library"],[t]=i6("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[TO,NO,LO,jO,CO,FO,IO,BO,RO,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=jc(Object.entries(n).filter(([,t])=>$u(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=K(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function zO(t,e,n){var r,{component:e=[],coordinates:i=[],title:a,theme:o}=e,[,s]=i6("component",n),n=t.filter(({guide:t})=>null!==t),l=[...e];a&&(t=s("title")["props"],{defaultPosition:e,defaultOrder:t,defaultSize:r}=t,o=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(I({size:r},o,r="string"==typeof a?{text:a}:a)),l.push(Object.assign({type:"title",position:e,order:t,size:o},r)));for(const b of n){var c=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return gO(e)&&pO(e)||yO(e)||mO(e)?null:t.startsWith("x")?gO(e)?"axisY":"axisX":t.startsWith("y")?gO(e)?"axisX":"axisY":t.startsWith("position")&&!pO(e)?"axisY":null}(b,i);if(null!==c){var u=s(c)["props"],{defaultPosition:f,defaultSize:h,defaultOrder:d}=u,{guide:u,name:p,field:y}=b;for(const x of Array.isArray(u)?u:[u]){var g=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],gO(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&pO(i)&&!gO(i)||"axisY"===e&&pO(i)&&gO(i)||"axisY"===e&&mO(i)||"axisY"===e&&yO(i)||"axisY"===e&&vO(i))return"bottom"===r.position?"arcInner":"arc";if(pO(i)&&("axisX"===e||"axisY"===e))return"arcY";if(vO(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&pO(i)&&"center"===r.position)return"arcCenter"}return n}(p,c,f,x,i),{size:m=h,order:v=d}=x;l.push(Object.assign(Object.assign({title:y},x),{position:g,order:v,size:m,type:c,scale:b}))}}}return l}function WO(t,e,n,r){var[i]=i6("scale",r),[r]=i6("component",r),{scale:a,bbox:o}=t,t=K(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function HO(t,e){var t=function(t,e){var n=Nc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:y=d,marginTop:g=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-g-y,marginLeft:p,marginBottom:y,marginTop:g,marginRight:d,x:s,y:l})}function VO(t,e,n){var I=Nc(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:R,marginLeft:i,marginTop:a,marginBottom:B,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:W}=n,t=t+i,i=r+a,r=n+D,a=R+B,H={top:[t,0,s,i,0,!0,bc],right:[W-r,i,r,o,1,!1,bc],bottom:[t,z-a,s,a,0,!1,bc],left:[0,i,t,o,1,!0,bc],centerHorizontal:[t,i,s,o,-1,null,null],centerVertical:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[F,t]of I.entries()){var l=H[F];if("centerHorizontal"===F)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerVertical"===F)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===F){p=d=h=f=u=c=void 0;var c=t,u=l,[f,h,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:f,y:h,width:d,height:p}}else if("arcY"===F){M=k=w=x=b=m=g=v=u=y=void 0;var y=t,u=e,[g,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=qO(u),k=x-w*(v=v/2),M=(w-u)*v;for(let t=0;t<y.length;t++)y[t].bbox={x:b+g,y:k+m,width:0,height:M}}else if("arcInner"===F){T=P=A=E=v=S=_=w=x=O=void 0;var O=t,x=e,[_,S,,w]=w=l,[v,E]=x.getCenter(),[x]=qO(x),A=x*(w=w/2),P=v-A,T=E-A;for(let t=0;t<O.length;t++)O[t].bbox={x:_+P,y:S+T,width:2*A,height:2*A}}else if("arcCenter"===F){Y=G=C=j=q=V=L=E=N=void 0;var N=t,E=e,[L,V,q,j]=L=l,[E]=qO(E),C=j/2*E/Math.sqrt(2),G=L+q/2,Y=V+j/2;for(let t=0;t<N.length;t++)N[t].bbox={x:G-C,y:Y-C,width:2*C,height:2*C}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,y,g]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[y]:g},e+=b*(s?-1:1)}}(t,l)}}function qO(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function GO(P,T,N,L){return ne(this,void 0,void 0,function*(){const[n]=i6("composition",N);var[t]=i6("interaction",N);const e=new Set(Object.keys(N).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter($u)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[P],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?$O(h,f,N):yield UO(f,N),p=(s.set(h,f),o.push(h),d.flatMap(a));if(c.push(...p),p.every(i)){var y=yield Promise.all(p.map(t=>XO(t,N)));xO(h=(h=y).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),xO(h,"y");for(let t=0;t<p.length;t++){var g=p[t],m=y[t];l.set(g,m)}}}else{d="mark"===r(f)?f:yield e_(f,N),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}var v=P["on"];r6(v,t6.BEFORE_PAINT);const b=new Map,x=[];T.selectAll(a_(j)).data(o,t=>t.key).join(t=>t.append("g").attr("className",j).attr("id",t=>t.key).call(YO).each(function(t){ZO(t,J(this),x,N),b.set(t,this)}),t=>t.call(YO).each(function(t){ZO(t,J(this),x,N)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>ne(this,void 0,void 0,function*(){var[t,e]=yield UO(r,a);ZO(t,i,[],a);for(const n of e)GO(n,i,a,o);return{options:r,view:t}})}(J(e),N,L)}));for(const S of w){const P=S["options"];for(const E of function(t){var{interactions:t=[]}=t;return t}(P))t(E)(S,w)}const{width:k,height:M}=P;var O=[];for(const A of u){var _=new Promise(e=>ne(this,void 0,void 0,function*(){for(const t of A)yield GO(Object.assign({width:k,height:M},t),T,N,L);e()}));O.push(_)}L.animations=x,r6(v,t6.AFTER_PAINT);v=x.filter($u).map(JO).map(t=>t.finished);return Promise.all([...v,...O])})}function YO(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function UO(t,e){return ne(this,void 0,void 0,function*(){return $O(yield XO(t,e),t,e)})}function XO(v,b){return ne(this,void 0,void 0,function*(){var[t]=i6("theme",b);const[i,a]=i6("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(t_(e)),s=new Map,l=[];for(const p of n){var c=yield e_(p,b);l.push(c)}for(const y of yield Promise.all(l.map(r=>ne(this,void 0,void 0,function*(){const{type:t=Uu("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=y["type"],f=a(f)["props"],f=yield DO(y,f,b);f&&([f,u]=f,s.set(f,u))}for(const g of Nc(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=g.reduce((t,{scale:e})=>I(t,e),{}),d=g[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter($u)));const v=I({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=g[0]["name"];const m=bO(d,g.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);g.forEach(t=>t.scale=m)}return s})}function $O(t,e,n){var[r]=i6("mark",n);const[i]=i6("scale",n);var a,o,[s]=i6("theme",n),{key:l,frame:c=!1,theme:u,style:f={}}=e,s=s(t_(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=zO(Array.from(u),e,n),h=HO(u,e),d=function(t,e,n){var[n]=i6("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new hO(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(h,e,n),e=c?I({mainlineWidth:1,mainStroke:"#000"},f):f,p=(VO(u,d,h),{}),y=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:k}=a;var{index:g,channels:m}=o,v=_1(Object.fromEntries(m.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[Yu,Yu];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,v);const M=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(m,v),[O,_,S]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>$u(t)&&$u(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(g,v,M,d));m=x||O.length;const E=w?w(_,m,h):[];g=O.map((t,e)=>{var n={points:_[e],transform:E[e],index:t,markKey:k};for(const[r,i]of Object.entries(M))n[r]=i[t],S&&(n["series"+ms(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),m=(o.data=g,o.index=O,null==b?void 0:b(g,v,h));y.push(...m||[])}return[{layout:h,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},y]}function ZO(U,X,$,Z){ne(this,void 0,void 0,function*(){const{components:I,theme:n,layout:t,markState:e,coordinate:r,key:i,style:R}=U,{width:B,height:D}=t,z=K(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,l,c=a.map((t,e)=>e);const u=a.map(t=>Zu(Object.assign({},n,R),t)),W=["a","margin","padding","inset"].map(t=>Q(z,t)),f=t=>t.style("x",t=>g[t].x).style("y",t=>g[t].y).style("width",t=>g[t].width).style("height",t=>g[t].height).each(function(t){var e,n,r=J(this),t=u[t];for([e,n]of Object.entries(t))r.style(e,n)});let h=0,d=0,p=B,y=D;const g=c.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return h+=t,d+=e,p-=t+r,y-=e+n,{x:h,y:d,width:p,height:y}}),m=(X.selectAll(a_(at)).data(c.filter(t=>$u(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(f),t=>t.call(f),t=>t.remove()),X.selectAll(a_(rt)).data(I,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>WO(t,r,n,Z)),t=>t.each(function(t){var t=WO(t,r,n,Z)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:y=o,updateDelay:g=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:k=f}=M;void 0!==p&&!p||(e=Math.max(e,y+g),n=Math.min(n,g)),void 0!==k&&!k||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),v=X.selectAll(a_(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(n_).call(i_,Array.from(e.keys())),t=>t.call(i_,Array.from(e.keys())).call(t=>{if(!m)return n_(t);{const[l,c]=m;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}})).transitions();$.push(...v.flat());for([o,s]of e.entries()){var H=s["data"];const{key:i,class:_}=o,S=function(l,t,e,n){const[c]=i6("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:y,style:g={}}=l;return(t,e)=>{var{shape:n=f}=g,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=K(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:y,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=_1(g,t=>KO(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:r_(l,n)}))(r,t,p,d,h)}}(o,s,U,Z),E=(b=o,l=s,QO("enter",b,l,U,Z)),A=(b=o,l=s,QO("update",b,l,U,Z)),P=(b=o,l=s,QO("exit",b,l,U,Z));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,_,"element");const v=X.select("#"+i).selectAll(a_(et)).selectFacetAll(b).data(H,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return E(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=S(t,e),s=A(t,[this],[o]);return null===s&&Xu(this,o),s})}),t=>t.transition(function(t){return P(t,[this])}).remove(),t=>t.append(S).attr("className",et).transition(function(t){var e=this["__fromElements__"],t=A(t,e,[this]);return new v1(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new v1([],this.__toData__,this.parentNode).append(S).attr("className",et).nodes();return A(t,[this],e)}).remove()).transitions();$.push(...v.flat())}{var x=U,w=X,k=Z,M,O;const[T]=i6("labelTransform",k),{markState:V,labelTransform:N}=x,q=w.select(a_(tt)).node(),L=new Map,j=new Map,G=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=i6("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=_1(K(t,["formatter"]),t=>KO(t,r,e,l)),{shape:a=c,text:o}=t,t=K(t,["shape","text"]),i="string"==typeof i?q2(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,x,k),a=w.select("#"+r).selectAll(a_(et)).nodes();return n.flatMap((e,n)=>{const r=K(e,["transform"]);return a.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:a,key:o,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:o+"-"+r,bounds:l,index:s,points:a})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(c):c}(r,n,t);return t.forEach(t=>{L.set(t,i),j.set(t,e)}),t})})}),C=J(q).selectAll(a_(it)).data(G,t=>t.key).join(t=>t.append(t=>L.get(t)(t)).attr("className",it),t=>t.each(function(t){Xu(this,L.get(t)(t))}),t=>t.remove()).nodes(),Y=Nc(C,t=>j.get(t.__data__)),F=x["coordinate"];for([M,O]of Y){var{transform:M=[]}=M;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),Yu)})(M.map(T))(O,F)}N&&N(C,F)}})}function KO(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function QO(o,t,e,n,r){var[,i]=i6("shape",r);const[s]=i6("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${ms(o)}Animation`;const{[e]:c}=i(r_(t,r)).props,{[o]:u={}}=a,f=Q(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function JO(t){return t.finished.then(()=>{t.cancel()}),t}function t_(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function e_(r,i){return ne(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=K(r,["data"]);return null==e?r:([,{data:e}]=yield NO(0,{data:e},t),Object.assign({data:e},n))})}function n_(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function r_(t,e){t=t.type;return t+"."+e}function i_(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(a_(M)).data(e,t=>t.key).join(t=>t.append("g").attr("className",M).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(a_(tt)).node()||t.append("g").attr("className",tt)}function a_(...t){return t.map(t=>"."+t).join("")}function o_(t){for(var t=I({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function s_(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=o_(t),{canvas:l=(u=r,f=i,h=new w.Renderer,h.registerPlugin(new Go),new F.Canvas({width:u,height:f,container:document.createElement("div"),renderer:h})),library:c=n6()}=e;var u,f,h;e.canvas=l,e.library=c,a&&!e.bindAutoFit&&([u,f={}]=[t,e],u.autoFit&&window.addEventListener("resize",c_(u,f)),e.bindAutoFit=!0),l.resize(r,i),r6(o,t6.BEFORE_RENDER);const d=J(l.document.documentElement);return l.ready.then(()=>GO(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>r6(o,t6.AFTER_RENDER)),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h}function l_(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",c_(i,t)),(e=r)&&(n?delete e[n]:e={})}const c_=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=ef(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&s_(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,l};function u_(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class g{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return u_(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return u_(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function f_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function h_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function d_(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function p_(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?Ko(e)?n.concat(e):n.push(e):r[t]=Ko(e)?e:[e],this.attr(i,r))}}function m(r){return t=>{for(const n of r){var e=n["type"];"value"===e?f_(t,n):"array"===e?h_(t,n):"object"===e?d_(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&p_(t,n)}return t}}function y_(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}c=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"}];let g_=class extends g{constructor(){super({},"interval")}},m_=(g_=t([m(c)],g_),class extends g{constructor(){super({},"rect")}}),v_=(m_=t([m(c)],m_),class extends g{constructor(){super({},"point")}}),b_=(v_=t([m(c)],v_),class extends g{constructor(){super({},"area")}}),x_=(b_=t([m(c)],b_),class extends g{constructor(){super({},"line")}}),w_=(x_=t([m(c)],x_),class extends g{constructor(){super({},"cell")}}),k_=(w_=t([m(c)],w_),class extends g{constructor(){super({},"vector")}}),M_=(k_=t([m(c)],k_),class extends g{constructor(){super({},"link")}}),O_=(M_=t([m(c)],M_),class extends g{constructor(){super({},"polygon")}});O_=t([m(c)],O_);n=t([m(c)],class extends g{constructor(){super({},"image")}});let __=class extends g{constructor(){super({},"text")}},S_=(__=t([m(c)],__),class extends g{constructor(){super({},"box")}}),E_=(S_=t([m(c)],S_),class extends g{constructor(){super({},"lineX")}}),A_=(E_=t([m(c)],E_),class extends g{constructor(){super({},"lineY")}}),P_=(A_=t([m(c)],A_),class extends g{constructor(){super({},"range")}}),T_=(P_=t([m(c)],P_),class extends g{constructor(){super({},"rangeX")}}),N_=(T_=t([m(c)],T_),class extends g{constructor(){super({},"rangeY")}}),L_=(N_=t([m(c)],N_),class extends g{constructor(){super({},"connector")}}),j_=(L_=t([m(c)],L_),class extends g{constructor(){super({},"shape")}}),C_=(j_=t([m(c)],j_),class extends g{constructor(){super({},"sankey")}}),F_=(C_=t([m([...c,{name:"layout",type:"value"}])],C_),class extends g{constructor(){super({},"treemap")}}),I_=(F_=t([m([...c,{name:"layout",type:"value"}])],F_),class extends g{constructor(){super({},"boxplot")}}),R_=(I_=t([m(c)],I_),class extends g{constructor(){super({},"pack")}}),B_=(R_=t([m([...c,{name:"layout",type:"value"}])],R_),class extends g{constructor(){super({},"forceGraph")}}),D_=(B_=t([m([...c,{name:"layout",type:"value"}])],B_),class extends g{constructor(){super({},"tree")}}),z_=(D_=t([m([...c,{name:"layout",type:"value"}])],D_),class extends g{constructor(){super({},"wordCloud")}});z_=t([m([...c,{name:"layout",type:"object"}])],z_);a={interval:g_,rect:m_,point:v_,area:b_,line:x_,cell:w_,vector:k_,link:M_,polygon:O_,image:n,text:__,box:S_,lineX:E_,lineY:A_,range:P_,rangeX:T_,rangeY:N_,connector:L_,sankey:C_,treemap:F_,boxplot:I_,shape:j_,pack:R_,forceGraph:B_,tree:D_,wordCloud:z_};let W_=class extends g{constructor(){super({},"view")}},H_=(W_=t([m([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...y_(a)])],W_),class extends g{constructor(){super({},"spaceLayer")}}),V_=(H_=t([m([{type:"value",name:"data"},...y_(a)])],H_),class extends g{constructor(){super({},"spaceFlex")}}),q_=(V_=t([m([{type:"value",name:"data"},...y_(a)])],V_),class extends g{constructor(){super({},"facetRect")}}),G_=(q_=t([m([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...y_(a)])],q_),class extends g{constructor(){super({},"facetCircle")}}),Y_=(G_=t([m([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...y_(a)])],G_),class extends g{constructor(){super({},"repeatMatrix")}}),U_=(Y_=t([m([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...y_(a)])],Y_),class extends g{constructor(){super({},"timingKeyframe")}}),X_=(U_=t([m([...y_(a)])],U_),class extends g{constructor(){super({},"geoView")}}),$_=(X_=t([m([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...y_(a)])],X_),class extends g{constructor(){super({},"geoPath")}});$_=t([m([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...y_(a)])],$_);var Z_={view:W_,spaceLayer:H_,spaceFlex:V_,facetRect:q_,facetCircle:G_,repeatMatrix:Y_,timingKeyframe:U_,geoView:X_,geoPath:$_};for(const J_ of Object.values(Z_))m(y_(Z_))(J_);const K_=n6();function Q_(t){return Object.assign(Object.assign({},t.value),{type:t.type})}r=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...y_(a),...Object.entries(Z_).map(([t,e])=>({type:"container",name:t,ctor:e}))];v.Chart=class extends g{constructor(t={}){var e=t["container"];super(K(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:K_}}render(){this._context.canvas||({width:r=640,height:a=480,renderer:o,plugins:t,autoFit:e}=this.options(),{width:e,height:n}=ef(this._container,e,r,a),this.width(e),this.height(n),this._context.canvas=([e,n,r,i=new w.Renderer,a=[]]=[document.createElement("div"),r,a,o,t],a.push(new Go),a.forEach(t=>i.registerPlugin(t)),new F.Canvas({container:e,width:n,height:r,renderer:i})));var t,e,n,r,i,a,o=s_(this.options(),this._context);return o.parentNode!==this._container&&this._container.append(o),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,Q_(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=Q_(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];r6(n,t6.BEFORE_DESTROY),l_(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),r6(n,t6.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];r6(e,t6.BEFORE_CLEAR),l_(t,this._context),r6(e,t6.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=ef(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;r6(i,t6.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),r6(i,t6.AFTER_CHANGE_SIZE)}},v.Chart=t([m(r)],v.Chart),v.AREA_CLASS_NAME=at,v.COMPONENT_CLASS_NAME=rt,v.ELEMENT_CLASS_NAME=et,v.LABEL_CLASS_NAME=it,v.LABEL_LAYER_CLASS_NAME=tt,v.MAIN_LAYER_CLASS_NAME=M,v.PLOT_CLASS_NAME=nt,v.VIEW_CLASS_NAME=j,v.createLibrary=n6,v.destroy=l_,v.register=function(t,e){Object.assign(K_,{[t]:e})},v.render=s_,v.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=o_(t),{library:o=n6(),group:s=new F.Group}=e;if(function(t){if(!Zo(t)){if(Yo(t))return!t.length;var e,n=bs(t);if("Map"===n||"Set"===n)return!t.size;if(ws(t))return!Object.keys(t).length;for(e in t)if(As.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=J(s);return e.group=s,e.library=o,r6(a,t6.BEFORE_RENDER),GO(Object.assign(Object.assign({},t),{width:r,height:i}),l,o,e).then(n).then(()=>r6(a,t6.AFTER_RENDER)),s},Object.defineProperty(v,"__esModule",{value:!0})});
|
|
7
|
+
`}([h,d,f,s]))}c-=u,l+=1}return o}function qw(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Yw(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function $w(t){var e,t=j.convertToPath(t);if(t&&(Yw(e=t,"m")&&Yw(e,"M")))return t}function Uw(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=$w(e),y=$w(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,h]=Hw(i=e),[c,u,f,a]=(qw(p,i),Hw(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},Bw(i,Fw)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},Bw(p,Fw))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(qw(u=new j.Path({style:Object.assign(Object.assign({},Bw(l,Fw)),{d:c})}),l),u),f=[Object.assign({path:g},Bw(e,Fw)),Object.assign({path:y},Bw(n,Fw))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}Gw.props={};const Xw=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:Vw,i=Cw(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Uw(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Uw(t,new j.Path({style:Object.assign({path:d[e]},Bw(l,Fw))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Uw(t,t,new j.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Kw=(Xw.props={},b=>{return j.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:j.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!Bu(r))return Rw(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:e=0,inset:s=0,fillOpacity:l,strokeOpacity:c,opacity:u}=e,{points:t,y:f,y1:h}=t;const d=A1().cornerRadius(e).padAngle(s*Math.PI/180),p=vg(r,t,[f,h]),{startAngle:g,endAngle:y}=p,m=new j.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=j.convertToPath(m);return m.style.transform="none",t};e=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:c,opacity:u,offset:.01},{waveInArcAngle:y,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,Cw(i,n,b));return s.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},s}}),Zw=(Kw.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,Cw(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Jw=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,Cw(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Qw=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Cw(i,n,o))},t5=(Qw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new j.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Rw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),e5=(t5.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new j.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Dw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function n5(t){return nt(t).selectAll("."+it).nodes().filter(t=>!t.__removed__)}function r5(t,e){return i5(t,e).flatMap(({container:t})=>n5(t))}function i5(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function a5(t){return nt(t).select("."+at).node()}function o5(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function s5(t,e){var{offsetX:e,offsetY:n}=e,[t,r,i,a]=function(t){var t=t.getRenderBounds(),{min:[t,e],max:[n,r]}=t;return[t,e,n,r]}(t);return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function l5(t){return t=>t.__data__.color}function c5(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function u5(t){t=Array.isArray(t)?t:[t];const r=new Map(t.flatMap(e=>{return Array.from(e.markState.keys()).map(t=>[e.key+","+t.key,t.data])}));return t=>{var{index:t,markKey:e,viewKey:n}=t.__data__;return r.get(n+","+e)[t]}}function f5(o,s=(t,e)=>t,l=(t,e,n)=>t.setAttribute(e,n)){const c="__states__",u="__ordinal__",i=t=>{var{[c]:e=[],[u]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),o[e]),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);l(t,r,i),r in n||(n[r]=a)}t[u]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function h5(t,e){var n=(Array.isArray(t)?t:[t]).flatMap(e=>e.marks.map(t=>[e.key+","+t.key,t.state])),r={};for(const i of e){const[l,c]=Array.isArray(i)?i:[i,{}];r[l]=n.reduce((t,e)=>{const[a,n={}]=e;e=void 0===(e=n[l])||"object"==typeof e&&0===Object.keys(e).length?c:n[l];for(const[r,o]of Object.entries(e)){const s=t[r];t[r]=(t,e,n,r)=>{var i=r.__data__.viewKey+","+r.__data__.markKey;return a!==i?null===s||void 0===s?void 0:s(t,e,n,r):"function"!=typeof o?o:o(t,e,n,r)}}return t},{})}return r}function d5(t,r){const i=new Map(t.map((t,e)=>[t,e])),a=r?t.map(r):t;return(t,e)=>{var n;return"function"!=typeof t?t:(n=i.get(e),t(r?r(e):e,n,a,e))}}function p5(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=Q(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=cu(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=x1();const s=e[t-1];var r=e[t],[r,i,a,o]=((t,e)=>{var[,t,n]=t,[e,,,r]=e;return[t,e,r,n]})(u(s),u(r)),r=(n.moveTo(...r),n.lineTo(...i),n.lineTo(...a),n.lineTo(...o),n.closePath(),cg(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=Q(r,["fill"]),o=new j.Path({className:"element-link",style:Object.assign({d:n.toString(),fill:i,zIndex:-2},a)});null!=(r=s.link)&&r.remove(),s.parentNode.appendChild(o),s.link=o}}},t=>{var e;null!=(e=t.link)&&e.remove(),t.link=null}]}function g5(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return Bu(e)?(a=n.__data__["points"],[a,i]=ju(e)?mg(a):a,r=ng(a,a=e.getCenter()),i=ng(i,a),a=ig(r)+og(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):ju(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function y5(t){var{background:e,scale:o,coordinate:s,valueof:l}=t,c=Q(t,["background","scale","coordinate","valueof"]);const u="element-background";if(!e)return[()=>{},()=>{}];const r=(t,e,n)=>{var r=t.invert(e),e=e+t.getBandWidth(r)/2,t=t.getStep(r)/2,r=t*n;return[e-t+r,e+t-r]},f=(t,e)=>{var n=o["x"];return Mw(n)?(t=t["__data__"],t=t["x"],[n,t]=r(n,t,e),[n,t]):[0,1]},h=(t,e)=>{var n=o["y"];return Mw(n)?(t=t["__data__"],t=t["y"],[n,t]=r(n,t,e),[n,t]):[0,1]},d=(t,e)=>{var n=e["padding"],[r,i]=f(t,n),[n,a]=h(t,n),t=t["__data__"],{y:t,y1:o}=t;return kg([[r,n],[i,n],[i,a],[r,a]].map(t=>s.map(t)),{y:t,y1:o},s,e)},p=(t,e)=>{var n,r,{transform:i="scale(1.2, 1.2)",transformOrigin:a="center center",stroke:o=""}=e,e=Q(e,["transform","transformOrigin","stroke"]),i=Object.assign({transform:i,transformOrigin:a,stroke:o},e),s=t.cloneNode(!0);for([n,r]of Object.entries(i))s.style[n]=r;return s};return[e=>{e.background&&e.background.remove();var t=cg(c,t=>l(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001}=t,t=Q(t,["fill","fillOpacity","zIndex","padding"]),t=Object.assign(Object.assign({},t),{fill:n,fillOpacity:r,zIndex:i,padding:a}),n=((()=>{var{x:t,y:e}=o;return[t,e].some(Mw)})()?d:p)(e,t);n.className=u,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===u]}function m5(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function v5(e,{elements:t,datum:n,groupKey:i=t=>t,link:r=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,state:c={}}){const u=t(e),f=new Set(u),h=au(u,i);t=d5(u,n);const[d,p]=p5(Object.assign({elements:u,valueof:t,link:r,coordinate:l},et(c.active,"link"))),[g,y,m]=y5(Object.assign({scale:s,coordinate:l,background:a,valueof:t},et(c.active,"background"))),{setState:v,removeState:b,hasState:x}=f5(tt(c,{active:Object.assign({},(null==(n=c.active)?void 0:n.offset)&&{transform:(...t)=>{var e=c.active.offset(...t),[,t]=t;return g5(u[t],e,l)}})}),t);let w;const k=t=>{var e=t["target"];if(f.has(e)){w&&clearTimeout(w);var t=i(e),t=h.get(t),n=new Set(t);for(const r of u)n.has(r)?x(r,"active")||v(r,"active"):(v(r,"inactive"),p(r)),r!==e&&y(r);g(e),d(t)}},M=()=>{for(const t of u)b(t,"active","inactive"),y(t),p(t)},O=t=>{t=t.target;a&&!m(t)||(a||f.has(t))&&(0<o?(w&&clearTimeout(w),w=setTimeout(()=>{M(),w=null},o)):M())},_=()=>{M()};return e.addEventListener("pointerover",k),e.addEventListener("pointerout",O),e.addEventListener("pointerleave",_),()=>{e.removeEventListener("pointerover",k),e.removeEventListener("pointerout",O),e.removeEventListener("pointerleave",_);for(const t of u)y(t),p(t)}}function b5(t){var{delay:a,createGroup:o,background:s=!1,link:l=!1}=t,c=Q(t,["delay","createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{scale:r,coordinate:i}=e;return v5(a5(t),Object.assign({elements:n5,datum:u5(e),groupKey:o?o(e):void 0,coordinate:i,scale:r,state:h5(n,[["active",s?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:s,link:l,delay:a},c))}}function x5(t){return b5(Object.assign(Object.assign({},t),{createGroup:c5}))}function w5(t){return b5(Object.assign(Object.assign({},t),{createGroup:l5}))}function k5(e,{elements:t,datum:n,groupKey:c=t=>t,link:u=!1,single:f=!1,coordinate:r,background:i=!1,scale:a,state:o={}}){const h=t(e),d=new Set(h),p=au(h,c);t=d5(h,n);const[g,y]=p5(Object.assign({link:u,elements:h,valueof:t,coordinate:r},et(o.selected,"link"))),[m,v]=y5(Object.assign({background:i,coordinate:r,scale:a,valueof:t},et(o.selected,"background"))),{setState:b,removeState:s,hasState:x}=f5(tt(o,{selected:Object.assign({},(null==(n=o.selected)?void 0:n.offset)&&{transform:(...t)=>{var e=o.selected.offset(...t),[,t]=t;return g5(h[t],e,r)}})}),t),w=()=>{for(const t of h)s(t,"selected","unselected"),y(t),v(t)},l=t=>{t=t.target;if(!d.has(t))return w();if(f){var e=t;if(x(e,"selected"))w();else{var n=c(e),n=p.get(n),r=new Set(n);for(const a of h)r.has(a)?b(a,"selected"):(b(a,"unselected"),y(a)),a!==e&&v(a);g(n),m(e)}}else{n=t;t=c(n),t=p.get(t);const o=new Set(t);if(x(n,"selected")){if(!h.some(t=>!o.has(t)&&x(t,"selected")))return w();for(const s of t)b(s,"unselected"),y(s),v(s)}else{var i=t.some(t=>x(t,"selected"));for(const l of h)o.has(l)?b(l,"selected"):x(l,"selected")||b(l,"unselected");!i&&u&&g(t),m(n)}}};return e.addEventListener("click",l),()=>{e.removeEventListener("click",l);for(const t of h)y(t)}}function M5(t){var{createGroup:a,background:o=!1,link:s=!1}=t,l=Q(t,["createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{coordinate:r,scale:i}=e;return k5(a5(t),Object.assign({elements:n5,datum:u5(e),groupKey:a?a(e):void 0,coordinate:r,scale:i,state:h5(n,[["selected",o?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:o,link:s},l))}}function O5(t){return M5(Object.assign(Object.assign({},t),{createGroup:c5}))}function _5(t){return M5(Object.assign(Object.assign({},t),{createGroup:l5}))}function S5(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=Q(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=cu(t.map(t=>d[t])),u=tt({},e),f=u.marks.find(t=>"line"===t.type);t=wu(ou(t,t=>wu(t,t=>+h[t])/Mu(t,t=>+h[t]),t=>l[t]).values());tt(f,{scale:{y:{domain:[1/t,t]}}});const p=a5(r),g=r.getElementsByClassName(it);const y=au(r.getElementsByClassName(st),t=>t.__data__.key.split("-")[0]),m=new j.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},et(A,"rule"))}),v=new j.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},et(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Zc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var k;const M=ul(t=>{t=o5(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[Yc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return k=[0,0],ve(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[Yc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function E5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=a5(n),a=tt({},e);for(const s of a.marks)s.animate=!1;const o=ul(t=>{var e,n,t=o5(i,t);t&&([t,e]=t,(n=function(t){var{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);return r||(n.push(r={type:"fisheye"}),e.transform=n,t.coordinate=e,r)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function A5(t,e,n,r){var{tooltipElement:i=function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new h2({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},title:" ",position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r)}=t,{items:e,title:a}=e;i.show(),i.position=[n,r],i.update({items:e,title:a}),t.tooltipElement=i}function T5(t){t=t.tooltipElement;t&&t.hide()}function P5(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function L5(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>Pf(t)))}function N5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function C5(t){return Cf(t)?t:{value:void 0===t?t:""+t}}function j5(n,s,l,t=n.map(t=>t.__data__)){e=t.map(t=>t.title),e=new Map(e.map(t=>[t instanceof Date?+t:t,t]));var e=Array.from(e.values()).filter(Pf),t=t.flatMap((a,t)=>{var t=n[t],e=Q(a,["title"]);const o=N5(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=l[t].getOptions(),e=C5(e),{field:r=void 0,color:i=o,name:r=function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof f0);return i(t)?t.invert(e):i(n)?n.invert(r):null}(l,a)||r||n,value:n}=e,e=Q(e,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},e),{name:r,color:i,value:n}),L5(s({channel:t,value:n})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function B5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function F5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function R5(t,e){return void 0===t?e:t}function I5(f,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:h,coordinate:d,crosshairs:p,item:g,startX:y=0,startY:m=0}=t,t=Q(t,["elements","wait","leading","trailing","scale","coordinate","crosshairs","item","startX","startY"]),e=e(f);const[,v]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(f),b=[],x=[];for(const l of e){var a=l["__data__"],a=a["seriesX"];(a?b:x).push(l)}const w=new Map(b.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[cu(n.map((t,e)=>e),t=>n[+t]),n]]}));e=x.map((t,e)=>e);const k=x.map(t=>{t=t.__data__;return t.x}),M=cu(e,t=>k[t]),O=et(t,"crosshairs");e=h.x;const _=null!=e&&e.getBandWidth?e.getBandWidth()/2:0,o=ul(t=>{t=o5(f,t);if(t){var e=f.getBounds(),n=e.min[0],e=e.min[1];const o=[t[0]-y,t[1]-m];o;var r=((t,e,n)=>{var r=e.length;if(0===r)return[];var[t]=d.invert(t),t=t-_,i=(0,Yc(t=>n[+t]).center)(e,t);let a=i,o=i;for(;0<a-1&&n[e[a-1]]==n[e[i]];)a--;for(;o+1<r&&n[e[o+1]]===n[e[i]];)o++;return Nu(a,o+1).map(t=>e[t])})(o,M,k).map(t=>x[t]),i=b.map(t=>{var[e,n]=w.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Js(t.replace("series","")),e]}))})(t,((t,e,n)=>{var[t]=d.invert(t);return e[(0,Yc(t=>n[+t]).center)(e,t-_)]})(o,e,n)),{x:e,y:n}=t;return[t,d.map([e+_,n])]}),a=[...i.map(t=>t[0]),...r.map(t=>t.__data__)],r=j5([...b,...r],g,h,a);if(A5(f,r,t[0]+n,t[1]+e),p){a=i.map(t=>t[1]);{var r=f,n=a,{height:e,startX:i,startY:a}=t=Object.assign(Object.assign({},O),{height:v,startX:y,startY:m}),t=Q(t,["height","startX","startY"]);const s=(n=Tu(n.map(t=>t[0])))+i,l=n+i,c=a,u=e-a;(i=r.ruleY||(n=new j.Line({style:Object.assign({x1:s,x2:l,y1:c,y2:u,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),r.appendChild(n),n)).style.x1=s,i.style.x2=l,i.style.y1=c,i.style.y2=u,r.ruleY=i}}}},n,{leading:r,trailing:i}),s=()=>{T5(f),p&&B5(f)};return f.addEventListener("pointerenter",o),f.addEventListener("pointermove",o),f.addEventListener("pointerleave",s),()=>{f.removeEventListener("pointerover",o),f.removeEventListener("pointerout",o),f.removeEventListener("pointerleave",s),P5(f),p&&B5(f)}}function D5(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=au(t,o),u=ul(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,a,o){var e=(n=t["__data__"])["title"],n=Q(n,["title"]);const s=N5(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions(),e=C5(e),{field:r=void 0,color:i=s,name:r=r||n,value:n}=e,e=Q(e,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},e),{color:i,name:r,value:n}),L5(a({channel:t,value:n})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):j5(n,s,i),{offsetX:t,offsetY:e}=t,A5(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&T5(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f),P5(r)}}function z5(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,g=Q(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=F5(a,"seriesTooltip"),l=F5(a,"crosshairs"),n=a5(n),s=R5(h,s);if(s&&!p)return I5(n,Object.assign(Object.assign({},g),{elements:n5,scale:i,coordinate:o,crosshairs:R5(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=r5(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return I5(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:R5(f,l),item:d,startX:s,startY:t}))}return D5(n,Object.assign(Object.assign({},g),{elements:n5,scale:i,coordinate:o,groupKey:u?c5(r):void 0,item:d}))}}e5.props={};const W5="legend-category",G5="items-item",H5="legend-category-item-marker",V5="legend-category-item-label";function q5(t){return t.getElementsByClassName(H5)[0]}function Y5(t){return t.getElementsByClassName(V5)[0]}function $5(t){return t.getElementsByClassName(G5)}function U5(t){return t.getElementsByClassName(W5)}function X5(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function K5(t){const e=function(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}(t)["data"];t=X5(t).scales[0].name;return[t,{legends:$5,marker:q5,label:Y5,datum:t=>{t=t.__data__,t=t.index;return e[t].label}}]}function Z5(t,{legends:e,marker:i,label:a,datum:o,filter:n,setAttribute:r,state:s={}}){const l=new Map,c=new Map,u=new Map;var{unselected:s={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=s,f={unselected:et(s,"marker")},s={unselected:et(s,"label")};const{setState:h,removeState:d}=f5(f,void 0,r),{setState:p,removeState:g}=f5(s,void 0,r),y=Array.from(e(t)),m=y.map(o),v=()=>{for(const r of y){var t=o(r),e=i(r),n=a(r);(m.includes(t)?(d(e,"unselected"),g):(h(e,"unselected"),p))(n,"unselected")}};for(const k of y){var b=()=>{m5(t,"pointer")},x=()=>{m5(t,"default")},w=()=>ve(this,void 0,void 0,function*(){var t=o(k),e=m.indexOf(t);-1===e?m.push(t):m.splice(e,1),0===m.length&&m.push(...y.map(o)),yield n(m),v()});k.addEventListener("click",w),k.addEventListener("pointerenter",b),k.addEventListener("pointerout",x),l.set(k,w),c.set(k,b),u.set(k,x)}return()=>{for(const t of y)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",u.get(t))}}function J5(t){var s=t["channel"],l=Q(t,["channel"]);return t=>{const{container:e,view:i,options:a,update:o}=t;var t=U5(e),t=s?t.find(t=>{t=t.parentNode.__data__;return t.scale.name===s}):t[0],[n,r]=t?K5(t):[null,{}];return n&&(s=n),Z5(e,Object.assign(Object.assign(Object.assign({},r),{filter:r=>ve(this,void 0,void 0,function*(){var t=i["scale"];const{[s]:n}=t;t=a.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[s]:r},...e];return tt({},t,{transform:e,scale:{[s]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},a),{marks:t});return o(t)}),state:t.attributes.state}),l))}}function Q5(){return t=>{const{container:e,view:n,options:r}=t;t=U5(e);const i=n5(e);var a=h5(r,["active","inactive"]),o=d5(i,u5(n));for(const u of t){const f=t=>{var e=u.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},h=X5(u).scales[0].name,d=$5(u),p=(t=>{var{scale:{[t]:t}}=n;return t})(h),g=au(i,t=>p.invert(t.__data__[h]));var{state:s={}}=u.attributes,{inactive:s={}}=s;const{setState:y,removeState:m}=f5(a,o);var l={inactive:et(s,"marker")},s={inactive:et(s,"label")};const{setState:v,removeState:b}=f5(l),{setState:x,removeState:w}=f5(s),k=t=>{for(const r of d){var e=q5(r),n=Y5(r);(r===t||null===t?(b(e,"inactive"),w):(v(e,"inactive"),x))(n,"inactive")}},M=new Map;for(const _ of d){var c=()=>{var t=f(_),e=new Set(g.get(t));for(const n of i)e.has(n)?y(n,"active"):y(n,"inactive");k(_)};_.addEventListener("pointerover",c),M.set(_,c)}const O=()=>{for(const t of i)m(t,"inactive","active");k(null)};return u.addEventListener("pointerleave",O),()=>{u.removeEventListener(O);for(var[t,e]of M)t.removeEventListener(e)}}}}function tk(a,t){var{brushed:i=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(a),brushRegion:l=(t,e,n,r,i)=>[t,e,n,r],reverse:c=!1,fill:n="#777",fillOpacity:r="0.3",stroke:u="#fff"}=t,f=Q(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke"]);let h=null,d=null,p=null,g=null,y=null,m=!1;const[v,b,x,w]=s,k=(m5(a,"crosshair"),a.style.draggable=!0,()=>{y=new j.Path({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,pointerEvents:"none"})}),g=new j.Rect({style:{draggable:!0,fill:"transparent"},className:"mask"}),a.appendChild(y),a.appendChild(g)}),M=()=>{g=new j.Rect({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,draggable:!0}),className:"mask"}),a.appendChild(g)},O=()=>{g&&g.remove(),y&&y.remove(),h=null,d=null,p=null,m=!1,g=null,y=null,e()},_=(t,e)=>{var[t,e,n,r]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,n,r]=l(t,e,n,r,s);return(c?E:S)(t,e,n,r),i(t,e,n,r),[t,e,n,r]},S=(t,e,n,r)=>{g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},E=(t,e,n,r)=>{y.style.d=`
|
|
8
|
+
M${v},${b}L${x},${b}L${x},${w}L${v},${w}Z
|
|
9
|
+
M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
|
|
10
|
+
`,g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},A=t=>{var e=t["target"],[t,n]=s5(a,t);e===g?p=[t,n]:(((t,e)=>{if(g&&g.remove(),y&&y.remove(),h=[t,e],c)return k();M()})(t,n),m=!0)},T=t=>{var e,n,r,t=s5(a,t);h&&(p?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-p[0],e=e[1]-p[1],r=n(r,h[0],d[0],v,x),n=n(e,h[1],d[1],b,w),e=[h[0]+r,h[1]+n],r=[d[0]+r,d[1]+n],_(e,r)):_(h,t))},P=t=>{var e,n,r,i;p?(p=null,{x:e,y:r,width:n,height:i}=g.style,h=[e,r],d=[e+n,r+i]):(d=s5(a,t),[e,n,r,i]=_(h,d),m=!1,o(e,n,r,i))},L=t=>{t=t.target;g&&t!==g&&O()},N=t=>{t=t.target;t!==g||m?m5(a,"crosshair"):m5(a,"move")},C=()=>{m5(a,"default")};return a.addEventListener("dragstart",A),a.addEventListener("drag",T),a.addEventListener("dragend",P),a.addEventListener("click",L),a.addEventListener("pointermove",N),a.addEventListener("pointerleave",C),{mask:g,remove(){g&&O()},destroy(){g&&O(),a.removeEventListener("dragstart",A),a.removeEventListener("drag",T),a.removeEventListener("dragend",P),a.removeEventListener("click",L),a.removeEventListener("pointermove",N),a.removeEventListener("pointerleave",C)}}}function ek(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function nk(t,e){var{elements:n,siblings:r=t=>[],datum:i,brushRegion:a,extent:o,reverse:s,series:l=!1,key:d=t=>t,bboxOf:c=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:u={}}=e,e=Q(e,["elements","siblings","datum","brushRegion","extent","reverse","series","key","bboxOf","state"]);const p=n(t),g=r(t),y=g.flatMap(n);r=d5(p,i),n=et(e,"mask");const{setState:m,removeState:f}=f5(u,r),h=new Map,{width:v,height:b,x,y:w}=c(t);i=o||[0,0,v,b];return tk(t,Object.assign(Object.assign({},n),{extent:i,brushRegion:a,reverse:s,brushended:l?()=>{for(const t of p)f(t,"inactive");for(const e of h.values())e.remove();h.clear()}:()=>{for(const t of[...p,...y])f(t,"active","inactive")},brushed:l?(t,e,n,r)=>{var i;for(const o of p){var a=h.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),h.set(a,i),i);a.style.clipPath=new j.Rect({style:{x:t+x,y:e+w,width:n-t,height:r-e}}),m(o,"inactive"),m(a,"active")}}:(t,e,n,r)=>{var i;for(const u of g)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of p){var{min:o,max:s}=f.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?m(f,"inactive"):(m(f,"active"),a.add(d(f)))}for(const h of y)a.has(d(h))?m(h,"active"):m(h,"inactive")}}))}function rk(t){var{facet:h,brushKey:d}=t,p=Q(t,["facet","brushKey"]);return(t,e)=>{var n,r,i,a,{container:o,view:s,options:l}=t,o=a5(o),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},u=["active",["inactive",{opacity:.5}]];if(h)return n=(a=o.getBounds()).min[0],r=a.min[1],i=a.max[0],a=a.max[1],nk(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>r5(t,e),datum:u5(i5(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,r,i,a],state:h5(i5(t,e).map(t=>t.options),u)},c),p));const f=nk(o,Object.assign(Object.assign({elements:n5,key:t=>t.__data__.key,siblings:()=>{return ek(t,e,d).map(t=>a5(t.container))},datum:u5([s,...ek(t,e,d).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:h5([l,...ek(t,e,d).map(t=>t.options)],u)},c),p));return o.brush=f,()=>f.destroy()}}function ik(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function ak(t){return rk(Object.assign(Object.assign({},t),{brushRegion:ik}))}function ok(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function sk(t){return rk(Object.assign(Object.assign({},t),{brushRegion:ok}))}const lk="axis",ck="axis-hot-area";function uk(t){return t.getElementsByClassName(lk)}function fk(t){return t.getElementsByClassName("axis-line")[0]}function hk(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function dk(t,e){var{cross:n,offsetX:i}=e,e=Q(e,["cross","offsetX","offsetY"]),r=hk(t),[t]=fk(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:ok,hotZone:new j.Rect({className:ck,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function pk(t,e){var{offsetY:i,cross:n=!1}=e,e=Q(e,["offsetY","offsetX","cross"]),r=hk(t),[,t]=fk(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:ik,hotZone:new j.Rect({className:ck,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function gk(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=Q(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=f5(u,d5(f,o))["setState"],d=new Map;var p=et(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const m of r){const{hotZone:v,brushRegion:b,extent:x}=(a(m)?pk:dk)(m,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});m.parentNode.appendChild(v),tk(v,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(m),g()},brushed(t,e,n,r){d.set(m,x(t,e,n,r)),g()}}))}}function yk(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=a5(t).getBBox();return gk(t,Object.assign({elements:n5,axes:uk,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:u5(e),state:h5(n,["active",["inactive",{opacity:.5}]])},a))}}function mk(t,e){var{filter:i,reset:n,brushRegion:r,extent:a,reverse:o}=e,e=et(Q(e,["filter","reset","brushRegion","extent","reverse","series"]),"mask"),{width:s,height:l}=t.getBBox(),a=a||[0,0,s,l];const c=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),u=tk(t,Object.assign(Object.assign({},e),{extent:a,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r){i(t,e,n,r),u.remove()}}));function f(t){c(t)&&n()}return t.addEventListener("click",f),()=>{u.destroy(),t.removeEventListener("click",f)}}function vk(t){var{hideX:y=!0,hideY:m=!0}=t,i=Q(t,["hideX","hideY"]);return(t,e)=>{const{container:n,view:r,options:f,update:h}=t;t=a5(n);let d=!1,p=!1,g=r;return mk(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],filter:(s,l,c,u)=>ve(this,void 0,void 0,function*(){if(!p){p=!0;const{scale:e,coordinate:r}=g,{x:i,y:a}=e;var t=(t,e)=>{var[t,n]=r.invert(t);return[Ow(i,t,e),Ow(a,n,e)]};const n=t([s,l],!0),o=t([c,u],!1);t=f["marks"],t=t.map(t=>tt({axis:Object.assign(Object.assign({},y&&{x:{labelTransforms:[{type:"hide"}]}}),m&&{y:{labelTransforms:[{type:"hide"}]}})},t,{scale:{x:{domain:_w(i,[n[0],o[0]])},y:{domain:_w(a,[n[1],o[1]])}}})),t=Object.assign(Object.assign({},f),{marks:t,clip:!0}),t=yield h(t);g=t.view,p=!1,d=!0}}),reset:()=>{!p&&d&&(d=!1,g=r,h(f))},extent:void 0},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),i))}}function bk(t){return vk(Object.assign(Object.assign({hideX:!0},t),{brushRegion:ik}))}function xk(t){return vk(Object.assign(Object.assign({hideY:!0},t),{brushRegion:ok}))}const wk="slider";function kk({wait:p=50,leading:g=!0,trailing:y=!1}){return t=>{const{container:e,view:n,options:l,update:c}=t;t=e.getElementsByClassName(wk);if(t.length){let s=!1;const u=n["scale"];var{x:r,y:i}=u;const o=new Map,f={x:r.getOptions().domain,y:i.getOptions().domain};for(const h of t){const d=h.attributes["orient"];var a=ul(o=>ve(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];s||(s=!0,i="vertical"===d?"y":"x",a=function(t,e){var[t,n]=t;return _w(e,[Ow(e,t,!0),Ow(e,n,!1)])}(a,u[i]),f[i]=a,t="vertical"===d?"x":"y",e=f[t],n=l,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>tt({axis:{x:{labelTransforms:[{type:"hide"}]},y:{labelTransforms:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield c(a),s=!1)}),p,{leading:g,trailing:y});h.addEventListener("valuechange",a),o.set(h,a)}return()=>{for(var[t,e]of o)t.removeEventListener("valuechange",e)}}}}const Mk={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function Ok(t){return"text"===t.nodeName&&!!t.isOverflowing()}function _k(t){var{offsetX:h=8,offsetY:d=8}=t,r=Q(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=et(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];Ok(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new j.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},Mk),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}</${r}>`),x:e,y:n}}),s.appendChild(a),o.tip=a,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];Ok(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}function Sk(n){return(t,...e)=>tt({},n(t,...e),t)}function Ek(n){return(t,...e)=>tt({},t,n(t,...e))}function Ak(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=Q(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const Tk=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=Q(t,["data"]);return Object.assign(Object.assign({},t),{data:Ak(e,o),x:n,y:r,width:i,height:a})})},Pk=(Tk.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=Q(g,["data"]),y=Ak(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),Lk=(Pk.props={},()=>t=>{var e=t["children"],t=Q(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},coordinate:n={},encode:f={},transform:h=[]}=t,r=Q(t,["data","scale","axis","legend","coordinate","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=Q(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:Ak(e,s),scale:tt({},l,n),encode:tt({},f,a),transform:[...h,...o],axis:!(!r||!c)&&tt({},c,r),legend:!(!i||!u)&&tt({},u,i)},t)}),e=[...e.map(t=>t.coordinate||{}),n].reduceRight((t,e)=>tt(t,e),{});return[Object.assign(Object.assign({},r),{marks:t,type:"standardView",coordinate:e})]}),Nk=(Lk.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:k,x:M,y:O,key:_,frame:S,title:E,labelTransform:A,parentKey:T,clip:P}=t,t=Q(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip"]);return[{type:"standardView",x:M,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:k,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:T,clip:P,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),Ck=(Nk.props={},Sk(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=au(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),jk=Sk(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:tt({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:tt({title:i},o)}}}),Bk=Sk(()=>({animate:{enterType:"fadeIn"}})),Fk=Ek(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Rk=Ek(()=>({type:"cell"})),Ik=Ek(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),Dk=Ek((t,c=function(t){t=t.points;return sg(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?zk(a,e):(t=e.length?void 0:null,tt({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?zk(r,e):(n=e.length?void 0:null,tt({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:T}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=ug(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[T]:e}=t,t=void 0===A||t===n,e=void 0===T||e===r;return t&&e}).map(t=>E.filter(t)),v=f?wu(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:T,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=Q(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:T?5:void 0}},r=r?g:0===g.length?[]:E,l={color:{domain:P}},o={x:Wk(o,w)(p,r),y:Wk(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+O,y:f+m+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:tt(s,e,l),axis:tt({},i,o),legend:!1},t),M)})})}}});function zk(t,e){return e.length?tt({title:!1,tick:null,label:null},t):tt({title:!1,tick:null,label:null,grid:null},t)}function Wk(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const Gk=()=>t=>{return[Nw.of(t).call(Rk).call(jk).call(Bk).call(Ck).call(Fk).call(Ik).call(Dk).value()]},Hk=(Gk.props={},Sk(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),Vk=Ek(t=>{const{data:w,children:c,x:k=0,y:M=0,key:O}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=ug(t);const s=t.map(({points:t})=>sg(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=Q(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return zk(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return zk(n,e)})(y,w)};return Object.assign({data:w,parentKey:O,key:i+"-"+c,x:u+m+k,y:f+v+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:tt({x:{facet:!1},y:{facet:!1}},e),axis:tt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:tt({},a,{x:p,y:g})},t)})})}}}),qk=Ek(t=>{var e=t["encode"],t=Q(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=Q(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const Yk=()=>t=>{return[Nw.of(t).call(Rk).call(jk).call(Vk).call(qk).call(Bk).call(Fk).call(Hk).value()]},$k=Sk(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Uk=Sk(t=>({coordinate:{type:"polar"}})),Xk=t=>{var e=t["encode"],t=Q(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function Kk(t){return t=>null}function Zk(t){var t=t["points"],[t,e,n,r]=t,i=rg(t,r),t=ng(t,r),r=og(t,ng(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=ag(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const Jk=()=>t=>{return[Nw.of(t).call(Rk).call(Xk).call(jk).call(Uk).call(Ik).call(Dk,Zk,Kk,Kk,{frame:!1}).call(Bk).call(Fk).call($k).value()]};const Qk=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=tt({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function t3(t,e){if(null!==t)return{type:"column",value:t,field:e}}function e3(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function n3(t,e){var n=[];for(const r of t)n[r]=e;return n}function B(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function r3(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=B(t,i);if(null!==n)return[n,r]}return[null,null]}function i3(t){return!(t instanceof Date)&&"object"==typeof t}Qk.props={};const a3=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{y1:t3(n3(t,0))}})]};function o3(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=B(r,t))?void 0:t[0]]}).filter(([,t])=>Pf(t));return Array.from(au(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function s3(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:qc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>p3(t=>r(e[t]))):"series"===t?u3:"value"===t?f3:"sum"===t?h3:"maxIndex"===t?d3:()=>null}function l3(t,e){for(const n of t)n.sort(e)}function c3(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function u3(t,e,n){return p3(t=>n[t])}function f3(t,e,n){return p3(t=>e[t])}function h3(t,n,e){t=ug(t),t=Array.from(au(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return p3(t=>r.get(e[t]))}function d3(t,n,e){t=ug(t),t=Array.from(au(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,ku(e,t=>n[t])]));return p3(t=>r.get(e[t]))}function p3(n){return(t,e)=>qc(n(t),n(e))}a3.props={};const g3=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:L=!1,y:N="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=B(r,"y"),[s,l]=B(r,"y1"),[r]=j?r3(r,"series","color"):B(r,"color"),c=o3(T,t,e),n=s3(P)(n,a,r),u=(n&&l3(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){L&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const S of _){var v=h[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=g;for(const A of y){var k=h[A];0<k?r=u[A]=(f[A]=r)+k:u[A]=f[A]=r}}const M=new Set(d),O=new Set(p);r="y"===N?u:f,n="y"===C?u:f;return[t,tt({},e,{encode:{y:t3(r,o),y1:t3(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>O.has(e)},i)})]}};function y3(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}g3.props={};const m3=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(y3)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",g3({groupBy:r})(t,e,n))},v3=(m3.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=B(n,i),[t,tt({},e,{encode:{title:t3(r,n)}})])}}),b3=(v3.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{x:t3(n3(t,0))},scale:{x:{guide:null}}})]}),x3=(b3.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{y:t3(n3(t,0))},scale:{y:{guide:null}}})]}),w3=(x3.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{size:e3(n3(t,3))}})]}),k3=(w3.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=Q(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,tt({},e,{encode:{key:t3(r)}})]}),M3=(k3.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=B(n,"color"),[t,tt({},e,{encode:{series:t3(r,i)}})])}),O3=(M3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(i3)?[t,e]:[t,tt({},e,{encode:{y:t3(n)}})]}),_3=(O3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(i3)?[t,e]:[t,tt({},e,{encode:{x:t3(n)}})]}),S3=(_3.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=B(n,"y"),[t,tt({},e,{encode:{y1:t3([...r])}})])}),E3=(S3.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=B(n,"x"),[t,tt({},e,{encode:{x1:t3([...r])}})])}),A3=(E3.props={},t=>{const r=t["channel"];return(t,e)=>{const i=e["encode"];var n=i["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(r)?r:[r];let a=0;n=n.flatMap(e=>Object.entries(i).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{const[e,n]=B(i,t);var r,t=[[t,t3(e)]];return e&&null!==n&&(r=e.map(t=>({value:t,field:n})),t.push(["tooltip"+(0===a?"":a),t3(r,n)]),a++),t}));return[t,tt({},e,{encode:Object.fromEntries(n)})]}}),T3=(A3.props={},()=>(t,e)=>[t,tt({scale:{x:{padding:0},y:{padding:0}}},e)]),P3=(T3.props={},()=>(t,e)=>{var{style:n={}}=e,r=Q(e,["data","style"]),{x:i,y:a}=n,n=Q(n,["x","y"]);return null==i||null==a?[t,e]:[[0],tt({},r,{data:[0],cartesian:!0,encode:{x:t3([i||0]),y:t3([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),L3=(P3.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,tt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),N3=(L3.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(i3)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,tt({},e,{encode:{x:t3(n),y:t3(r)}})])}),C3=(N3.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,tt({},e,{encode:{series:e3(n3(t,void 0))}})]:[t,e]}),j3=(C3.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return Q(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=B(r,"y"),[r]=r3(r,"series","color"),o=c3(r,i),i=o3(c,t,e),n=s3(f)(n,a,r),s=(n&&l3(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,tt({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:t3(s)}})]}}),B3=(j3.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,B(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(au(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=B(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[n3(n,r)]:r3(e,"enterDuration",n3(n,r));var[l]=r3(e,"enterDelay",n3(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=wu(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,tt({},t,{encode:{enterDuration:e3(s),enterDelay:e3(c)}})]}});B3.props={};const F3=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=Q(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,B(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=o3(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>Mu(t,t=>e[+t]),max:(t,e)=>wu(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Tu(t,t=>e[+t]),median:(t,e)=>Pu(t,t=>e[+t]),sum:(t,e)=>Cu(t,t=>e[+t]),deviation:(t,e)=>Qc(t,t=>e[+t])}[r]||wu;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,tt({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,t3(e,B(n,t)[1])]))})]}};function R3(t,e,n){return null===t?[-.5,.5]:(t=c3(t,e),[-(e=new a0({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function I3(t,e,n){return e*(1-t)+n*t}F3.props={};const D3=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=B(n,"x"),[n]=B(n,"y");const o=R3(a,r,l),s=R3(n,i,c);a=t.map(()=>I3(u(),...s)),r=t.map(()=>I3(u(),...o));return[t,tt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:t3(a),dx:t3(r)}})]}},z3=(D3.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=B(n,"x");const i=R3(n,r,a);n=t.map(()=>I3(o(),...i));return[t,tt({scale:{x:{padding:.5}}},e,{encode:{dx:t3(n)}})]}}),W3=(z3.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=Q(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,B(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=o3(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=tu(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,tt({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,t3(e,B(n,t)[1])]))})]}}),G3=(W3.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=B(n,"y");var[,i]=B(n,"y1"),n=(f?r3(n,"series","color"):B(n,"color"),o3(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,tt({},e,{encode:{y1:t3(a,i)}})]}});function H3(t,e){return[t[0]]}function V3(t,e){return[t[t.length-1]]}function q3(t,e){return[t[ku(t,t=>e[t])]]}function Y3(t,e){return[t[Ou(t,t=>e[t])]]}G3.props={};const $3=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=o3(a,t,e);const[r]=B(n,o),i="function"==typeof(n=s)?n:{first:H3,last:V3,max:q3,min:Y3}[n]||H3;return[t.flatMap(t=>i(t,r)),e]}},U3=($3.props={},(t={})=>{var e=t["selector"],t=Q(t,["selector"]);return $3(Object.assign({channel:"x",selector:e},t))}),X3=(U3.props={},(t={})=>{var e=t["selector"],t=Q(t,["selector"]);return $3(Object.assign({channel:"y",selector:e},t))});function K3(e){return t=>null===t?e:e+" of "+t}function Z3(){return[(t,e)=>Tu(t,t=>+e[t]),K3("mean")]}function J3(){return[(t,e)=>Pu(t,t=>+e[t]),K3("median")]}function Q3(){return[(t,e)=>wu(t,t=>+e[t]),K3("max")]}function tM(){return[(t,e)=>Mu(t,t=>+e[t]),K3("min")]}function eM(){return[(t,e)=>t.length,K3("count")]}function nM(){return[(t,e)=>Cu(t,t=>+e[t]),K3("sum")]}function rM(){return[(t,e)=>e[t[0]],K3("first")]}function iM(){return[(t,e)=>e[t[t.length-1]],K3("last")]}X3.props={};const aM=(t={})=>{const a=t["groupBy"],c=Q(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=a(t,e);var n,r,i;return l?(n=Object.entries(c).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:Z3,max:Q3,count:eM,first:rM,last:iM,sum:nM,min:tM,median:J3}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=B(s,t);return[t,t3(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),r=Object.keys(s).map(t=>{const[e,n]=B(s,t);return[t,t3(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>o[t[0]]),[ug(l),tt({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},oM=(aM.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=Q(t,["channels"]);return aM(Object.assign(Object.assign({},e),{groupBy:(t,e)=>o3(n,t,e)}))}),sM=(oM.props={},(t={})=>oM(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),lM=(sM.props={},(t={})=>oM(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),cM=(lM.props={},(t={})=>oM(Object.assign(Object.assign({},t),{channels:["color"]})));function uM(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=Q(n,["reverse","slice","channel"]),o=e["encode"];const[s]=B(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=B(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>wu(t,t=>+a[t]);if("min"===i)return t=>Mu(t,t=>+a[t]);if("sum"===i)return t=>Cu(t,t=>+a[t]);if("median"===i)return t=>Pu(t,t=>+a[t]);if("mean"===i)return t=>Tu(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?cu(ou(o,l,c),([t,e],[n,r])=>qc(e,r)||qc(t,n)):cu(au(o,c),([t,e],[n,r])=>l(e,r)||qc(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,tt(e,{scale:{[a]:{domain:c}}})]}cM.props={};const fM=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=Q(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return uM(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=B(i,r);return i=cu(t,t=>a[t]),n&&i.reverse(),[i,e]}}},hM=(fM.props={},(t={})=>fM(Object.assign(Object.assign({},t),{channel:"x"}))),dM=(hM.props={},(t={})=>fM(Object.assign(Object.assign({},t),{channel:"color"}))),pM=(dM.props={},(t={})=>fM(Object.assign(Object.assign({},t),{channel:"y"})));pM.props={};const gM=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=B(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):B(r,s)[0],r=su(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>Cu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,tt({},e,{scale:{x:{flex:r}}})]}};function yM(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=sg(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}gM.props={};const mM=()=>(t,e)=>[t,tt({},e,{modifier:yM,axis:!1})],vM=(mM.props={},"thresholds");function bM(t){var[e,n]=tu(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Jc(t))/(3.49*Qc(t)))))}const xM=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=Q(t,["groupChannels","binChannels"]),u={};return aM(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(vM)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=B(n,t);return t}),a=et(c,vM),o=t.filter(e=>i.every(t=>Pf(t[e]))),r=[...s.map(t=>{var[t]=B(n,t);return t}).filter(Pf).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||bM(n),e=xu().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(au(o,e=>r.map(t=>t(e)).join("-")).values())}}))},wM=(xM.props={},(t={})=>{var e=t["thresholds"];return xM(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function kM(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let f=0,h,d;c.push(f);for(let i=0;i<t-2;i++){let t=0,e=0,n=Math.floor((i+1)*u)+1;for(var p=Math.floor((i+2)*u)+1,g=(p=Math.min(p,a))-n;n<p;n++)t+=s(n),e+=l(n);t/=g,e/=g;let r=Math.floor((i+0)*u)+1;var y=Math.floor((i+1)*u)+1,m=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((m[0]-t)*(s(r)-m[1])-(m[0]-l(r))*(e-m[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function MM(t){if("function"==typeof t)return t;if("lttb"===t)return kM;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[Ou(t,t=>n[t])]],max:(t,e,n)=>[t[ku(t,t=>n[t])]],median:(t,e,n)=>{return[t[Au(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/r))).flatMap(t=>i(t,e,n))}}wM.props={};const OM=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=MM(e);return(t,e)=>{var n=e["encode"],t=o3(o,t,e);const[r]=B(n,"x"),[i]=B(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},_M=(OM.props={},(s={})=>(t,e)=>{const i=e["encode"],n=Object.entries(s).map(([t,e])=>{const[n]=B(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(Pf);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);var o=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[t,tt({},e,{encode:Object.fromEntries(o)})]});function SM(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function EM(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}_M.props={};const AM=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{t.attr("visibility","visible");const i=t.getLocalBounds();n.some(t=>{var e=SM(i),t=SM(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?t.attr("visibility","hidden"):n.push(t)}),t}};function TM(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const PM=t=>{const{maxIterations:k=10,maxError:M=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=TM(),[m,v]=TM();var a,o,s,l,[c,t]=TM(),[u,n]=TM();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>qc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function LM(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function NM(t,e,n){return.2126*LM(t)+.7152*LM(e)+.0722*LM(n)}function CM(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=NM(t,n,r),n=NM(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function jM(e,t){return t[ku(t,t=>{return CM(e,"object"==typeof(t=t)?t:j.parseColor(t))})]}const BM=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;CM(t.parsedStyle.fill,e)<n&&t.attr("fill",jM(e,r))}),t)},FM=t=>(t,e)=>(t.forEach(t=>{t.attr("visibility","visible");var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(EM(t,e)&&EM(n,e))}(SM(t.getLocalBounds()),e)||t.attr("visibility","hidden")}),t);var P=1e-6,RM=1e-12,E=Math.PI,IM=E/2,DM=E/4,zM=2*E,WM=180/E,GM=E/180,HM=Math.abs,VM=Math.atan,qM=Math.atan2,T=Math.cos,YM=Math.ceil,$M=Math.exp,UM=Math.log,XM=Math.pow,L=Math.sin,KM=Math.sign||function(t){return 0<t?1:t<0?-1:0},ZM=Math.sqrt,JM=Math.tan;function QM(t){return 1<t?0:t<-1?E:Math.acos(t)}function tO(t){return 1<t?IM:t<-1?-IM:Math.asin(t)}function eO(){}function nO(t,e){t&&iO.hasOwnProperty(t.type)&&iO[t.type](t,e)}var rO={Feature:function(t,e){nO(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)nO(n[r].geometry,e)}},iO={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){aO(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)aO(n[r],e,0)},Polygon:function(t,e){oO(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)oO(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)nO(n[r],e)}};function aO(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function oO(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)aO(t[n],e,1);e.polygonEnd()}function sO(t,e){t&&rO.hasOwnProperty(t.type)?rO[t.type](t,e):nO(t,e)}function lO(t){return[qM(t[1],t[0]),tO(t[2])]}function cO(t){var e=t[0],t=t[1],n=T(t);return[n*T(e),n*L(e),L(t)]}function uO(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function fO(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function hO(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function dO(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function pO(t){var e=ZM(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function gO(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function yO(t,e){return HM(t)>E&&(t-=Math.round(t/zM)*zM),[t,e]}function mO(t,e,n){return(t%=zM)?e||n?gO(bO(t),xO(e,n)):bO(t):e||n?xO(e,n):yO}function vO(n){return function(t,e){return HM(t+=n)>E&&(t-=Math.round(t/zM)*zM),[t,e]}}function bO(t){var e=vO(t);return e.invert=vO(-t),e}function xO(t,e){var i=T(t),a=L(t),o=T(e),s=L(e);function n(t,e){var n=T(e),r=T(t)*n,t=L(t)*n,n=L(e),e=n*i+r*a;return[qM(t*o-e*s,r*i-n*a),tO(e*o+t*s)]}return n.invert=function(t,e){var n=T(e),r=T(t)*n,t=L(t)*n,n=L(e),e=n*o-t*s;return[qM(t*o+n*s,r*i+e*a),tO(e*i-r*a)]},n}function wO(t,e){(e=cO(e))[0]-=t,pO(e);t=QM(-e[1]);return((-e[2]<0?-t:t)+zM-P)%zM}function kO(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:eO,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function MO(t,e){return HM(t[0]-e[0])<P&&HM(t[1]-e[1])<P}function OO(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function _O(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(MO(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*P}s.push(n=new OO(r,t,null,!0)),l.push(n.o=new OO(r,null,n,!1)),s.push(n=new OO(i,t,null,!1)),l.push(n.o=new OO(i,null,n,!0))}}),s.length){for(l.sort(e),SO(s),SO(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function SO(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function EO(t){return HM(t[0])<=E?t[0]:KM(t[0])*((HM(t[0])+E)%zM-E)}function AO(y,m,v,b){return function(s){var l,c,u,n=m(s),f=kO(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=Lu(c);var t=function(t,e){var n=EO(e),r=e[1],e=L(r),i=[L(n),-T(n),0],a=0,o=0,s=new eu;1===e?r=IM+P:-1===e&&(r=-IM-P);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=EO(h),p=h[1]/2+DM,g=L(p),y=T(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=EO(v),x=v[1]/2+DM,w=L(x),x=T(x),k=b-d,M=0<=k?1:-1,O=M*k,_=E<O,S=g*w;s.add(qM(S*M*L(O),y*x+S*T(O))),a+=_?k+M*zM:k,_^n<=d^n<=b&&(pO(S=fO(cO(h),cO(v))),pO(O=fO(i,S)),(M=(_^0<=k?-1:1)*tO(O[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=k?1:-1)}return(a<-P||a<P&&s<-RM)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),_O(c,PO,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(TO))}return e}}function TO(t){return 1<t.length}function PO(t,e){return((t=t.x)[0]<0?t[1]-IM-P:IM-t[1])-((e=e.x)[0]<0?e[1]-IM-P:IM-e[1])}yO.invert=yO;var LO=AO(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=HM(t-f);HM(l-E)<P?(c.point(f,h=0<(h+e)/2?IM:-IM),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(HM(f-d)<P&&(f-=d*P),HM(t-s)<P&&(t-=s*P),l=h,i=e,o=L((n=f)-(r=t)),h=HM(o)>P?VM((L(l)*(a=T(i))*L(r)-L(i)*(r=T(l))*L(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*IM,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):HM(t[0]-e[0])>P?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-IM]);function NO(d){var g=T(d),p=6*GM,f=0<g,h=HM(g)>P;function y(t,e){return T(t)*T(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=fO(cO(t),cO(e)),h=uO(f,f),d=f[0],p=h-d*d;return p?(r=fO(u,f),hO(u=dO(u,g*h/p),dO(f,-g*d/p)),(p=(f=uO(u,h=r))*f-(d=uO(h,h))*(uO(u,u)-1))<0?void 0:(hO(p=dO(h,(-f-(r=ZM(p)))/d),u),p=lO(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=HM((s=a-i)-E)<P)&&e<o&&(c=o,o=e,e=c),(l||s<P?l?0<o+e^p[1]<(HM(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(hO(c=dO(h,(-f+r)/d),u),[p,lO(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return AO(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!MO(o,n)&&!MO(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&MO(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=T(r),c=L(r),u=o*a;null==n?(n=r+o*zM,s=r-u/2):(n=wO(l,n),s=wO(l,s),(0<o?n<s:s<n)&&(n+=o*zM));for(var f,h=n;0<o?s<h:h<s;h-=u)f=lO([l,-c*T(h),-c*L(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var CO=1e9,jO=-CO;function BO(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return HM(t[0]-m)<P?0<e?0:3:HM(t[0]-b)<P?0<e?2:1:HM(t[1]-v)<P?0<e?1:0:0<e?3:2}function M(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=kO(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=Lu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&_O(i,M,t,k,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(jO,Math.min(CO,c)),u=Math.max(jO,Math.min(CO,u))],r=[t=Math.max(jO,Math.min(CO,t)),e=Math.max(jO,Math.min(CO,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function FO(t,e,n){var r=Nu(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function RO(t,e,n){var r=Nu(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function IO(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=FO(s,o,90),f=RO(r,n,v),h=FO(c,l,90),d=RO(a,i,v),e):v},e.extentMajor([[-180,-90+P],[180,90-P]]).extentMinor([[-180,-80-P],[180,80+P]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Nu(YM(a/y)*y,i,y).map(h).concat(Nu(YM(c/m)*m,l,m).map(d)).concat(Nu(YM(r/p)*p,n,p).filter(function(t){return HM(t%y)>P}).map(u)).concat(Nu(YM(s/g)*g,o,g).filter(function(t){return HM(t%m)>P}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var DO,zO,WO,GO,HO=t=>t,VO=new eu,qO=new eu,YO={point:eO,lineStart:eO,lineEnd:eO,polygonStart:function(){YO.lineStart=$O,YO.lineEnd=KO},polygonEnd:function(){YO.lineStart=YO.lineEnd=YO.point=eO,VO.add(HM(qO)),qO=new eu},result:function(){var t=VO/2;return VO=new eu,t}};function $O(){YO.point=UO}function UO(t,e){YO.point=XO,DO=WO=t,zO=GO=e}function XO(t,e){qO.add(GO*t-WO*e),WO=t,GO=e}function KO(){XO(DO,zO)}var ZO=YO,JO=1/0,QO=JO,t4=-JO,e4=t4;var n4,r4,i4,a4,o4={point:function(t,e){t<JO&&(JO=t);t4<t&&(t4=t);e<QO&&(QO=e);e4<e&&(e4=e)},lineStart:eO,lineEnd:eO,polygonStart:eO,polygonEnd:eO,result:function(){var t=[[JO,QO],[t4,e4]];return t4=e4=-(QO=JO=1/0),t}},s4=0,l4=0,c4=0,u4=0,f4=0,h4=0,d4=0,p4=0,g4=0,y4={point:m4,lineStart:v4,lineEnd:w4,polygonStart:function(){y4.lineStart=k4,y4.lineEnd=M4},polygonEnd:function(){y4.point=m4,y4.lineStart=v4,y4.lineEnd=w4},result:function(){var t=g4?[d4/g4,p4/g4]:h4?[u4/h4,f4/h4]:c4?[s4/c4,l4/c4]:[NaN,NaN];return s4=l4=c4=u4=f4=h4=d4=p4=g4=0,t}};function m4(t,e){s4+=t,l4+=e,++c4}function v4(){y4.point=b4}function b4(t,e){y4.point=x4,m4(i4=t,a4=e)}function x4(t,e){var n=t-i4,r=e-a4,n=ZM(n*n+r*r);u4+=n*(i4+t)/2,f4+=n*(a4+e)/2,h4+=n,m4(i4=t,a4=e)}function w4(){y4.point=m4}function k4(){y4.point=O4}function M4(){_4(n4,r4)}function O4(t,e){y4.point=_4,m4(n4=i4=t,r4=a4=e)}function _4(t,e){var n=t-i4,r=e-a4,n=ZM(n*n+r*r);u4+=n*(i4+t)/2,f4+=n*(a4+e)/2,h4+=n,d4+=(n=a4*t-i4*e)*(i4+t),p4+=n*(a4+e),g4+=3*n,m4(i4=t,a4=e)}var S4=y4;function E4(t){this._context=t}E4.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,zM)}},result:eO};var A4,T4,P4,L4,N4,C4=new eu,j4={point:eO,lineStart:function(){j4.point=B4},lineEnd:function(){A4&&F4(T4,P4),j4.point=eO},polygonStart:function(){A4=!0},polygonEnd:function(){A4=null},result:function(){var t=+C4;return C4=new eu,t}};function B4(t,e){j4.point=F4,T4=L4=t,P4=N4=e}function F4(t,e){L4-=t,N4-=e,C4.add(ZM(L4*L4+N4*N4)),L4=t,N4=e}var R4=j4;let I4,D4,z4,W4;class G4{constructor(t){this._append=null==t?H4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return H4;if(e!==I4){const r=10**e;I4=e,D4=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return D4}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===z4&&this._append===D4||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,z4=n,D4=this._append,W4=this._,this._=r),this._+=W4}}result(){var t=this._;return this._="",t.length?t:null}}function H4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function V4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),sO(t,a(o))),o.result()}return s.area=function(t){return sO(t,a(ZO)),ZO.result()},s.measure=function(t){return sO(t,a(R4)),R4.result()},s.bounds=function(t){return sO(t,a(o4)),o4.result()},s.centroid=function(t){return sO(t,a(S4)),S4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,HO):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new G4(r)):new E4(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new G4(r)),s},s.projection(e).digits(r).context(n)}function q4(r){return function(t){var e,n=new Y4;for(e in r)n[e]=r[e];return n.stream=t,n}}function Y4(){}function $4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),sO(n,t.stream(o4)),e(o4.result()),null!=r&&t.clipExtent(r),t}function U4(i,a,t){return $4(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function X4(t,e,n){return U4(t,[[0,0],e],n)}function K4(r,i,t){return $4(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function Z4(i,a,t){return $4(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}Y4.prototype={constructor:Y4,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var J4=16,Q4=T(30*GM);function t6(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=cO([t,e]),e=E(t,e);T(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],J4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){T(u,f,c,h,d,p,i,a,n,o,s,l,J4,r),g.lineEnd=m,m()}return g}):(n=t,q4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function T(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,k,M,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(y=a+f,x=tO(y/=m=ZM((p=r+c)*p+(g=i+u)*g+y*y)),v=HM(HM(y)-1)<P||HM(n-l)<P?(n+l)/2:qM(g,p),b=(x=E(v,x))[0],x=x[1],A<(M=_*(w=b-t)-O*(k=x-e))*M/S||.3<HM((O*w+_*k)/S-.5)||r*c+i*u+a*f<Q4)&&(T(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),T(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var e6=q4({point:function(t,e){this.stream.point(t*GM,e*GM)}});function n6(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=T(e),e=L(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function r6(t){return i6(function(){return t})()}function i6(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,M=LO,O=null,_=HO,S=.5;function E(t){return l(t[0]*GM,t[1]*GM)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*WM,t[1]*WM]}function T(){var t=n6(f,0,0,x,w,b).apply(null,e(p,g)),t=n6(f,h-t[0],d-t[1],x,w,b);return r=mO(y,m,v),s=gO(e,t),l=gO(r,s),o=t6(s,S),P()}function P(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=e6((n=r,q4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,k=void 0,P()):M},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,P()):_},E.clipAngle=function(t){return arguments.length?(M=+t?NO(k=t*GM):(k=null,LO),P()):k*WM},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,HO):BO(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,T()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],T()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*GM,g=t[1]%360*GM,T()):[p*WM,g*WM]},E.rotate=function(t){return arguments.length?(y=t[0]%360*GM,m=t[1]%360*GM,v=2<t.length?t[2]%360*GM:0,T()):[y*WM,m*WM,v*WM]},E.angle=function(t){return arguments.length?(b=t%360*GM,T()):b*WM},E.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},E.precision=function(t){return arguments.length?(o=t6(s,S=t*t),P()):ZM(S)},E.fitExtent=function(t,e){return U4(E,t,e)},E.fitSize=function(t,e){return X4(E,t,e)},E.fitWidth=function(t,e){return K4(E,t,e)},E.fitHeight=function(t,e){return Z4(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,T()}}function a6(t){var e=0,n=E/3,r=i6(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*GM,n=t[1]*GM):[e*WM,n*WM]},t}function o6(t,e){var n,r,i,a=L(t),o=(a+L(e))/2;return HM(o)<P?(n=T(t),s.invert=function(t,e){return[t/n,tO(e*n)]},s):(i=ZM(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=qM(t,HM(e))*KM(e);return e*o<0&&(n-=E*KM(t)*KM(e)),[n/o,tO((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,L(e)/n]}function l(t,e){e=ZM(r-2*o*L(e))/o;return[e*L(t*=o),i-e*T(t)]}}function s6(){return a6(o6).scale(155.424).center([0,33.6442])}function l6(){return s6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function c6(i){return function(t,e){var n=T(t),r=T(e),n=i(n*r);return n===1/0?[2,0]:[n*r*L(t),n*L(e)]}}function u6(a){return function(t,e){var n=ZM(t*t+e*e),r=a(n),i=L(r),r=T(r);return[qM(t*i,n*r),tO(n&&e*i/n)]}}var f6=c6(function(t){return ZM(2/(1+t))});f6.invert=u6(function(t){return 2*tO(t/2)});var h6=c6(function(t){return(t=QM(t))&&t/L(t)});function d6(t,e){return[t,UM(JM((IM+e)/2))]}function p6(r){var i,a,o,s=r6(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=mO((e=s.rotate())[0]*GM,e[1]*GM,2<e.length?e[2]*GM:0),function(t){return(t=e.invert(t[0]*GM,t[1]*GM))[0]*=WM,t[1]*=WM,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===d6?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function g6(t){return JM((IM+t)/2)}function y6(t,e){var n=T(t),i=t===e?L(t):UM(n/T(e))/UM(g6(e)/g6(t)),a=n*XM(g6(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=KM(i)*ZM(t*t+e*e),r=qM(t,HM(e))*KM(e);return e*i<0&&(r-=E*KM(t)*KM(e)),[r/i,2*VM(XM(a/n,1/i))-IM]},r):d6;function r(t,e){0<a?e<-IM+P&&(e=-IM+P):IM-P<e&&(e=IM-P);e=a/XM(g6(e),i);return[e*L(i*t),a-e*T(i*t)]}}function m6(t,e){return[t,e]}function v6(t,e){var n=T(t),r=t===e?L(t):(n-T(e))/(e-t),i=n/r+t;return HM(r)<P?m6:(a.invert=function(t,e){var e=i-e,n=qM(t,HM(e))*KM(e);return e*r<0&&(n-=E*KM(t)*KM(e)),[n/r,i-KM(r)*ZM(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*L(t),i-e*T(t)]}}h6.invert=u6(function(t){return t}),d6.invert=function(t,e){return[t,2*VM($M(e))-IM]},m6.invert=m6;var b6=1.340264,x6=-.081106,w6=893e-6,k6=.003796,M6=ZM(3)/2;function O6(t,e){var e=tO(M6*L(e)),n=e*e,r=n*n*n;return[t*T(e)/(M6*(b6+3*x6*n+r*(7*w6+9*k6*n))),e*(b6+x6*n+r*(w6+k6*n))]}function _6(t,e){var n=T(e),r=T(t)*n;return[n*L(t)/r,L(e)/r]}function S6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function E6(t,e){return[T(e)*L(t),L(e)]}function A6(t,e){var n=T(e),r=1+T(t)*n;return[n*L(t)/r,L(e)/r]}function T6(t,e){return[UM(JM((IM+e)/2)),-t]}O6.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(b6+x6*i+a*(w6+k6*i))-e)/(b6+3*x6*i+a*(7*w6+9*k6*i)))*r)*i*i,!(HM(n)<RM));++o);return[M6*t*(b6+3*x6*i+a*(7*w6+9*k6*i))/T(r),tO(L(r)/M6)]},_6.invert=u6(VM),S6.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),HM(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},E6.invert=u6(tO),A6.invert=u6(function(t){return 2*VM(t)}),T6.invert=function(t,e){return[-e,2*VM($M(t))-IM]};var P6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=l6(),l=s6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=s6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+P,r+.12*e+P],[n-.214*e-P,r+.234*e-P]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+P,r+.166*e+P],[n-.115*e-P,r+.234*e-P]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return U4(f,t,e)},f.fitSize=function(t,e){return X4(f,t,e)},f.fitWidth=function(t,e){return K4(f,t,e)},f.fitHeight=function(t,e){return Z4(f,t,e)},f.scale(1070)},geoAlbers:l6,geoAzimuthalEqualArea:function(){return r6(f6).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:f6,geoAzimuthalEquidistant:function(){return r6(h6).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:h6,geoConicConformal:function(){return a6(y6).scale(109.5).parallels([30,30])},geoConicConformalRaw:y6,geoConicEqualArea:s6,geoConicEqualAreaRaw:o6,geoConicEquidistant:function(){return a6(v6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:v6,geoEqualEarth:function(){return r6(O6).scale(177.158)},geoEqualEarthRaw:O6,geoEquirectangular:function(){return r6(m6).scale(152.63)},geoEquirectangularRaw:m6,geoGnomonic:function(){return r6(_6).scale(144.049).clipAngle(60)},geoGnomonicRaw:_6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=q4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=HO;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,HO):BO(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=L(d=t%360*GM),r=T(d),b()):d*WM},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return U4(x,t,e)},x.fitSize=function(t,e){return X4(x,t,e)},x.fitWidth=function(t,e){return K4(x,t,e)},x.fitHeight=function(t,e){return Z4(x,t,e)},x},geoProjection:r6,geoProjectionMutator:i6,geoMercator:function(){return p6(d6).scale(961/zM)},geoMercatorRaw:d6,geoNaturalEarth1:function(){return r6(S6).scale(175.295)},geoNaturalEarth1Raw:S6,geoOrthographic:function(){return r6(E6).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:E6,geoStereographic:function(){return r6(A6).scale(250).clipAngle(142)},geoStereographicRaw:A6,geoTransverseMercator:function(){var t=p6(T6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:T6});function L6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function N6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(j6),e.find(t=>t.sphere)?{type:"Sphere"}:L6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=V4(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function C6(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[IO()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function j6(t){return"geoPath"===t.type}var B6,Da=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=Q(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+il(t);if(e=P6[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(C6);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(N6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=V4(i);const u=new y0({domain:[t,t+n]}),f=new y0({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{return j6(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>g(t)})})):t;var e})})]},za=(Da.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=Q(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});za.props={};const F6={"composition.geoView":Da,"composition.geoPath":za};function R6(){return Object.assign({"data.fetch":nd,"data.inline":cd,"data.sortBy":ld,"data.sort":ad,"data.filter":id,"data.pick":od,"data.rename":sd,"data.fold":rd,"data.slice":Id,"data.custom":ud,"data.map":fd,"data.cluster":Wh,"data.tree":Gh,"data.sankey":_f,"data.arc":gd,"data.wordCloud":Bd,"data.join":Rd,"transform.maybeZeroY1":a3,"transform.maybeZeroX":b3,"transform.maybeStackY":m3,"transform.maybeTitle":v3,"transform.maybeSeries":M3,"transform.maybeZeroPadding":T3,"transform.stackY":g3,"transform.binX":wM,"transform.bin":xM,"transform.dodgeX":j3,"transform.jitter":D3,"transform.jitterX":z3,"transform.symmetryY":W3,"transform.diffY":G3,"transform.stackEnter":B3,"transform.normalizeY":F3,"transform.select":$3,"transform.selectX":U3,"transform.selectY":X3,"transform.groupX":sM,"transform.groupY":lM,"transform.groupColor":cM,"transform.group":oM,"transform.maybeSize":w3,"transform.maybeZeroY":x3,"transform.maybeKey":k3,"transform.sortX":hM,"transform.sortY":pM,"transform.sortColor":dM,"transform.flexX":gM,"transform.maybeTupleY":O3,"transform.maybeTupleX":_3,"transform.maybeIdentityY":S3,"transform.maybeIdentityX":E3,"transform.maybeTuple":N3,"transform.maybeVisualPosition":P3,"transform.maybeFunctionAttribute":L3,"transform.maybeGradient":C3,"transform.maybeTooltip":A3,"transform.pack":mM,"transform.sample":OM,"transform.filter":_M,"coordinate.cartesian":pl,"coordinate.polar":yl,"coordinate.helix":ml,"coordinate.transpose":vl,"coordinate.theta":bl,"coordinate.parallel":kl,"coordinate.fisheye":Ml,"coordinate.radial":wl,"coordinate.radar":Ol,"encode.constant":_l,"encode.field":El,"encode.transform":Sl,"encode.column":Al,"mark.interval":Hc,"mark.rect":Vc,"mark.line":qu,"mark.point":Yu,"mark.text":$u,"mark.cell":Uu,"mark.area":Xu,"mark.link":Ku,"mark.image":Zu,"mark.polygon":Ju,"mark.box":Qu,"mark.vector":tf,"mark.lineX":nf,"mark.lineY":ef,"mark.connector":rf,"mark.range":sf,"mark.rangeX":lf,"mark.rangeY":cf,"mark.sankey":jf,"mark.path":Bf,"mark.treemap":zf,"mark.pack":Wf,"mark.boxplot":Kf,"mark.shape":Zf,"mark.forceGraph":Dh,"mark.tree":Hh,"mark.wordCloud":Dd,"palette.category10":zd,"palette.category20":Wd,"palette.sequentialBlue":Gd,"palette.sequentialDarkBlue":Hd,"palette.sequentialGreen":Vd,"palette.sequentialDarkGreen":qd,"palette.sequentialGrey":Yd,"palette.sequentialOrange":$d,"palette.sequentialPink":Ud,"palette.sequentialRed":Xd,"palette.sequentialYellow":Kd,"palette.sequentialPurple":Zd,"palette.sequentialYellowOrange":Jd,"palette.sequentialYellowGreen":Qd,"palette.sequentialPinkPurple":tp,"palette.sequentialGreenBlue":ep,"palette.divergingGreenYellow":np,"palette.divergingRedBlue":rp,"palette.divergingGreenRed":ip,"palette.divergingRedPurple":ap,"scale.linear":H0,"scale.ordinal":V0,"scale.band":G0,"scale.identity":q0,"scale.point":Y0,"scale.time":$0,"scale.log":U0,"scale.pow":X0,"scale.sqrt":Q0,"scale.threshold":K0,"scale.quantile":Z0,"scale.quantize":J0,"scale.sequential":t1,"shape.interval.rect":Og,"shape.interval.hollow":_g,"shape.interval.funnel":Sg,"shape.interval.pyramid":Ag,"shape.rect.rect":Og,"shape.rect.hollow":_g,"shape.cell.cell":Og,"shape.cell.hollow":_g,"shape.line.line":Ng,"shape.line.hv":jg,"shape.line.vh":Bg,"shape.line.hvh":Fg,"shape.line.smooth":Cg,"shape.point.bowtie":zg,"shape.point.cross":Wg,"shape.point.diamond":Gg,"shape.point.hexagon":Hg,"shape.point.hollowBowtie":Vg,"shape.point.hollowDiamond":qg,"shape.point.hollowHexagon":Yg,"shape.point.hollow":$g,"shape.point.hollowSquare":Ug,"shape.point.hollowTriangle":Xg,"shape.point.hollowTriangleDown":Kg,"shape.point.hyphen":Zg,"shape.point.line":Jg,"shape.point.plus":Qg,"shape.point.point":ty,"shape.point.square":ey,"shape.point.tick":ny,"shape.point.triangle":ry,"shape.point.triangleDown":iy,"shape.text.text":U2,"shape.area.area":Q2,"shape.area.smooth":tx,"shape.area.hvh":ex,"shape.area.vh":nx,"shape.area.hv":rx,"shape.link.smooth":ax,"shape.link.vhv":ox,"shape.link.arc":sx,"shape.link.link":ix,"shape.image.image":lx,"shape.polygon.polygon":cx,"shape.polygon.ribbon":ux,"shape.box.box":fx,"shape.vector.vector":ay,"shape.label.label":Ax,"shape.text.badge":K2,"shape.lineX.line":hx,"shape.lineY.line":hx,"shape.shape.shape":Nx,"shape.connector.connector":gx,"shape.range.range":Og,"shape.rangeX.range":Og,"shape.rangeY.range":Og,"shape.path.path":Px,"shape.path.hollow":Lx,"theme.light":jx,"theme.dark":Fx,"theme.academy":Ix,"component.axisX":cw,"component.axisY":uw,"component.axisRadar":fw,"component.axisLinear":sw,"component.axisArc":lw,"component.legendCategory":gw,"component.legendContinuous":yw,"component.legendContinuousBlock":mw,"component.legendContinuousBlockSize":vw,"component.legendContinuousSize":bw,"component.title":kw,"component.sliderX":Ew,"component.sliderY":Aw,"component.scrollbarX":Pw,"component.scrollbarY":Lw,"animation.scaleInX":Rw,"animation.scaleOutX":Iw,"animation.scaleInY":Dw,"animation.scaleOutY":zw,"animation.waveIn":Kw,"animation.fadeIn":Ww,"animation.fadeOut":Gw,"animation.zoomIn":Zw,"animation.zoomOut":Jw,"animation.pathIn":Qw,"animation.morphing":Xw,"animation.growInX":t5,"animation.growInY":e5,"interaction.elementHighlight":b5,"interaction.elementHighlightByX":x5,"interaction.elementHighlightByColor":w5,"interaction.elementSelect":M5,"interaction.elementSelectByX":O5,"interaction.elementSelectByColor":_5,"interaction.fisheye":E5,"interaction.chartIndex":S5,"interaction.tooltip":z5,"interaction.legendFilter":J5,"interaction.legendHighlight":Q5,"interaction.brushHighlight":rk,"interaction.brushXHighlight":ak,"interaction.brushYHighlight":sk,"interaction.brushAxisHighlight":yk,"interaction.brushFilter":vk,"interaction.brushXFilter":bk,"interaction.brushYFilter":xk,"interaction.sliderFilter":kk,"interaction.poptip":_k,"composition.spaceLayer":Tk,"composition.spaceFlex":Pk,"composition.mark":Nk,"composition.view":Lk,"composition.facetRect":Gk,"composition.repeatMatrix":Yk,"composition.facetCircle":Jk,"composition.timingKeyframe":Qk,"labelTransform.overlapHide":AM,"labelTransform.overlapDodgeY":PM,"labelTransform.overflowHide":FM,"labelTransform.contrastReverse":BM},F6)}function I6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}(Ga=B6=B6||{}).BEFORE_RENDER="beforerender",Ga.AFTER_RENDER="afterrender",Ga.BEFORE_PAINT="beforepaint",Ga.AFTER_PAINT="afterpaint",Ga.BEFORE_CHANGE_DATA="beforechangedata",Ga.AFTER_CHANGE_DATA="afterchangedata",Ga.BEFORE_CLEAR="beforeclear",Ga.AFTER_CLEAR="afterclear",Ga.BEFORE_DESTROY="beforedestroy",Ga.AFTER_DESTROY="afterdestroy",Ga.BEFORE_CHANGE_SIZE="beforechangesize",Ga.AFTER_CHANGE_SIZE="afterchangesize";function D6(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function z6(t,e,n,r,i){var a=new y0({range:[e,e+r]}),o=new y0({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function W6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function G6(t,e,n,r,i){return t[0]}function H6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new y0({range:[s,t]}),c=new y0({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=I6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function V6(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function q6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Z6.apply(void 0,J6([[-1,-1]],e,!1))}function Y6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Z6.apply(void 0,J6([[-1,1]],e,!1))}function $6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Z6.apply(void 0,J6([[1,-1]],e,!1))}function U6(t,e,n,r,i){var a,t=t[0],o=ct();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function X6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new y0({range:[s,s+.99*l]}),f=new y0({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=I6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function K6(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new y0({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new m0({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var Z6=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},J6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function Q6(t){return 1/Math.tan(t)}function t_(t,e,n,r,i){var a=Q6(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function e_(t,e,n,r,i){var a=Q6(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function n_(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function r_(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function i_(t,e,n){return n?new y0({range:[0,1],domain:[0,e]}).map(t):t}function a_(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=i_(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[n_(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[r_(e,s,o,0,1),t]}}}function o_(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=i_(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],n_(t[1],s,o,0,1)]},untransform:function(t){return[t[0],r_(t[1],s,o,0,1)]}}}function s_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=i_(a,r,t=void 0!==t&&t),u=i_(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[n_(e,c,s,0,1),n_(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[r_(e,c,s,0,1),r_(t,u,l,0,1)]}}}function l_(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new y0({range:[0,r]}),u=new y0({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=n_(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=r_(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var c_=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},u_=(f_.prototype.update=function(t){this.options=tt({},this.options,t),this.recoordinate()},f_.prototype.clone=function(){return new f_(this.options)},f_.prototype.getOptions=function(){return this.options},f_.prototype.clear=function(){this.update({transformations:[]})},f_.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},f_.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},f_.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:c_(c_([],n,!0),[c_([],t,!0)],!1)}),this},f_.prototype.map=function(t){return this.output(t)},f_.prototype.invert=function(t){return this.input(t)},f_.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},f_.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?c_([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(c_([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||ol,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):ol}.apply(void 0,a)},f_.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return ut(p,p,t)}),e&&(e=t=p,(d=new J(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return Yt(t,t,p),[t[0],t[1]]}},f_);function f_(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:z6,translate:D6,custom:W6,matrix:G6,polar:H6,transpose:V6,scale:Z6,"shear.x":t_,"shear.y":e_,reflect:q6,"reflect.x":Y6,"reflect.y":$6,rotate:U6,helix:X6,parallel:K6,fisheye:s_,"fisheye.x":a_,"fisheye.y":o_,"fisheye.circular":l_},this.update(t)}function h_(t,e){var{coordinate:n={}}=t,t=Q(t,["coordinate"]),{type:r,transform:i=[]}=n,n=Q(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=hw("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function d_(t,e){return t.filter(t=>t.type===e)}function p_(t){return 0<d_(t,"polar").length}function g_(t){return d_(t,"transpose").length%2==1}function y_(t){return 0<d_(t,"theta").length}function m_(t){return 0<d_(t,"radial").length}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}Wa=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Ha=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),c=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Va=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Ba=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),o=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),As=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),$a=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Ns=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Ps=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function v_(t,e,n){(t.prototype=e.prototype=n).constructor=t}function b_(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function x_(){}var w_=1/.7,Rs="\\s*([+-]?\\d+)\\s*",Na="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k_=/^#([0-9a-f]{3,8})$/,M_=new RegExp(`^rgb\\(${Rs},${Rs},${Rs}\\)$`),O_=new RegExp(`^rgb\\(${Mc},${Mc},${Mc}\\)$`),__=new RegExp(`^rgba\\(${Rs},${Rs},${Rs},${Na}\\)$`),S_=new RegExp(`^rgba\\(${Mc},${Mc},${Mc},${Na}\\)$`),E_=new RegExp(`^hsl\\(${Na},${Mc},${Mc}\\)$`),A_=new RegExp(`^hsla\\(${Na},${Mc},${Mc},${Na}\\)$`),T_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function P_(){return this.rgb().formatHex()}function L_(){return this.rgb().formatRgb()}function N_(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=k_.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?C_(e):3===n?new R_(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?j_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?j_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=M_.exec(t))?new R_(e[1],e[2],e[3],1):(e=O_.exec(t))?new R_(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=__.exec(t))?j_(e[1],e[2],e[3],e[4]):(e=S_.exec(t))?j_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=E_.exec(t))?H_(e[1],e[2]/100,e[3]/100,1):(e=A_.exec(t))?H_(e[1],e[2]/100,e[3]/100,e[4]):T_.hasOwnProperty(t)?C_(T_[t]):"transparent"===t?new R_(NaN,NaN,NaN,0):null}function C_(t){return new R_(t>>16&255,t>>8&255,255&t,1)}function j_(t,e,n,r){return new R_(t=r<=0?e=n=NaN:t,e,n,r)}function B_(t){return(t=t instanceof x_?t:N_(t))?new R_((t=t.rgb()).r,t.g,t.b,t.opacity):new R_}function F_(t,e,n,r){return 1===arguments.length?B_(t):new R_(t,e,n,null==r?1:r)}function R_(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function I_(){return"#"+G_(this.r)+G_(this.g)+G_(this.b)}function D_(){var t=z_(this.opacity);return(1===t?"rgb(":"rgba(")+W_(this.r)+`, ${W_(this.g)}, `+W_(this.b)+(1===t?")":`, ${t})`)}function z_(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function W_(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function G_(t){return((t=W_(t))<16?"0":"")+t.toString(16)}function H_(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new q_(t,e,n,r)}function V_(t){var e,n,r,i,a,o,s,l;return t instanceof q_?new q_(t.h,t.s,t.l,t.opacity):(t=t instanceof x_?t:N_(t))?t instanceof q_?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new q_(o,s,l,t.opacity)):new q_}function q_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Y_(t){return(t=(t||0)%360)<0?t+360:t}function $_(t){return Math.max(0,Math.min(1,t||0))}function U_(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}v_(x_,N_,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:P_,formatHex:P_,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return V_(this).formatHsl()},formatRgb:L_,toString:L_}),v_(R_,F_,b_(x_,{brighter(t){return t=null==t?w_:Math.pow(w_,t),new R_(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new R_(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new R_(W_(this.r),W_(this.g),W_(this.b),z_(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:I_,formatHex:I_,formatHex8:function(){return"#"+G_(this.r)+G_(this.g)+G_(this.b)+G_(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:D_,toString:D_})),v_(q_,function(t,e,n,r){return 1===arguments.length?V_(t):new q_(t,e,n,null==r?1:r)},b_(x_,{brighter(t){return t=null==t?w_:Math.pow(w_,t),new q_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new q_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new R_(U_(240<=t?t-240:120+t,n,e),U_(t,n,e),U_(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new q_(Y_(this.h),$_(this.s),$_(this.l),z_(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(){var t=z_(this.opacity);return(1===t?"hsl(":"hsla(")+Y_(this.h)+`, ${100*$_(this.s)}%, ${100*$_(this.l)}%`+(1===t?")":`, ${t})`)}}));const X_=Math.PI/180,K_=180/Math.PI;var Z_=1.78277,J_=-.29227,Q_=-.90649,t8=1.97294,e8=t8*Q_,n8=t8*Z_,r8=Z_*J_- -.14861*Q_;function i8(t,e,n,r){return 1===arguments.length?(i=t)instanceof a8?new a8(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof R_?i:B_(i)).r/255,o=i.g/255,l=i.b/255,l=(t8*(o-(a=(r8*l+e8*a-n8*o)/(r8+e8-n8)))-J_*(o=l-a))/Q_,new a8((l=(s=Math.sqrt(l*l+o*o)/(t8*a*(1-a)))?Math.atan2(l,o)*K_-120:NaN)<0?l+360:l,s,a,i.opacity)):new a8(t,e,n,null==r?1:r);var i,a,o,s,l}function a8(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}v_(a8,i8,b_(x_,{brighter(t){return t=null==t?w_:Math.pow(w_,t),new a8(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new a8(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*X_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new R_(255*(e+n*(-.14861*r+Z_*t)),255*(e+n*(J_*r+Q_*t)),255*(e+t8*r*n),this.opacity)}}));var o8=t=>()=>t;function s8(e,n){return function(t){return e+t*n}}function l8(a){return 1==(a=+a)?c8:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):o8(isNaN(t)?e:t);var n,r,i}}function c8(t,e){var n=e-t;return n?s8(t,n):o8(isNaN(t)?e:t)}!function t(e){var o=l8(e);function n(e,t){var n=o((e=F_(e)).r,(t=F_(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=c8(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);u8=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var u8,f8=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=F_(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=u8(r),i=u8(i),a=u8(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function h8(s){return function t(o){function e(e,t){var n=s((e=i8(e)).h,(t=i8(t)).h),r=c8(e.s,t.s),i=c8(e.l,t.l),a=c8(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}h8(function(t,e){var n=e-t;return n?s8(t,180<n||n<-180?n-360*Math.round(n/360):n):o8(isNaN(t)?e:t)});var n=h8(c8),a=t=>f8(t[t.length-1]),ks=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),Es=a(ks),Xa=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),Os=a(Xa),f2=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),_s=a(f2),e=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),r=a(e),Ms=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),Ta=a(Ms),Ca=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),Ss=a(Ca),ja=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),i=a(ja),l=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),Ra=a(l),Fa=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),Ia=a(Fa),Da=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),za=a(Da),Ga=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),Rs=a(Ga),Mc=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),Na=a(Mc),d8=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),p8=a(d8),g8=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),y8=a(g8),m8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),v8=a(m8),b8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),x8=a(b8),w8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),k8=a(w8),M8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),O8=a(M8),_8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),S8=a(_8),E8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),A8=a(E8),T8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),P8=a(T8),L8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),N8=a(L8),C8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),j8=a(C8),B8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),F8=a(B8),R8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),I8=a(R8),D8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),z8=a(D8),W8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),a=a(W8);var G8=n(i8(300,.5,0),i8(-240,.5,1)),H8=n(i8(-100,.75,.35),i8(80,1.5,.8)),n=n(i8(260,.75,.35),i8(80,1.5,.8)),V8=i8();var q8=F_(),Y8=Math.PI/3,$8=2*Math.PI/3;function U8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var X8=U8(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),K8=U8(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Z8=U8(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),J8=U8(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Q8=Object.freeze({__proto__:null,schemeCategory10:Wa,schemeAccent:Ha,schemeDark2:c,schemePaired:Va,schemePastel1:Ba,schemePastel2:o,schemeSet1:As,schemeSet2:$a,schemeSet3:Ns,schemeTableau10:Ps,interpolateBrBG:Es,schemeBrBG:ks,interpolatePRGn:Os,schemePRGn:Xa,interpolatePiYG:_s,schemePiYG:f2,interpolatePuOr:r,schemePuOr:e,interpolateRdBu:Ta,schemeRdBu:Ms,interpolateRdGy:Ss,schemeRdGy:Ca,interpolateRdYlBu:i,schemeRdYlBu:ja,interpolateRdYlGn:Ra,schemeRdYlGn:l,interpolateSpectral:Ia,schemeSpectral:Fa,interpolateBuGn:za,schemeBuGn:Da,interpolateBuPu:Rs,schemeBuPu:Ga,interpolateGnBu:Na,schemeGnBu:Mc,interpolateOrRd:p8,schemeOrRd:d8,interpolatePuBuGn:y8,schemePuBuGn:g8,interpolatePuBu:v8,schemePuBu:m8,interpolatePuRd:x8,schemePuRd:b8,interpolateRdPu:k8,schemeRdPu:w8,interpolateYlGnBu:O8,schemeYlGnBu:M8,interpolateYlGn:S8,schemeYlGn:_8,interpolateYlOrBr:A8,schemeYlOrBr:E8,interpolateYlOrRd:P8,schemeYlOrRd:T8,interpolateBlues:N8,schemeBlues:L8,interpolateGreens:j8,schemeGreens:C8,interpolateGreys:F8,schemeGreys:B8,interpolatePurples:I8,schemePurples:R8,interpolateReds:z8,schemeReds:D8,interpolateOranges:a,schemeOranges:W8,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:G8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return V8.h=360*t-100,V8.s=1.5-1.5*e,V8.l=.8-.9*e,V8+""},interpolateWarm:H8,interpolateCool:n,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,q8.r=255*(e=Math.sin(t))*e,q8.g=255*(e=Math.sin(t+Y8))*e,q8.b=255*(e=Math.sin(t+$8))*e,q8+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:X8,interpolateMagma:K8,interpolateInferno:Z8,interpolatePlasma:J8});function tS(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return fS(t,Cf)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?oS(t):void 0===r?cS(e)?oS(t):uS(e)?"time":sS(t,i):cS([r])?oS(t):uS(e)?"time":sS(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)Pf(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return lS(e);case"quantile":return function(t){return lS(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Pf(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=$p,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:y_(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=il(e),i=Q8["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=aS(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return aS(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function eS(t,e){var[e]=hw("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[Sf,Sf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function nS(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(rS)?tu(e):t.every(iS)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function rS(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function iS(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function aS(t,e,n,r,i){var[i]=hw("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=il(t),i=Q8["scheme"+e],a=Q8["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function oS(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function sS(t,e){return"color"!==t||e?"linear":"sequential"}function lS(t){return Array.from(new Set(t.flat()))}function cS(t){return fS(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function uS(t){return fS(t,t=>t instanceof Date)}function fS(t,e){for(const n of t)if(n.some(e))return!0;return!1}const hS={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},dS={threshold:"threshold",quantize:"quantize",quantile:"quantile"},pS={ordinal:"ordinal",band:"band",point:"point"};function gS(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=hw("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=hw("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?g_(i)?t+"Y":t+"X":"y"===e?g_(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0<n.length,r=r&&0<r.length,["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&n&&r)||["sequential"].includes(t)&&n&&(r||e)||["constant","identity"].includes(t)&&r));var e,n,r});return[...function(t){const e=au(t,t=>t.field||t.name),n=(t,e)=>{t=dg(t);return t.forEach(t=>t.unshift(e)),t.push([e]),t.sort((t,e)=>e.length-t.length)},s=[["legendCategory",n([["shape","discrete"],["size","discrete"],["opacity","discrete"]],["color","discrete"])],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",n([["opacity","continuous"]],["color","distribution"])],["legendContinuous",n([["opacity","continuous"]],["color","continuous"])]];t=Array.from(e).map(([,t])=>{var e,n,r=dg(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in hS?"continuous":t in pS?"discrete":t in dS?"distribution":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of s)for(const{option:a,combination:o}of r)if(n.some(t=>cl(i(t),i(a))))return[e,o];return null}).filter(Pf);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<d_(n,"helix").length||y_(n))&&(!g_(n)||!p_(n)&&!m_(n))){if(e.startsWith("x"))return p_(n)?["axisArc",[t]]:m_(n)?["axisLinear",[t]]:[g_(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return p_(n)?["axisLinear",[t]]:m_(n)?["axisArc",[t]]:[g_(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<d_(n,"radar").length)return["axisRadar",[t]];if(!p_(n))return["axisY",[t]]}}return null}).filter(Pf)}(t,e)]}(g,d).forEach(([t,e])=>{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=mS(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=vS(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=mS(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<d_(t,"parallel").length}(i))return null===(s=vS(n))?e:g_(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=mS(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(p_(i))return["center",null];if(m_(i))return["center",null];if("axisX"===t&&function(t){return 0<d_(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<d_(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&p_(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function yS(t,e,n,r){var[i]=hw("component",r),{scales:a=[],bbox:o}=t,t=Q(t,["scales","bbox"]),s=a.map(t=>eS(t,r)),o={bbox:o,scales:a,library:r};return i(t)(s,o,e,n)}function mS(t){var e,n=d_(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=gl(n),[n,e]):(n=d_(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=xl(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function vS(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function bS(t,e){var t=function(t,e){var n=au(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]){var o="padding"+Ef(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function xS(t,F,e){var R=au(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:I,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=I+D,G={top:[t,0,o,r,"vertical",!0,qc],right:[W-n,r,n,a,"horizontal",!1,qc],bottom:[t,s-i,o,i,"vertical",!1,qc],left:[0,r,t,a,"horizontal",!0,qc],"top-left":[t,0,o,r,"vertical",!0,qc],"top-right":[t,0,o,r,"vertical",!0,qc],"bottom-left":[t,s-i,o,i,"vertical",!1,qc],"bottom-right":[t,s-i,o,i,"vertical",!1,qc],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[j,t]of R.entries()){var l=G[j],[c,H]=fg(t,t=>"string"==typeof t.type&&("center"===j||!(!t.type.startsWith("axis")||!["inner","outer"].includes(j))));if(c.length){p=d=h=f=u=void 0;var u=c,f=F,h=l,d=j,[u,p]=fg(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(m=y=g=c=void 0,u),g=f,y=h,m=d;if("center"===m)if(!function(t){return Iu(t)&&Bu(t)}(g)){if(Bu(g)){u=void 0;d=void 0;v=void 0;b=void 0;x=void 0;w=void 0;u=c;d=y;var[v,b,x,w]=d;for(const tt of u)tt.bbox={x:v,y:b,width:x,height:w}}else if(Iu(g)){d=void 0;u=void 0;k=void 0;M=void 0;d=c;u=g;var k=y;var M=c[0].orientation;"horizontal"===M?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(d,u,k):"vertical"===M&&function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(d,u,k)}}else{O=void 0;M=void 0;_=void 0;S=void 0;E=void 0;A=void 0;var O=c;M=y;var[_,S,E,A]=M;for(const B of O)B.bbox={x:_,y:S,width:E,height:A},B.radar={index:O.indexOf(B),count:O.length}}else if("inner"===m){T=void 0;d=void 0;u=void 0;V=void 0;q=void 0;k=void 0;P=void 0;L=void 0;Y=void 0;$=void 0;var T=c;d=g;u=y;var[V,q,,u]=u,[k,P]=d.getCenter(),[d]=Wu(d),u=u/2,L=d*u,Y=k-L,$=P-L;for(let t=0;t<T.length;t++)T[t].bbox={x:V+Y,y:q+$,width:2*L,height:2*L}}else if("outer"===m){g=void 0;d=void 0;U=void 0;X=void 0;K=void 0;Z=void 0;g=c;d=y;var[U,X,K,Z]=d;for(const et of g)et.bbox={x:U,y:X,width:K,height:Z}}Q=J=C=y=c=m=P=u=N=void 0;var N=p,u=f,P=h;if(0!==N.length){var[P,m,c,y]=P,[u]=Wu(u),C=y/2*u/Math.sqrt(2),J=P+c/2,Q=m+y/2;for(let t=0;t<N.length;t++)N[t].bbox={x:J-C,y:Q-C,width:2*C,height:2*C}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>null===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function wS(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=Q(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function kS(t,i,a){return ve(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=hw("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=Q(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ve(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),Sf)}([Q(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?ug(n):[],Object.assign(Object.assign({},i),{data:n})]})}function MS(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function OS(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=cg(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return Pf(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function _S(t,e,n){var r=e["encode"];return r?(r=cg(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function SS(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=hw("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=cg(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function ES(l,t,e){var n,r=t["encode"],i=Q(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=Q(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function AS(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return tt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")}})}),[t,e]}function TS(t,e,n){var r=e["animate"];return r||void 0===r||tt(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function PS(s,l,c){return ve(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ve(this,void 0,void 0,function*(){var t=c["library"],[t]=hw("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[wS,kS,MS,OS,_S,SS,ES,TS,AS,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=su(Object.entries(n).filter(([,t])=>Pf(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=Q(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function LS(I,D,z,W){return ve(this,void 0,void 0,function*(){const[n]=hw("composition",z);var[t]=hw("interaction",z);const e=new Set(Object.keys(z).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Pf)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[I],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?BS(h,f,z):yield CS(f,z),p=(s.set(h,f),o.push(h),d.flatMap(a).map(t=>h_(t,z)));if(c.push(...p),p.every(i)){var g=yield Promise.all(p.map(t=>jS(t,z)));nS(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),nS(h,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===r(f)?f:yield HS(f,z),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}W.emitter.emit(B6.BEFORE_PAINT);const v=new Map,b=new Map,x=[];D.selectAll($S(G)).data(o,t=>t.key).join(t=>t.append("g").attr("className",G).attr("id",t=>t.key).call(NS).each(function(t){FS(t,nt(this),x,z),v.set(t,this)}),t=>t.call(NS).each(function(t){FS(t,nt(this),x,z),b.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var w=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>ve(this,void 0,void 0,function*(){var[t,e]=yield CS(r,a);FS(t,i,[],a);for(const n of e)LS(n,i,a,o);return{options:r,view:t}})}(nt(e),z,W)})),k=w(v);for(const P of k){const I=P["options"];var M=new Map;P.container.nameInteraction=M;for(const L of GS(I)){var O=t(L)(P,k);M.set(L.type,{destroy:O})}}var _=w(b);for(const N of _){const{options:I,container:C}=N;var S=C.nameInteraction;for(const j of GS(I)){var E=S.get(j.type);E&&E.destroy();E=t(j)(N,_);S.set(I.type,{destroy:E})}}const{width:A,height:F}=I;var T=[];for(const B of u){var R=new Promise(e=>ve(this,void 0,void 0,function*(){for(const t of B)yield LS(Object.assign({width:A,height:F},t),D,z,W);e()}));T.push(R)}W.views=o,W.animations=x,W.emitter.emit(B6.AFTER_PAINT);w=x.filter(Pf).map(zS).map(t=>t.finished);return Promise.all([...w,...T])})}function NS(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function CS(e,n){return ve(this,void 0,void 0,function*(){var t=h_(e,n);return BS(yield jS(t,n),t,n)})}function jS(v,b){return ve(this,void 0,void 0,function*(){var[t]=hw("theme",b);const[i,a]=hw("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(WS(e)),s=new Map,l=[];for(const p of n){var c=yield HS(p,b);l.push(c)}for(const g of yield Promise.all(l.map(r=>ve(this,void 0,void 0,function*(){const{type:t=Af("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=g["type"],f=a(f)["props"],f=yield PS(g,f,b);f&&([f,u]=f,s.set(f,u))}for(const y of au(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=y.reduce((t,{scale:e})=>tt(t,e),{}),d=y[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(Pf)));const v=tt({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=y[0]["name"];const m=tS(d,y.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);y.forEach(t=>t.scale=m)}return s})}function BS(t,e,n){var[r]=hw("mark",n),[i]=hw("theme",n),[a]=hw("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(WS(l)),p=Array.from(t.values()),p=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),p=gS(Array.from(p),e,n),g=bS(p,e),y=function(t,e,n){var[n]=hw("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new u_(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(g,e,n),e=s?tt({mainLineWidth:1,mainStroke:"#000"},u):u,m=(xS(p,y,g),{}),v=[];for([h,d]of t.entries()){const{children:k,dataDomain:M,modifier:O,key:_}=h;var{index:b,channels:x}=d,w=cg(Object.fromEntries(x.map(({name:t,scale:e})=>[t,e])),t=>eS(t,n));Object.assign(m,w);const S=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(x,w),[E,A,T]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>Pf(t)&&Pf(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(b,w,S,y));x=M||E.length;const P=O?O(A,x,g):[];b=E.map((t,e)=>{var n={points:A[e],transform:P[e],index:t,markKey:_,viewKey:o};for(const[r,i]of Object.entries(S))n[r]=i[t],T&&(n["series"+il(r)]=T[e].map(t=>i[t]));return T&&(n.seriesIndex=T[e]),n}),x=(d.data=b,d.index=E,null==k?void 0:k(b,w,g));v.push(...x||[])}return[{layout:g,theme:i,coordinate:y,components:p,markState:t,key:o,clip:c,scale:m,style:e,labelTransform:RS(f.map(a))},v]}function FS(X,K,Z,J){ve(this,void 0,void 0,function*(){const{components:F,theme:n,layout:t,markState:e,coordinate:r,key:i,style:R,clip:a}=X,{width:I,height:D}=t,z=Q(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>Lf(Object.assign({},n,R),t)),W=["a","margin","padding","inset"].map(t=>et(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=nt(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=I,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(K.selectAll($S(lt)).data(s.filter(t=>Pf(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",lt).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:g=o,updateDelay:y=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:k=f}=M;void 0!==p&&!p||(e=Math.max(e,g+y),n=Math.min(n,y)),void 0!==k&&!k||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),y=!!g&&{duration:g[1]};var m,v,b,s=K.selectAll($S(ot)).data(F,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",ot).append(t=>yS(tt({animate:y},t),r,n,J)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=yS(tt({animate:y},t),r,n,J)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();Z.push(...s.flat().filter(Pf));const x=K.selectAll($S(at)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",at).call(VS).call(YS,Array.from(e.keys())).call(US,a),t=>t.call(YS,Array.from(e.keys())).call(t=>{if(!g)return VS(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(US,a)).transitions();Z.push(...x.flat());for([m,v]of e.entries()){var G=v["data"];const{key:i,class:E}=m,A=function(l,t,e,n){const[c]=hw("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=Q(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=cg(y,t=>IS(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:qS(l,n)}))(r,t,p,d,h)}}(m,v,X,J),T=(w=m,b=v,DS("enter",w,b,X,J)),P=(w=m,b=v,DS("update",w,b,X,J)),H=(w=m,b=v,DS("exit",w,b,X,J));var w=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(K,E,"element");const x=K.select("#"+i).selectAll($S(it)).selectFacetAll(w).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(A).attr("className",it).transition(function(t){return T(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=A(t,e),s=P(t,[this],[o]);return null===s&&Tf(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return H(t,[this])}).remove(),t=>t.append(A).attr("className",it).transition(function(t){var e=this["__fromElements__"],t=P(t,e,[this]);return new eg(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new eg([],this.__toData__,this.parentNode).append(A).attr("className",it).nodes();return P(t,[this],e)}).remove()).transitions();Z.push(...x.flat())}{var k=X,M=K,O=J,_,S;const[V]=hw("labelTransform",O),{markState:q,labelTransform:L}=k,Y=M.select($S(rt)).node(),N=new Map,C=new Map,$=Array.from(q.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=hw("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=Q(t,["formatter","transform","style"]),t=cg(Object.assign(Object.assign({},t),a),t=>IS(t,r,e,l)),{shape:a=c,text:o}=t,t=Q(t,["shape","text"]),i="string"==typeof i?$x(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,k,O),a=M.select("#"+r).selectAll($S(it)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=Q(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),j=nt(Y).selectAll($S(st)).data($,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",st),t=>t.each(function(t){Tf(this,N.get(t)(t))}),t=>t.remove()).nodes(),U=au(j,t=>C.get(t.__data__)),B=k["coordinate"];for([_,S]of U){var{transform:_=[]}=_;RS(_.map(V))(S,B)}L&&L(j,B)}})}function RS(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function IS(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function DS(o,t,e,n,r){var[,i]=hw("shape",r);const[s]=hw("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${il(o)}Animation`;const{[e]:c}=i(qS(t,r)).props,{[o]:u={}}=a,f=et(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function zS(t){return t.finished.then(()=>{t.cancel()}),t}function WS(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function GS(t){var{interaction:t={},marks:e=[]}=t,t=[{},t,...e.map(t=>t.interaction||{})].reduce((t,e)=>tt(t,e),{});return Object.entries(t).filter(t=>!!t[1]).map(([t,e])=>Object.assign({type:t},e))}function HS(r,i){return ve(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=Q(r,["data"]);return null==e?r:([,{data:e}]=yield kS(0,{data:e},t),Object.assign({data:e},n))})}function VS(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function qS(t,e){t=t.type;return t+"."+e}function YS(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll($S(N)).data(e,t=>t.key).join(t=>t.append("g").attr("className",N).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select($S(rt)).node())||t.append("g").attr("className",rt)}function $S(...t){return t.map(t=>"."+t).join("")}function US(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new j.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function XS(t){for(var t=tt({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function KS(t,e={},n){const{width:r=640,height:i=480}=t,a=XS(t),{canvas:o=(t=r,c=i,u=new y.Renderer,u.registerPlugin(new Ys),new j.Canvas({width:t,height:c,container:document.createElement("div"),renderer:u})),library:s=R6(),emitter:l=new hl}=e;var c,u;e.canvas=o,e.library=s,e.emitter=l,o.resize(r,i),l.emit(B6.BEFORE_RENDER);const f=nt(o.document.documentElement);return o.ready.then(()=>LS(Object.assign(Object.assign({},a),{width:r,height:i}),f,s,e)).then(()=>{l.emit(B6.AFTER_RENDER),null!=n&&n()}),"string"==typeof(t=o.getConfig().container)?document.getElementById(t):t}function ZS(t,e={}){var{canvas:e,emitter:n}=e;e&&e.destroy(),n.off()}function JS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function QS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function tE(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function p(r){return t=>{for(const n of r){var e=n["type"];"value"===e?JS(t,n):"array"===e?QS(t,n):"object"===e?tE(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e&&function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n)}return t}}function eE(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function nE(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class rE{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return nE(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return nE(this,t=>{e===t.type&&n.push(t)}),n}call(t,...e){return t(this.map(),...e),this}root(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class iE extends rE{changeData(t){var e=this.root();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.root())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.root())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.root())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.root().context().canvas.getRoot().getElementById(t)}}Wa=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"}];let aE=class extends iE{constructor(){super({},"interval")}},oE=(aE=t([p(Wa)],aE),class extends iE{constructor(){super({},"rect")}}),sE=(oE=t([p(Wa)],oE),class extends iE{constructor(){super({},"point")}}),lE=(sE=t([p(Wa)],sE),class extends iE{constructor(){super({},"area")}}),cE=(lE=t([p(Wa)],lE),class extends iE{constructor(){super({},"line")}}),uE=(cE=t([p(Wa)],cE),class extends iE{constructor(){super({},"cell")}}),fE=(uE=t([p(Wa)],uE),class extends iE{constructor(){super({},"vector")}}),hE=(fE=t([p(Wa)],fE),class extends iE{constructor(){super({},"link")}}),dE=(hE=t([p(Wa)],hE),class extends iE{constructor(){super({},"polygon")}});dE=t([p(Wa)],dE);Ha=t([p(Wa)],class extends iE{constructor(){super({},"image")}});let pE=class extends iE{constructor(){super({},"text")}},gE=(pE=t([p(Wa)],pE),class extends iE{constructor(){super({},"box")}}),yE=(gE=t([p(Wa)],gE),class extends iE{constructor(){super({},"lineX")}}),mE=(yE=t([p(Wa)],yE),class extends iE{constructor(){super({},"lineY")}}),vE=(mE=t([p(Wa)],mE),class extends iE{constructor(){super({},"range")}}),bE=(vE=t([p(Wa)],vE),class extends iE{constructor(){super({},"rangeX")}}),xE=(bE=t([p(Wa)],bE),class extends iE{constructor(){super({},"rangeY")}}),wE=(xE=t([p(Wa)],xE),class extends iE{constructor(){super({},"connector")}}),kE=(wE=t([p(Wa)],wE),class extends iE{constructor(){super({},"shape")}}),ME=(kE=t([p(Wa)],kE),class extends iE{constructor(){super({},"sankey")}}),OE=(ME=t([p([...Wa,{name:"layout",type:"value"}])],ME),class extends iE{constructor(){super({},"treemap")}}),_E=(OE=t([p([...Wa,{name:"layout",type:"value"}])],OE),class extends iE{constructor(){super({},"boxplot")}}),SE=(_E=t([p(Wa)],_E),class extends iE{constructor(){super({},"pack")}}),EE=(SE=t([p([...Wa,{name:"layout",type:"value"}])],SE),class extends iE{constructor(){super({},"forceGraph")}}),AE=(EE=t([p([...Wa,{name:"layout",type:"value"}])],EE),class extends iE{constructor(){super({},"tree")}}),TE=(AE=t([p([...Wa,{name:"layout",type:"value"}])],AE),class extends iE{constructor(){super({},"wordCloud")}});TE=t([p([...Wa,{name:"layout",type:"object"}])],TE);c={interval:aE,rect:oE,point:sE,area:lE,line:cE,cell:uE,vector:fE,link:hE,polygon:dE,image:Ha,text:pE,box:gE,lineX:yE,lineY:mE,range:vE,rangeX:bE,rangeY:xE,connector:wE,sankey:ME,treemap:OE,boxplot:_E,shape:kE,pack:SE,forceGraph:EE,tree:AE,wordCloud:TE};let PE=class extends rE{getView(){var t=this.root().context()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this.attr("key"))}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this.attr("key");if(t)return this.root().context().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&t.setAttribute("visibility","visible")}hide(){var t=this.getGroup();t&&t.isVisible()&&t.setAttribute("visibility","hidden")}},LE=class extends(PE=t([p([{name:"on",type:"event"}])],PE)){constructor(t={},e="view"){super(t,e)}},NE=(LE=t([p([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...eE(c)])],LE),class extends PE{constructor(){super({},"spaceLayer")}}),CE=(NE=t([p([{type:"value",name:"data"},...eE(c)])],NE),class extends PE{constructor(){super({},"spaceFlex")}}),jE=(CE=t([p([{type:"value",name:"data"},...eE(c)])],CE),class extends PE{constructor(){super({},"facetRect")}}),BE=(jE=t([p([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...eE(c)])],jE),class extends PE{constructor(){super({},"facetCircle")}}),FE=(BE=t([p([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...eE(c)])],BE),class extends PE{constructor(){super({},"repeatMatrix")}}),RE=(FE=t([p([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...eE(c)])],FE),class extends PE{constructor(){super({},"timingKeyframe")}}),IE=(RE=t([p([...eE(c)])],RE),class extends PE{constructor(){super({},"geoView")}}),DE=(IE=t([p([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...eE(c)])],IE),class extends PE{constructor(){super({},"geoPath")}});DE=t([p([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...eE(c)])],DE);var zE={view:LE,spaceLayer:NE,spaceFlex:CE,facetRect:jE,facetCircle:BE,repeatMatrix:FE,timingKeyframe:RE,geoView:IE,geoPath:DE};for(const HE of Object.values(zE))p(eE(zE))(HE);const WE=R6();function GE(t){return Object.assign(Object.assign({},t.value),{type:t.type})}Va=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"value"},{name:"interaction",type:"object"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...eE(c),...Object.entries(zE).map(([t,e])=>({type:"container",name:t,ctor:e}))];g.Chart=class extends LE{constructor(t={}){var r,i,a,o,{container:e,canvas:n}=t;super(Q(t,["container","canvas"]),"view"),this.onResize=(r=()=>{this.forceFit()},i=300,function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new hl,this._context={library:WE,emitter:this._emitter,canvas:n},this.bindAutoFit()}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=Rf(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new y.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new Ys),o.forEach(t=>a.registerPlugin(t)),new j.Canvas({container:n,width:r,height:i,renderer:a}))),new Promise(t=>{KS(this.options(),this._context,()=>t(this))})}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,GE(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=GE(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}destroy(){var t,e;this.options();this.emit(B6.BEFORE_DESTROY),this.unbindAutoFit(),ZS(0,this._context),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(B6.AFTER_DESTROY)}clear(){this.options();this.emit(B6.BEFORE_CLEAR),ZS(0,this._context),this.emit(B6.AFTER_CLEAR)}forceFit(){var{width:t,height:e,autoFit:n}=this.options(),{width:n,height:t}=Rf(this._container,n,t,e);t&&n&&this.changeSize(n,t)}changeSize(t,e){var{width:n,height:r}=this.options();if(n===t&&r===e)return Promise.resolve(this);this.emit(B6.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);n=this.render();return n.then(()=>{this.emit(B6.AFTER_CHANGE_SIZE)}),n}bindAutoFit(){var t=this.options()["autoFit"];t&&window.addEventListener("resize",this.onResize)}unbindAutoFit(){var t=this.options()["autoFit"];t&&window.removeEventListener("resize",this.onResize)}},g.Chart=t([p(Va)],g.Chart),g.AREA_CLASS_NAME=lt,g.COMPONENT_CLASS_NAME=ot,g.ELEMENT_CLASS_NAME=it,g.LABEL_CLASS_NAME=st,g.LABEL_LAYER_CLASS_NAME=rt,g.MAIN_LAYER_CLASS_NAME=N,g.PLOT_CLASS_NAME=at,g.VIEW_CLASS_NAME=G,g.createLibrary=R6,g.destroy=ZS,g.register=function(t,e){Object.assign(WE,{[t]:e})},g.render=KS,g.renderToMountedElement=function(t,e={},n){var r,{width:i=640,height:a=480}=t,t=XS(t);const{library:o=R6(),group:s=new j.Group,emitter:l=new hl}=e;if(null!=s&&s.parentElement)return r=nt(s),e.group=s,e.library=o,(e.emitter=l).emit(B6.BEFORE_RENDER),LS(Object.assign(Object.assign({},t),{width:i,height:a}),r,o,e).then(()=>{l.emit(B6.AFTER_RENDER),null!=n&&n()}),s;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(g,"__esModule",{value:!0})});
|